LLVM  15.0.0git
ARMWinEH.h
Go to the documentation of this file.
1 //===-- llvm/Support/ARMWinEH.h - Windows on ARM EH Constants ---*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_SUPPORT_ARMWINEH_H
10 #define LLVM_SUPPORT_ARMWINEH_H
11 
12 #include "llvm/ADT/ArrayRef.h"
13 #include "llvm/Support/Endian.h"
14 
15 namespace llvm {
16 namespace ARM {
17 namespace WinEH {
18 enum class RuntimeFunctionFlag {
19  RFF_Unpacked, /// unpacked entry
20  RFF_Packed, /// packed entry
21  RFF_PackedFragment, /// packed entry representing a fragment
22  RFF_Reserved, /// reserved
23 };
24 
25 enum class ReturnType {
26  RT_POP, /// return via pop {pc} (L flag must be set)
27  RT_B, /// 16-bit branch
28  RT_BW, /// 32-bit branch
29  RT_NoEpilogue, /// no epilogue (fragment)
30 };
31 
32 /// RuntimeFunction - An entry in the table of procedure data (.pdata)
33 ///
34 /// This is ARM specific, but the Function Start RVA, Flag and
35 /// ExceptionInformationRVA fields work identically for ARM64.
36 ///
37 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
38 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
39 /// +---------------------------------------------------------------+
40 /// | Function Start RVA |
41 /// +-------------------+-+-+-+-----+-+---+---------------------+---+
42 /// | Stack Adjust |C|L|R| Reg |H|Ret| Function Length |Flg|
43 /// +-------------------+-+-+-+-----+-+---+---------------------+---+
44 ///
45 /// Flag : 2-bit field with the following meanings:
46 /// - 00 = packed unwind data not used; reamining bits point to .xdata record
47 /// - 01 = packed unwind data
48 /// - 10 = packed unwind data, function assumed to have no prologue; useful
49 /// for function fragments that are discontiguous with the start of the
50 /// function
51 /// - 11 = reserved
52 /// Function Length : 11-bit field providing the length of the entire function
53 /// in bytes, divided by 2; if the function is greater than
54 /// 4KB, a full .xdata record must be used instead
55 /// Ret : 2-bit field indicating how the function returns
56 /// - 00 = return via pop {pc} (the L bit must be set)
57 /// - 01 = return via 16-bit branch
58 /// - 10 = return via 32-bit branch
59 /// - 11 = no epilogue; useful for function fragments that may only contain a
60 /// prologue but the epilogue is elsewhere
61 /// H : 1-bit flag indicating whether the function "homes" the integer parameter
62 /// registers (r0-r3), allocating 16-bytes on the stack
63 /// Reg : 3-bit field indicating the index of the last saved non-volatile
64 /// register. If the R bit is set to 0, then only integer registers are
65 /// saved (r4-rN, where N is 4 + Reg). If the R bit is set to 1, then
66 /// only floating-point registers are being saved (d8-dN, where N is
67 /// 8 + Reg). The special case of the R bit being set to 1 and Reg equal
68 /// to 7 indicates that no registers are saved.
69 /// R : 1-bit flag indicating whether the non-volatile registers are integer or
70 /// floating-point. 0 indicates integer, 1 indicates floating-point. The
71 /// special case of the R-flag being set and Reg being set to 7 indicates
72 /// that no non-volatile registers are saved.
73 /// L : 1-bit flag indicating whether the function saves/restores the link
74 /// register (LR)
75 /// C : 1-bit flag indicating whether the function includes extra instructions
76 /// to setup a frame chain for fast walking. If this flag is set, r11 is
77 /// implicitly added to the list of saved non-volatile integer registers.
78 /// Stack Adjust : 10-bit field indicating the number of bytes of stack that are
79 /// allocated for this function. Only values between 0x000 and
80 /// 0x3f3 can be directly encoded. If the value is 0x3f4 or
81 /// greater, then the low 4 bits have special meaning as follows:
82 /// - Bit 0-1
83 /// indicate the number of words' of adjustment (1-4), minus 1
84 /// - Bit 2
85 /// indicates if the prologue combined adjustment into push
86 /// - Bit 3
87 /// indicates if the epilogue combined adjustment into pop
88 ///
89 /// RESTRICTIONS:
90 /// - IF C is SET:
91 /// + L flag must be set since frame chaining requires r11 and lr
92 /// + r11 must NOT be included in the set of registers described by Reg
93 /// - IF Ret is 0:
94 /// + L flag must be set
95 
96 // NOTE: RuntimeFunction is meant to be a simple class that provides raw access
97 // to all fields in the structure. The accessor methods reflect the names of
98 // the bitfields that they correspond to. Although some obvious simplifications
99 // are possible via merging of methods, it would prevent the use of this class
100 // to fully inspect the contents of the data structure which is particularly
101 // useful for scenarios such as llvm-readobj to aid in testing.
102 
104 public:
107 
109  : BeginAddress(Data[0]), UnwindData(Data[1]) {}
110 
114 
116  return RuntimeFunctionFlag(UnwindData & 0x3);
117  }
118 
121  "unpacked form required for this operation");
122  return (UnwindData & ~0x3);
123  }
124 
128  "packed form required for this operation");
129  return (UnwindData & ~0x3);
130  }
134  "packed form required for this operation");
135  return (((UnwindData & 0x00001ffc) >> 2) << 1);
136  }
137  ReturnType Ret() const {
140  "packed form required for this operation");
141  assert(((UnwindData & 0x00006000) || L()) && "L must be set to 1");
142  return ReturnType((UnwindData & 0x00006000) >> 13);
143  }
144  bool H() const {
147  "packed form required for this operation");
148  return ((UnwindData & 0x00008000) >> 15);
149  }
150  uint8_t Reg() const {
153  "packed form required for this operation");
154  return ((UnwindData & 0x00070000) >> 16);
155  }
156  bool R() const {
159  "packed form required for this operation");
160  return ((UnwindData & 0x00080000) >> 19);
161  }
162  bool L() const {
165  "packed form required for this operation");
166  return ((UnwindData & 0x00100000) >> 20);
167  }
168  bool C() const {
171  "packed form required for this operation");
172  assert(((~UnwindData & 0x00200000) || L()) &&
173  "L flag must be set, chaining requires r11 and LR");
174  assert(((~UnwindData & 0x00200000) || (Reg() < 7) || R()) &&
175  "r11 must not be included in Reg; C implies r11");
176  return ((UnwindData & 0x00200000) >> 21);
177  }
181  "packed form required for this operation");
182  return ((UnwindData & 0xffc00000) >> 22);
183  }
184 };
185 
186 /// PrologueFolding - pseudo-flag derived from Stack Adjust indicating that the
187 /// prologue has stack adjustment combined into the push
188 inline bool PrologueFolding(const RuntimeFunction &RF) {
189  return RF.StackAdjust() >= 0x3f4 && (RF.StackAdjust() & 0x4);
190 }
191 /// Epilogue - pseudo-flag derived from Stack Adjust indicating that the
192 /// epilogue has stack adjustment combined into the pop
193 inline bool EpilogueFolding(const RuntimeFunction &RF) {
194  return RF.StackAdjust() >= 0x3f4 && (RF.StackAdjust() & 0x8);
195 }
196 /// StackAdjustment - calculated stack adjustment in words. The stack
197 /// adjustment should be determined via this function to account for the special
198 /// handling the special encoding when the value is >= 0x3f4.
200  uint16_t Adjustment = RF.StackAdjust();
201  if (Adjustment >= 0x3f4)
202  return (Adjustment & 0x3) + 1;
203  return Adjustment;
204 }
205 
206 /// SavedRegisterMask - Utility function to calculate the set of saved general
207 /// purpose (r0-r15) and VFP (d0-d31) registers.
208 std::pair<uint16_t, uint32_t> SavedRegisterMask(const RuntimeFunction &RF,
209  bool Prologue = true);
210 
211 /// RuntimeFunctionARM64 - An entry in the table of procedure data (.pdata)
212 ///
213 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
214 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
215 /// +---------------------------------------------------------------+
216 /// | Function Start RVA |
217 /// +-----------------+---+-+-------+-----+---------------------+---+
218 /// | Frame Size |CR |H| RegI |RegF | Function Length |Flg|
219 /// +-----------------+---+-+-------+-----+---------------------+---+
220 ///
221 /// See https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling
222 /// for the full reference for this struct.
223 
225 public:
228 
230  : BeginAddress(Data[0]), UnwindData(Data[1]) {}
231 
235 
237  return RuntimeFunctionFlag(UnwindData & 0x3);
238  }
239 
242  "unpacked form required for this operation");
243  return (UnwindData & ~0x3);
244  }
245 
249  "packed form required for this operation");
250  return (UnwindData & ~0x3);
251  }
255  "packed form required for this operation");
256  return (((UnwindData & 0x00001ffc) >> 2) << 2);
257  }
258  uint8_t RegF() const {
261  "packed form required for this operation");
262  return ((UnwindData & 0x0000e000) >> 13);
263  }
264  uint8_t RegI() const {
267  "packed form required for this operation");
268  return ((UnwindData & 0x000f0000) >> 16);
269  }
270  bool H() const {
273  "packed form required for this operation");
274  return ((UnwindData & 0x00100000) >> 20);
275  }
276  uint8_t CR() const {
279  "packed form required for this operation");
280  return ((UnwindData & 0x600000) >> 21);
281  }
282  uint16_t FrameSize() const {
285  "packed form required for this operation");
286  return ((UnwindData & 0xff800000) >> 23);
287  }
288 };
289 
290 /// ExceptionDataRecord - An entry in the table of exception data (.xdata)
291 ///
292 /// The format on ARM is:
293 ///
294 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
295 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
296 /// +-------+---------+-+-+-+---+-----------------------------------+
297 /// | C Wrd | Epi Cnt |F|E|X|Ver| Function Length |
298 /// +-------+--------+'-'-'-'---'---+-------------------------------+
299 /// | Reserved |Ex. Code Words| (Extended Epilogue Count) |
300 /// +-------+--------+--------------+-------------------------------+
301 ///
302 /// The format on ARM64 is:
303 ///
304 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
305 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
306 /// +---------+---------+-+-+---+-----------------------------------+
307 /// | C Wrd | Epi Cnt |E|X|Ver| Function Length |
308 /// +---------+------+--'-'-'---'---+-------------------------------+
309 /// | Reserved |Ex. Code Words| (Extended Epilogue Count) |
310 /// +-------+--------+--------------+-------------------------------+
311 ///
312 /// Function Length : 18-bit field indicating the total length of the function
313 /// in bytes divided by 2. If a function is larger than
314 /// 512KB, then multiple pdata and xdata records must be used.
315 /// Vers : 2-bit field describing the version of the remaining structure. Only
316 /// version 0 is currently defined (values 1-3 are not permitted).
317 /// X : 1-bit field indicating the presence of exception data
318 /// E : 1-bit field indicating that the single epilogue is packed into the
319 /// header
320 /// F : 1-bit field indicating that the record describes a function fragment
321 /// (implies that no prologue is present, and prologue processing should be
322 /// skipped) (ARM only)
323 /// Epilogue Count : 5-bit field that differs in meaning based on the E field.
324 ///
325 /// If E is set, then this field specifies the index of the
326 /// first unwind code describing the (only) epilogue.
327 ///
328 /// Otherwise, this field indicates the number of exception
329 /// scopes. If more than 31 scopes exist, then this field and
330 /// the Code Words field must both be set to 0 to indicate that
331 /// an extension word is required.
332 /// Code Words : 4-bit (5-bit on ARM64) field that specifies the number of
333 /// 32-bit words needed to contain all the unwind codes. If more
334 /// than 15 words (31 words on ARM64) are required, then this field
335 /// and the Epilogue Count field must both be set to 0 to indicate
336 /// that an extension word is required.
337 /// Extended Epilogue Count, Extended Code Words :
338 /// Valid only if Epilog Count and Code Words are both
339 /// set to 0. Provides an 8-bit extended code word
340 /// count and 16-bits for epilogue count
341 ///
342 /// The epilogue scope format on ARM is:
343 ///
344 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
345 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
346 /// +----------------+------+---+---+-------------------------------+
347 /// | Ep Start Idx | Cond |Res| Epilogue Start Offset |
348 /// +----------------+------+---+-----------------------------------+
349 ///
350 /// The epilogue scope format on ARM64 is:
351 ///
352 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
353 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
354 /// +-------------------+-------+---+-------------------------------+
355 /// | Ep Start Idx | Res | Epilogue Start Offset |
356 /// +-------------------+-------+-----------------------------------+
357 ///
358 /// If the E bit is unset in the header, the header is followed by a series of
359 /// epilogue scopes, which are sorted by their offset.
360 ///
361 /// Epilogue Start Offset: 18-bit field encoding the offset of epilogue relative
362 /// to the start of the function in bytes divided by two
363 /// Res : 2-bit field reserved for future expansion (must be set to 0)
364 /// Condition : (ARM only) 4-bit field providing the condition under which the
365 /// epilogue is executed. Unconditional epilogues should set this
366 /// field to 0xe. Epilogues must be entirely conditional or
367 /// unconditional, and in Thumb-2 mode. The epilogue begins with
368 /// the first instruction after the IT opcode.
369 /// Epilogue Start Index : 8-bit field indicating the byte index of the first
370 /// unwind code describing the epilogue
371 ///
372 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
373 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
374 /// +---------------+---------------+---------------+---------------+
375 /// | Unwind Code 3 | Unwind Code 2 | Unwind Code 1 | Unwind Code 0 |
376 /// +---------------+---------------+---------------+---------------+
377 ///
378 /// Following the epilogue scopes, the byte code describing the unwinding
379 /// follows. This is padded to align up to word alignment. Bytes are stored in
380 /// little endian.
381 ///
382 /// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
383 /// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
384 /// +---------------------------------------------------------------+
385 /// | Exception Handler RVA (requires X = 1) |
386 /// +---------------------------------------------------------------+
387 /// | (possibly followed by data required for exception handler) |
388 /// +---------------------------------------------------------------+
389 ///
390 /// If the X bit is set in the header, the unwind byte code is followed by the
391 /// exception handler information. This constants of one Exception Handler RVA
392 /// which is the address to the exception handler, followed immediately by the
393 /// variable length data associated with the exception handler.
394 ///
395 
398 
400  // Same for both ARM and AArch64.
402  return (ES & 0x0003ffff);
403  }
404 
405  // Different implementations for ARM and AArch64.
406  uint8_t ResARM() const {
407  return ((ES & 0x000c0000) >> 18);
408  }
409 
410  uint8_t ResAArch64() const {
411  return ((ES & 0x000f0000) >> 18);
412  }
413 
414  // Condition is only applicable to ARM.
415  uint8_t Condition() const {
416  return ((ES & 0x00f00000) >> 20);
417  }
418 
419  // Different implementations for ARM and AArch64.
420  uint8_t EpilogueStartIndexARM() const {
421  return ((ES & 0xff000000) >> 24);
422  }
423 
425  return ((ES & 0xffc00000) >> 22);
426  }
427 };
428 
429 struct ExceptionDataRecord;
430 inline size_t HeaderWords(const ExceptionDataRecord &XR);
431 
434  bool isAArch64;
435 
438 
440  return (Data[0] & 0x0003ffff);
441  }
442 
444  return FunctionLength() << 1;
445  }
446 
448  return FunctionLength() << 2;
449  }
450 
451  uint8_t Vers() const {
452  return (Data[0] & 0x000C0000) >> 18;
453  }
454 
455  bool X() const {
456  return ((Data[0] & 0x00100000) >> 20);
457  }
458 
459  bool E() const {
460  return ((Data[0] & 0x00200000) >> 21);
461  }
462 
463  bool F() const {
464  assert(!isAArch64 && "Fragments are only supported on ARMv7 WinEH");
465  return ((Data[0] & 0x00400000) >> 22);
466  }
467 
469  if (HeaderWords(*this) == 1) {
470  if (isAArch64)
471  return (Data[0] & 0x07C00000) >> 22;
472  return (Data[0] & 0x0f800000) >> 23;
473  }
474  return Data[1] & 0x0000ffff;
475  }
476 
477  uint8_t CodeWords() const {
478  if (HeaderWords(*this) == 1) {
479  if (isAArch64)
480  return (Data[0] & 0xf8000000) >> 27;
481  return (Data[0] & 0xf0000000) >> 28;
482  }
483  return (Data[1] & 0x00ff0000) >> 16;
484  }
485 
487  assert(E() == 0 && "epilogue scopes are only present when the E bit is 0");
488  size_t Offset = HeaderWords(*this);
489  return makeArrayRef(&Data[Offset], EpilogueCount());
490  }
491 
493  const size_t Offset = HeaderWords(*this)
494  + (E() ? 0 : EpilogueCount());
495  const uint8_t *ByteCode =
496  reinterpret_cast<const uint8_t *>(&Data[Offset]);
497  return makeArrayRef(ByteCode, CodeWords() * sizeof(uint32_t));
498  }
499 
501  assert(X() && "Exception Handler RVA is only valid if the X bit is set");
502  return Data[HeaderWords(*this) + (E() ? 0 : EpilogueCount()) + CodeWords()];
503  }
504 
506  assert(X() && "Exception Handler RVA is only valid if the X bit is set");
507  return Data[HeaderWords(*this) + (E() ? 0 : EpilogueCount()) + CodeWords() +
508  1];
509  }
510 };
511 
512 inline size_t HeaderWords(const ExceptionDataRecord &XR) {
513  if (XR.isAArch64)
514  return (XR.Data[0] & 0xffc00000) ? 1 : 2;
515  return (XR.Data[0] & 0xff800000) ? 1 : 2;
516 }
517 }
518 }
519 }
520 
521 #endif
llvm::ARM::WinEH::EpilogueScope::ES
const support::ulittle32_t ES
Definition: ARMWinEH.h:397
llvm::ARM::WinEH::RuntimeFunction::RuntimeFunction
RuntimeFunction(const support::ulittle32_t *Data)
Definition: ARMWinEH.h:108
llvm::ARM::WinEH::RuntimeFunctionFlag::RFF_Reserved
@ RFF_Reserved
packed entry representing a fragment
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::ARM::WinEH::ReturnType::RT_POP
@ RT_POP
llvm::ARM::WinEH::RuntimeFunctionARM64::RegF
uint8_t RegF() const
Definition: ARMWinEH.h:258
llvm::support::detail::packed_endian_specific_integral
Definition: Endian.h:206
llvm::ARM::WinEH::ExceptionDataRecord::ExceptionHandlerParameter
uint32_t ExceptionHandlerParameter() const
Definition: ARMWinEH.h:505
llvm::ARM::WinEH::ReturnType::RT_NoEpilogue
@ RT_NoEpilogue
32-bit branch
llvm::ARM::WinEH::RuntimeFunctionFlag::RFF_Packed
@ RFF_Packed
unpacked entry
llvm::ARM::WinEH::EpilogueScope
ExceptionDataRecord - An entry in the table of exception data (.xdata)
Definition: ARMWinEH.h:396
llvm::ARM::WinEH::EpilogueScope::EpilogueStartOffset
uint32_t EpilogueStartOffset() const
Definition: ARMWinEH.h:401
llvm::ARM::WinEH::ExceptionDataRecord::Vers
uint8_t Vers() const
Definition: ARMWinEH.h:451
llvm::ARM::WinEH::ExceptionDataRecord::isAArch64
bool isAArch64
Definition: ARMWinEH.h:434
llvm::ARM::WinEH::RuntimeFunction::Flag
RuntimeFunctionFlag Flag() const
Definition: ARMWinEH.h:115
llvm::ARM::WinEH::RuntimeFunctionFlag::RFF_Unpacked
@ RFF_Unpacked
llvm::ARM::WinEH::ExceptionDataRecord::Data
const support::ulittle32_t * Data
Definition: ARMWinEH.h:433
llvm::ARM::WinEH::ExceptionDataRecord::UnwindByteCode
ArrayRef< uint8_t > UnwindByteCode() const
Definition: ARMWinEH.h:492
llvm::ARM::WinEH::EpilogueScope::ResAArch64
uint8_t ResAArch64() const
Definition: ARMWinEH.h:410
llvm::ARM::WinEH::RuntimeFunctionFlag::RFF_PackedFragment
@ RFF_PackedFragment
packed entry
llvm::ARM::WinEH::ExceptionDataRecord::EpilogueCount
uint16_t EpilogueCount() const
Definition: ARMWinEH.h:468
llvm::WinEH::EncodingType::ARM
@ ARM
Windows AXP64.
llvm::ARM::WinEH::RuntimeFunctionARM64::FrameSize
uint16_t FrameSize() const
Definition: ARMWinEH.h:282
llvm::Data
@ Data
Definition: SIMachineScheduler.h:55
llvm::ARM::WinEH::PrologueFolding
bool PrologueFolding(const RuntimeFunction &RF)
PrologueFolding - pseudo-flag derived from Stack Adjust indicating that the prologue has stack adjust...
Definition: ARMWinEH.h:188
llvm::ARM::WinEH::RuntimeFunction::Reg
uint8_t Reg() const
Definition: ARMWinEH.h:150
x3
In x86 we generate this spiffy xmm0 xmm0 ret in x86 we generate this which could be xmm1 movss xmm1 xmm0 ret In sse4 we could use insertps to make both better Here s another testcase that could use x3
Definition: README-SSE.txt:547
llvm::ARM::WinEH::RuntimeFunction::C
bool C() const
Definition: ARMWinEH.h:168
llvm::ARM::WinEH::RuntimeFunctionARM64::CR
uint8_t CR() const
Definition: ARMWinEH.h:276
llvm::ARM::WinEH::RuntimeFunction::RuntimeFunction
RuntimeFunction(const support::ulittle32_t BeginAddress, const support::ulittle32_t UnwindData)
Definition: ARMWinEH.h:111
llvm::ARM::WinEH::EpilogueScope::EpilogueStartIndexAArch64
uint16_t EpilogueStartIndexAArch64() const
Definition: ARMWinEH.h:424
llvm::ARM::WinEH::ExceptionDataRecord::F
bool F() const
Definition: ARMWinEH.h:463
llvm::ARM::WinEH::SavedRegisterMask
std::pair< uint16_t, uint32_t > SavedRegisterMask(const RuntimeFunction &RF, bool Prologue=true)
SavedRegisterMask - Utility function to calculate the set of saved general purpose (r0-r15) and VFP (...
Definition: ARMWinEH.cpp:14
llvm::ARM::WinEH::ExceptionDataRecord::FunctionLength
uint32_t FunctionLength() const
Definition: ARMWinEH.h:439
llvm::ARM::WinEH::RuntimeFunctionARM64::RuntimeFunctionARM64
RuntimeFunctionARM64(const support::ulittle32_t *Data)
Definition: ARMWinEH.h:229
llvm::ARM::WinEH::ExceptionDataRecord::ExceptionHandlerRVA
uint32_t ExceptionHandlerRVA() const
Definition: ARMWinEH.h:500
llvm::ARM::WinEH::ExceptionDataRecord::EpilogueScopes
ArrayRef< support::ulittle32_t > EpilogueScopes() const
Definition: ARMWinEH.h:486
llvm::ARM::WinEH::RuntimeFunction::L
bool L() const
Definition: ARMWinEH.h:162
llvm::ARM::WinEH::RuntimeFunction::ExceptionInformationRVA
uint32_t ExceptionInformationRVA() const
Definition: ARMWinEH.h:119
llvm::ARM::WinEH::RuntimeFunctionARM64::UnwindData
const support::ulittle32_t UnwindData
Definition: ARMWinEH.h:227
llvm::ARM::WinEH::ReturnType::RT_B
@ RT_B
return via pop {pc} (L flag must be set)
llvm::ARM::WinEH::ExceptionDataRecord::CodeWords
uint8_t CodeWords() const
Definition: ARMWinEH.h:477
llvm::ARM::WinEH::EpilogueScope::Condition
uint8_t Condition() const
Definition: ARMWinEH.h:415
llvm::ARM::WinEH::RuntimeFunction::PackedUnwindData
uint32_t PackedUnwindData() const
Definition: ARMWinEH.h:125
llvm::ARM::WinEH::RuntimeFunction::UnwindData
const support::ulittle32_t UnwindData
Definition: ARMWinEH.h:106
llvm::ARM::WinEH::RuntimeFunction::Ret
ReturnType Ret() const
Definition: ARMWinEH.h:137
llvm::omp::RuntimeFunction
RuntimeFunction
IDs for all omp runtime library (RTL) functions.
Definition: OMPConstants.h:46
llvm::ARM::WinEH::ExceptionDataRecord
Definition: ARMWinEH.h:432
llvm::ARM::WinEH::RuntimeFunction::BeginAddress
const support::ulittle32_t BeginAddress
Definition: ARMWinEH.h:105
llvm::ARM::WinEH::ExceptionDataRecord::FunctionLengthInBytesARM
uint32_t FunctionLengthInBytesARM() const
Definition: ARMWinEH.h:443
llvm::ARM::WinEH::RuntimeFunction::FunctionLength
uint32_t FunctionLength() const
Definition: ARMWinEH.h:131
llvm::ARM::WinEH::RuntimeFunction
RuntimeFunction - An entry in the table of procedure data (.pdata)
Definition: ARMWinEH.h:103
ArrayRef.h
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::ARM::WinEH::RuntimeFunctionFlag
RuntimeFunctionFlag
Definition: ARMWinEH.h:18
llvm::ARM::WinEH::EpilogueScope::EpilogueScope
EpilogueScope(const support::ulittle32_t Data)
Definition: ARMWinEH.h:399
llvm::ARM::WinEH::RuntimeFunctionARM64::PackedUnwindData
uint32_t PackedUnwindData() const
Definition: ARMWinEH.h:246
llvm::ARM::WinEH::RuntimeFunctionARM64::H
bool H() const
Definition: ARMWinEH.h:270
llvm::ARM::WinEH::ReturnType
ReturnType
Definition: ARMWinEH.h:25
llvm::ARM::WinEH::HeaderWords
size_t HeaderWords(const ExceptionDataRecord &XR)
Definition: ARMWinEH.h:512
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::ARM::WinEH::EpilogueScope::EpilogueStartIndexARM
uint8_t EpilogueStartIndexARM() const
Definition: ARMWinEH.h:420
uint32_t
llvm::ARM::WinEH::ExceptionDataRecord::E
bool E() const
Definition: ARMWinEH.h:459
llvm::ARM::WinEH::RuntimeFunctionARM64
RuntimeFunctionARM64 - An entry in the table of procedure data (.pdata)
Definition: ARMWinEH.h:224
llvm::ARM::WinEH::RuntimeFunctionARM64::BeginAddress
const support::ulittle32_t BeginAddress
Definition: ARMWinEH.h:226
llvm::ARM::WinEH::RuntimeFunction::R
bool R() const
Definition: ARMWinEH.h:156
llvm::ARM::WinEH::ExceptionDataRecord::FunctionLengthInBytesAArch64
uint32_t FunctionLengthInBytesAArch64() const
Definition: ARMWinEH.h:447
llvm::ARM::WinEH::ReturnType::RT_BW
@ RT_BW
16-bit branch
uint16_t
llvm::ExceptionHandling::WinEH
@ WinEH
Windows Exception Handling.
llvm::ARM::WinEH::EpilogueScope::ResARM
uint8_t ResARM() const
Definition: ARMWinEH.h:406
llvm::ARM::WinEH::RuntimeFunction::StackAdjust
uint16_t StackAdjust() const
Definition: ARMWinEH.h:178
llvm::makeArrayRef
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:475
llvm::ARM::WinEH::RuntimeFunctionARM64::ExceptionInformationRVA
uint32_t ExceptionInformationRVA() const
Definition: ARMWinEH.h:240
llvm::ARM::WinEH::StackAdjustment
uint16_t StackAdjustment(const RuntimeFunction &RF)
StackAdjustment - calculated stack adjustment in words.
Definition: ARMWinEH.h:199
llvm::ARM::WinEH::RuntimeFunctionARM64::RegI
uint8_t RegI() const
Definition: ARMWinEH.h:264
llvm::ARM::WinEH::EpilogueFolding
bool EpilogueFolding(const RuntimeFunction &RF)
Epilogue - pseudo-flag derived from Stack Adjust indicating that the epilogue has stack adjustment co...
Definition: ARMWinEH.h:193
llvm::ARM::WinEH::RuntimeFunctionARM64::FunctionLength
uint32_t FunctionLength() const
Definition: ARMWinEH.h:252
llvm::ARM::WinEH::ExceptionDataRecord::ExceptionDataRecord
ExceptionDataRecord(const support::ulittle32_t *Data, bool isAArch64)
Definition: ARMWinEH.h:436
llvm::ARM::WinEH::RuntimeFunctionARM64::Flag
RuntimeFunctionFlag Flag() const
Definition: ARMWinEH.h:236
Endian.h
llvm::ARM::WinEH::RuntimeFunction::H
bool H() const
Definition: ARMWinEH.h:144
llvm::ARM::WinEH::ExceptionDataRecord::X
bool X() const
Definition: ARMWinEH.h:455
llvm::ARM::WinEH::RuntimeFunctionARM64::RuntimeFunctionARM64
RuntimeFunctionARM64(const support::ulittle32_t BeginAddress, const support::ulittle32_t UnwindData)
Definition: ARMWinEH.h:232