10 #ifndef LLVM_SUPPORT_ARMWINEH_H 11 #define LLVM_SUPPORT_ARMWINEH_H 107 : BeginAddress(Data[0]), UnwindData(Data[1]) {}
111 : BeginAddress(BeginAddress), UnwindData(UnwindData) {}
119 "unpacked form required for this operation");
120 return (UnwindData & ~0x3);
126 "packed form required for this operation");
127 return (UnwindData & ~0x3);
132 "packed form required for this operation");
133 return (((UnwindData & 0x00001ffc) >> 2) << 1);
138 "packed form required for this operation");
139 assert(((UnwindData & 0x00006000) || L()) &&
"L must be set to 1");
140 return ReturnType((UnwindData & 0x00006000) >> 13);
145 "packed form required for this operation");
146 return ((UnwindData & 0x00008000) >> 15);
151 "packed form required for this operation");
152 return ((UnwindData & 0x00070000) >> 16);
157 "packed form required for this operation");
158 return ((UnwindData & 0x00080000) >> 19);
163 "packed form required for this operation");
164 return ((UnwindData & 0x00100000) >> 20);
169 "packed form required for this operation");
170 assert(((~UnwindData & 0x00200000) || L()) &&
171 "L flag must be set, chaining requires r11 and LR");
172 assert(((~UnwindData & 0x00200000) || (
Reg() < 7) || R()) &&
173 "r11 must not be included in Reg; C implies r11");
174 return ((UnwindData & 0x00200000) >> 21);
179 "packed form required for this operation");
180 return ((UnwindData & 0xffc00000) >> 22);
199 if (Adjustment >= 0x3f4)
200 return (Adjustment & 0x3) ? ((Adjustment & 0x3) << 2) - 1 : 0;
320 return (ES & 0x0003ffff);
325 return ((ES & 0x000c0000) >> 18);
329 return ((ES & 0x000f0000) >> 18);
334 return ((ES & 0x00f00000) >> 20);
339 return ((ES & 0xff000000) >> 24);
343 return ((ES & 0xffc00000) >> 22);
355 Data(Data), isAArch64(isAArch64) {}
358 return (Data[0] & 0x0003ffff);
362 return FunctionLength() << 1;
366 return FunctionLength() << 2;
370 return (Data[0] & 0x000C0000) >> 18;
374 return ((Data[0] & 0x00100000) >> 20);
378 return ((Data[0] & 0x00200000) >> 21);
382 assert(!isAArch64 &&
"Fragments are only supported on ARMv7 WinEH");
383 return ((Data[0] & 0x00400000) >> 22);
389 return (Data[0] & 0x07C00000) >> 22;
390 return (Data[0] & 0x0f800000) >> 23;
392 return Data[1] & 0x0000ffff;
398 return (Data[0] & 0xf8000000) >> 27;
399 return (Data[0] & 0xf0000000) >> 28;
401 return (Data[1] & 0x00ff0000) >> 16;
405 assert(
E() == 0 &&
"epilogue scopes are only present when the E bit is 0");
412 + (
E() ? 0 : EpilogueCount());
413 const uint8_t *ByteCode =
414 reinterpret_cast<const uint8_t *
>(&Data[
Offset]);
419 assert(
X() &&
"Exception Handler RVA is only valid if the X bit is set");
420 return Data[
HeaderWords(*
this) + EpilogueCount() + CodeWords()];
424 assert(
X() &&
"Exception Handler RVA is only valid if the X bit is set");
425 return Data[
HeaderWords(*
this) + EpilogueCount() + CodeWords() + 1];
431 return (XR.
Data[0] & 0xffc00000) ? 1 : 2;
432 return (XR.
Data[0] & 0xff800000) ? 1 : 2;
uint8_t EpilogueCount() const
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)
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