1// Licensed to the .NET Foundation under one or more agreements.
2// The .NET Foundation licenses this file to you under the MIT license.
3// See the LICENSE file in the project root for more information.
4
5#ifndef CFI_H_
6#define CFI_H_
7
8#define DWARF_REG_ILLEGAL -1
9enum CFI_OPCODE
10{
11 CFI_ADJUST_CFA_OFFSET, // Offset is adjusted relative to the current one.
12 CFI_DEF_CFA_REGISTER, // New register is used to compute CFA
13 CFI_REL_OFFSET // Register is saved at offset from the current CFA
14};
15
16struct CFI_CODE
17{
18 unsigned char CodeOffset;// Offset from the start of code the frame covers.
19 unsigned char CfiOpCode;
20 short DwarfReg; // Dwarf register number. 0~32 for x64.
21 int Offset;
22 CFI_CODE(unsigned char codeOffset, unsigned char cfiOpcode,
23 short dwarfReg, int offset)
24 : CodeOffset(codeOffset)
25 , CfiOpCode(cfiOpcode)
26 , DwarfReg(dwarfReg)
27 , Offset(offset)
28 {}
29};
30typedef CFI_CODE* PCFI_CODE;
31
32#endif // CFI_H
33
34