9 #ifndef LLVM_SUPPORT_ARMWINEH_H 10 #define LLVM_SUPPORT_ARMWINEH_H 106 : BeginAddress(Data[0]), UnwindData(Data[1]) {}
110 : BeginAddress(BeginAddress), UnwindData(UnwindData) {}
118 "unpacked form required for this operation");
119 return (UnwindData & ~0x3);
125 "packed form required for this operation");
126 return (UnwindData & ~0x3);
131 "packed form required for this operation");
132 return (((UnwindData & 0x00001ffc) >> 2) << 1);
137 "packed form required for this operation");
138 assert(((UnwindData & 0x00006000) || L()) &&
"L must be set to 1");
139 return ReturnType((UnwindData & 0x00006000) >> 13);
144 "packed form required for this operation");
145 return ((UnwindData & 0x00008000) >> 15);
150 "packed form required for this operation");
151 return ((UnwindData & 0x00070000) >> 16);
156 "packed form required for this operation");
157 return ((UnwindData & 0x00080000) >> 19);
162 "packed form required for this operation");
163 return ((UnwindData & 0x00100000) >> 20);
168 "packed form required for this operation");
169 assert(((~UnwindData & 0x00200000) || L()) &&
170 "L flag must be set, chaining requires r11 and LR");
171 assert(((~UnwindData & 0x00200000) || (
Reg() < 7) || R()) &&
172 "r11 must not be included in Reg; C implies r11");
173 return ((UnwindData & 0x00200000) >> 21);
178 "packed form required for this operation");
179 return ((UnwindData & 0xffc00000) >> 22);
198 if (Adjustment >= 0x3f4)
199 return (Adjustment & 0x3) ? ((Adjustment & 0x3) << 2) - 1 : 0;
319 return (ES & 0x0003ffff);
324 return ((ES & 0x000c0000) >> 18);
328 return ((ES & 0x000f0000) >> 18);
333 return ((ES & 0x00f00000) >> 20);
338 return ((ES & 0xff000000) >> 24);
342 return ((ES & 0xffc00000) >> 22);
354 Data(Data), isAArch64(isAArch64) {}
357 return (Data[0] & 0x0003ffff);
361 return FunctionLength() << 1;
365 return FunctionLength() << 2;
369 return (Data[0] & 0x000C0000) >> 18;
373 return ((Data[0] & 0x00100000) >> 20);
377 return ((Data[0] & 0x00200000) >> 21);
381 assert(!isAArch64 &&
"Fragments are only supported on ARMv7 WinEH");
382 return ((Data[0] & 0x00400000) >> 22);
388 return (Data[0] & 0x07C00000) >> 22;
389 return (Data[0] & 0x0f800000) >> 23;
391 return Data[1] & 0x0000ffff;
397 return (Data[0] & 0xf8000000) >> 27;
398 return (Data[0] & 0xf0000000) >> 28;
400 return (Data[1] & 0x00ff0000) >> 16;
404 assert(
E() == 0 &&
"epilogue scopes are only present when the E bit is 0");
411 + (
E() ? 0 : EpilogueCount());
412 const uint8_t *ByteCode =
413 reinterpret_cast<const uint8_t *
>(&Data[
Offset]);
418 assert(
X() &&
"Exception Handler RVA is only valid if the X bit is set");
419 return Data[
HeaderWords(*
this) + EpilogueCount() + CodeWords()];
423 assert(
X() &&
"Exception Handler RVA is only valid if the X bit is set");
424 return Data[
HeaderWords(*
this) + EpilogueCount() + CodeWords() + 1];
430 return (XR.
Data[0] & 0xffc00000) ? 1 : 2;
431 return (XR.
Data[0] & 0xff800000) ? 1 : 2;
uint32_t FunctionLengthInBytesAArch64() const
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
uint8_t CodeWords() const
This class represents lattice values for constants.
uint8_t EpilogueStartIndexARM() const
const support::ulittle32_t ES
RuntimeFunctionFlag Flag() const
uint32_t ExceptionHandlerParameter() const
uint32_t ExceptionHandlerRVA() const
uint32_t FunctionLength() const
bool EpilogueFolding(const RuntimeFunction &RF)
Epilogue - pseudo-flag derived from Stack Adjust indicating that the epilogue has stack adjustment co...
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
ExceptionDataRecord - An entry in the table of exception data (.xdata)
uint8_t ResAArch64() const
uint16_t StackAdjustment(const RuntimeFunction &RF)
StackAdjustment - calculated stack adjustment in words.
bool PrologueFolding(const RuntimeFunction &RF)
PrologueFolding - pseudo-flag derived from Stack Adjust indicating that the prologue has stack adjust...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
RuntimeFunction(const support::ulittle32_t *Data)
const support::ulittle32_t * Data
RuntimeFunction(const support::ulittle32_t BeginAddress, const support::ulittle32_t UnwindData)
uint8_t Condition() const
Flag
These should be considered private to the implementation of the MCInstrDesc class.
uint32_t ExceptionInformationRVA() const
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
uint16_t EpilogueStartIndexAArch64() const
packed entry representing a fragment
RuntimeFunction - An entry in the table of procedure data (.pdata)
uint32_t FunctionLength() const
size_t HeaderWords(const ExceptionDataRecord &XR)
const support::ulittle32_t BeginAddress
uint32_t EpilogueStartOffset() const
ArrayRef< uint8_t > UnwindByteCode() const
EpilogueScope(const support::ulittle32_t Data)
const support::ulittle32_t UnwindData
uint32_t FunctionLengthInBytesARM() const
return via pop {pc} (L flag must be set)
uint16_t EpilogueCount() const
Windows Exception Handling.
ArrayRef< support::ulittle32_t > EpilogueScopes() const
ExceptionDataRecord(const support::ulittle32_t *Data, bool isAArch64)
std::pair< uint16_t, uint32_t > SavedRegisterMask(const RuntimeFunction &RF)
SavedRegisterMask - Utility function to calculate the set of saved general purpose (r0-r15) and VFP (...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
uint16_t StackAdjust() const
uint32_t PackedUnwindData() const