LLVM  14.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) ? ((Adjustment & 0x3) << 2) - 1 : 0;
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 
210 /// RuntimeFunctionARM64 - An entry in the table of procedure data (.pdata)
211 ///
212 /// 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
213 /// 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
214 /// +---------------------------------------------------------------+
215 /// | Function Start RVA |
216 /// +-----------------+---+-+-------+-----+---------------------+---+
217 /// | Frame Size |CR |H| RegI |RegF | Function Length |Flg|
218 /// +-----------------+---+-+-------+-----+---------------------+---+
219 ///
220 /// See https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling
221 /// for the full reference for this struct.
222 
224 public:
227 
229  : BeginAddress(Data[0]), UnwindData(Data[1]) {}
230 
234 
236  return RuntimeFunctionFlag(UnwindData & 0x3);
237  }
238 
241  "unpacked form required for this operation");
242  return (UnwindData & ~0x3);
243  }
244 
248  "packed form required for this operation");
249  return (UnwindData & ~0x3);
250  }
254  "packed form required for this operation");
255  return (((UnwindData & 0x00001ffc) >> 2) << 2);
256  }
257  uint8_t RegF() const {
260  "packed form required for this operation");
261  return ((UnwindData & 0x0000e000) >> 13);
262  }
263  uint8_t RegI() const {
266  "packed form required for this operation");
267  return ((UnwindData & 0x000f0000) >> 16);
268  }
269  bool H() const {
272  "packed form required for this operation");
273  return ((UnwindData & 0x00100000) >> 20);
274  }
275  uint8_t CR() const {
278  "packed form required for this operation");
279  return ((UnwindData & 0x600000) >> 21);
280  }
281  uint16_t FrameSize() const {
284  "packed form required for this operation");
285  return ((UnwindData & 0xff800000) >> 23);
286  }
287 };
288 
289 /// ExceptionDataRecord - An entry in the table of exception data (.xdata)
290 ///
291 /// The format on ARM is:
292 ///
293 /// 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
294 /// 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
295 /// +-------+---------+-+-+-+---+-----------------------------------+
296 /// | C Wrd | Epi Cnt |F|E|X|Ver| Function Length |
297 /// +-------+--------+'-'-'-'---'---+-------------------------------+
298 /// | Reserved |Ex. Code Words| (Extended Epilogue Count) |
299 /// +-------+--------+--------------+-------------------------------+
300 ///
301 /// The format on ARM64 is:
302 ///
303 /// 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
304 /// 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
305 /// +---------+---------+-+-+---+-----------------------------------+
306 /// | C Wrd | Epi Cnt |E|X|Ver| Function Length |
307 /// +---------+------+--'-'-'---'---+-------------------------------+
308 /// | Reserved |Ex. Code Words| (Extended Epilogue Count) |
309 /// +-------+--------+--------------+-------------------------------+
310 ///
311 /// Function Length : 18-bit field indicating the total length of the function
312 /// in bytes divided by 2. If a function is larger than
313 /// 512KB, then multiple pdata and xdata records must be used.
314 /// Vers : 2-bit field describing the version of the remaining structure. Only
315 /// version 0 is currently defined (values 1-3 are not permitted).
316 /// X : 1-bit field indicating the presence of exception data
317 /// E : 1-bit field indicating that the single epilogue is packed into the
318 /// header
319 /// F : 1-bit field indicating that the record describes a function fragment
320 /// (implies that no prologue is present, and prologue processing should be
321 /// skipped) (ARM only)
322 /// Epilogue Count : 5-bit field that differs in meaning based on the E field.
323 ///
324 /// If E is set, then this field specifies the index of the
325 /// first unwind code describing the (only) epilogue.
326 ///
327 /// Otherwise, this field indicates the number of exception
328 /// scopes. If more than 31 scopes exist, then this field and
329 /// the Code Words field must both be set to 0 to indicate that
330 /// an extension word is required.
331 /// Code Words : 4-bit (5-bit on ARM64) field that specifies the number of
332 /// 32-bit words needed to contain all the unwind codes. If more
333 /// than 15 words (31 words on ARM64) are required, then this field
334 /// and the Epilogue Count field must both be set to 0 to indicate
335 /// that an extension word is required.
336 /// Extended Epilogue Count, Extended Code Words :
337 /// Valid only if Epilog Count and Code Words are both
338 /// set to 0. Provides an 8-bit extended code word
339 /// count and 16-bits for epilogue count
340 ///
341 /// The epilogue scope format on ARM is:
342 ///
343 /// 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
344 /// 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
345 /// +----------------+------+---+---+-------------------------------+
346 /// | Ep Start Idx | Cond |Res| Epilogue Start Offset |
347 /// +----------------+------+---+-----------------------------------+
348 ///
349 /// The epilogue scope format on ARM64 is:
350 ///
351 /// 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
352 /// 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
353 /// +-------------------+-------+---+-------------------------------+
354 /// | Ep Start Idx | Res | Epilogue Start Offset |
355 /// +-------------------+-------+-----------------------------------+
356 ///
357 /// If the E bit is unset in the header, the header is followed by a series of
358 /// epilogue scopes, which are sorted by their offset.
359 ///
360 /// Epilogue Start Offset: 18-bit field encoding the offset of epilogue relative
361 /// to the start of the function in bytes divided by two
362 /// Res : 2-bit field reserved for future expansion (must be set to 0)
363 /// Condition : (ARM only) 4-bit field providing the condition under which the
364 /// epilogue is executed. Unconditional epilogues should set this
365 /// field to 0xe. Epilogues must be entirely conditional or
366 /// unconditional, and in Thumb-2 mode. The epilogue begins with
367 /// the first instruction after the IT opcode.
368 /// Epilogue Start Index : 8-bit field indicating the byte index of the first
369 /// unwind code describing the epilogue
370 ///
371 /// 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
372 /// 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
373 /// +---------------+---------------+---------------+---------------+
374 /// | Unwind Code 3 | Unwind Code 2 | Unwind Code 1 | Unwind Code 0 |
375 /// +---------------+---------------+---------------+---------------+
376 ///
377 /// Following the epilogue scopes, the byte code describing the unwinding
378 /// follows. This is padded to align up to word alignment. Bytes are stored in
379 /// little endian.
380 ///
381 /// 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
382 /// 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
383 /// +---------------------------------------------------------------+
384 /// | Exception Handler RVA (requires X = 1) |
385 /// +---------------------------------------------------------------+
386 /// | (possibly followed by data required for exception handler) |
387 /// +---------------------------------------------------------------+
388 ///
389 /// If the X bit is set in the header, the unwind byte code is followed by the
390 /// exception handler information. This constants of one Exception Handler RVA
391 /// which is the address to the exception handler, followed immediately by the
392 /// variable length data associated with the exception handler.
393 ///
394 
397 
399  // Same for both ARM and AArch64.
401  return (ES & 0x0003ffff);
402  }
403 
404  // Different implementations for ARM and AArch64.
405  uint8_t ResARM() const {
406  return ((ES & 0x000c0000) >> 18);
407  }
408 
409  uint8_t ResAArch64() const {
410  return ((ES & 0x000f0000) >> 18);
411  }
412 
413  // Condition is only applicable to ARM.
414  uint8_t Condition() const {
415  return ((ES & 0x00f00000) >> 20);
416  }
417 
418  // Different implementations for ARM and AArch64.
419  uint8_t EpilogueStartIndexARM() const {
420  return ((ES & 0xff000000) >> 24);
421  }
422 
424  return ((ES & 0xffc00000) >> 22);
425  }
426 };
427 
428 struct ExceptionDataRecord;
429 inline size_t HeaderWords(const ExceptionDataRecord &XR);
430 
433  bool isAArch64;
434 
437 
439  return (Data[0] & 0x0003ffff);
440  }
441 
443  return FunctionLength() << 1;
444  }
445 
447  return FunctionLength() << 2;
448  }
449 
450  uint8_t Vers() const {
451  return (Data[0] & 0x000C0000) >> 18;
452  }
453 
454  bool X() const {
455  return ((Data[0] & 0x00100000) >> 20);
456  }
457 
458  bool E() const {
459  return ((Data[0] & 0x00200000) >> 21);
460  }
461 
462  bool F() const {
463  assert(!isAArch64 && "Fragments are only supported on ARMv7 WinEH");
464  return ((Data[0] & 0x00400000) >> 22);
465  }
466 
468  if (HeaderWords(*this) == 1) {
469  if (isAArch64)
470  return (Data[0] & 0x07C00000) >> 22;
471  return (Data[0] & 0x0f800000) >> 23;
472  }
473  return Data[1] & 0x0000ffff;
474  }
475 
476  uint8_t CodeWords() const {
477  if (HeaderWords(*this) == 1) {
478  if (isAArch64)
479  return (Data[0] & 0xf8000000) >> 27;
480  return (Data[0] & 0xf0000000) >> 28;
481  }
482  return (Data[1] & 0x00ff0000) >> 16;
483  }
484 
486  assert(E() == 0 && "epilogue scopes are only present when the E bit is 0");
487  size_t Offset = HeaderWords(*this);
488  return makeArrayRef(&Data[Offset], EpilogueCount());
489  }
490 
492  const size_t Offset = HeaderWords(*this)
493  + (E() ? 0 : EpilogueCount());
494  const uint8_t *ByteCode =
495  reinterpret_cast<const uint8_t *>(&Data[Offset]);
496  return makeArrayRef(ByteCode, CodeWords() * sizeof(uint32_t));
497  }
498 
500  assert(X() && "Exception Handler RVA is only valid if the X bit is set");
501  return Data[HeaderWords(*this) + (E() ? 0 : EpilogueCount()) + CodeWords()];
502  }
503 
505  assert(X() && "Exception Handler RVA is only valid if the X bit is set");
506  return Data[HeaderWords(*this) + (E() ? 0 : EpilogueCount()) + CodeWords() +
507  1];
508  }
509 };
510 
511 inline size_t HeaderWords(const ExceptionDataRecord &XR) {
512  if (XR.isAArch64)
513  return (XR.Data[0] & 0xffc00000) ? 1 : 2;
514  return (XR.Data[0] & 0xff800000) ? 1 : 2;
515 }
516 }
517 }
518 }
519 
520 #endif
llvm::ARM::WinEH::EpilogueScope::ES
const support::ulittle32_t ES
Definition: ARMWinEH.h:396
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 file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::ARM::WinEH::ReturnType::RT_POP
@ RT_POP
llvm::ARM::WinEH::RuntimeFunctionARM64::RegF
uint8_t RegF() const
Definition: ARMWinEH.h:257
llvm::support::detail::packed_endian_specific_integral
Definition: Endian.h:206
llvm::ARM::WinEH::ExceptionDataRecord::ExceptionHandlerParameter
uint32_t ExceptionHandlerParameter() const
Definition: ARMWinEH.h:504
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:395
llvm::ARM::WinEH::EpilogueScope::EpilogueStartOffset
uint32_t EpilogueStartOffset() const
Definition: ARMWinEH.h:400
llvm::ARM::WinEH::ExceptionDataRecord::Vers
uint8_t Vers() const
Definition: ARMWinEH.h:450
llvm::ARM::WinEH::ExceptionDataRecord::isAArch64
bool isAArch64
Definition: ARMWinEH.h:433
llvm::ARM::WinEH::RuntimeFunction::Flag
RuntimeFunctionFlag Flag() const
Definition: ARMWinEH.h:115
llvm::ARM::WinEH::RuntimeFunctionFlag::RFF_Unpacked
@ RFF_Unpacked
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::ARM::WinEH::ExceptionDataRecord::Data
const support::ulittle32_t * Data
Definition: ARMWinEH.h:432
llvm::ARM::WinEH::ExceptionDataRecord::UnwindByteCode
ArrayRef< uint8_t > UnwindByteCode() const
Definition: ARMWinEH.h:491
llvm::ARM::WinEH::EpilogueScope::ResAArch64
uint8_t ResAArch64() const
Definition: ARMWinEH.h:409
llvm::ARM::WinEH::RuntimeFunctionFlag::RFF_PackedFragment
@ RFF_PackedFragment
packed entry
llvm::ARM::WinEH::ExceptionDataRecord::EpilogueCount
uint16_t EpilogueCount() const
Definition: ARMWinEH.h:467
llvm::WinEH::EncodingType::ARM
@ ARM
Windows AXP64.
llvm::ARM::WinEH::RuntimeFunctionARM64::FrameSize
uint16_t FrameSize() const
Definition: ARMWinEH.h:281
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:275
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:423
llvm::ARM::WinEH::ExceptionDataRecord::F
bool F() const
Definition: ARMWinEH.h:462
llvm::ARM::WinEH::ExceptionDataRecord::FunctionLength
uint32_t FunctionLength() const
Definition: ARMWinEH.h:438
llvm::ARM::WinEH::RuntimeFunctionARM64::RuntimeFunctionARM64
RuntimeFunctionARM64(const support::ulittle32_t *Data)
Definition: ARMWinEH.h:228
llvm::ARM::WinEH::ExceptionDataRecord::ExceptionHandlerRVA
uint32_t ExceptionHandlerRVA() const
Definition: ARMWinEH.h:499
llvm::ARM::WinEH::ExceptionDataRecord::EpilogueScopes
ArrayRef< support::ulittle32_t > EpilogueScopes() const
Definition: ARMWinEH.h:485
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:226
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:476
llvm::ARM::WinEH::EpilogueScope::Condition
uint8_t Condition() const
Definition: ARMWinEH.h:414
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:54
llvm::ARM::WinEH::ExceptionDataRecord
Definition: ARMWinEH.h:431
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:442
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:398
llvm::ARM::WinEH::RuntimeFunctionARM64::PackedUnwindData
uint32_t PackedUnwindData() const
Definition: ARMWinEH.h:245
llvm::ARM::WinEH::RuntimeFunctionARM64::H
bool H() const
Definition: ARMWinEH.h:269
llvm::ARM::WinEH::ReturnType
ReturnType
Definition: ARMWinEH.h:25
llvm::ARM::WinEH::HeaderWords
size_t HeaderWords(const ExceptionDataRecord &XR)
Definition: ARMWinEH.h:511
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:419
uint32_t
llvm::ARM::WinEH::ExceptionDataRecord::E
bool E() const
Definition: ARMWinEH.h:458
llvm::ARM::WinEH::RuntimeFunctionARM64
RuntimeFunctionARM64 - An entry in the table of procedure data (.pdata)
Definition: ARMWinEH.h:223
llvm::ARM::WinEH::RuntimeFunctionARM64::BeginAddress
const support::ulittle32_t BeginAddress
Definition: ARMWinEH.h:225
llvm::ARM::WinEH::RuntimeFunction::R
bool R() const
Definition: ARMWinEH.h:156
llvm::ARM::WinEH::ExceptionDataRecord::FunctionLengthInBytesAArch64
uint32_t FunctionLengthInBytesAArch64() const
Definition: ARMWinEH.h:446
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:405
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:476
llvm::ARM::WinEH::RuntimeFunctionARM64::ExceptionInformationRVA
uint32_t ExceptionInformationRVA() const
Definition: ARMWinEH.h:239
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:263
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:251
llvm::ARM::WinEH::ExceptionDataRecord::ExceptionDataRecord
ExceptionDataRecord(const support::ulittle32_t *Data, bool isAArch64)
Definition: ARMWinEH.h:435
llvm::ARM::WinEH::RuntimeFunctionARM64::Flag
RuntimeFunctionFlag Flag() const
Definition: ARMWinEH.h:235
Endian.h
llvm::ARM::WinEH::SavedRegisterMask
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 (...
Definition: ARMWinEH.cpp:15
llvm::ARM::WinEH::RuntimeFunction::H
bool H() const
Definition: ARMWinEH.h:144
llvm::ARM::WinEH::ExceptionDataRecord::X
bool X() const
Definition: ARMWinEH.h:454
llvm::ARM::WinEH::RuntimeFunctionARM64::RuntimeFunctionARM64
RuntimeFunctionARM64(const support::ulittle32_t BeginAddress, const support::ulittle32_t UnwindData)
Definition: ARMWinEH.h:231