LLVM  10.0.0svn
ARMEHABI.h
Go to the documentation of this file.
1 //===--- ARMEHABI.h - ARM Exception Handling ABI ----------------*- 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 // This file defines the constants for the ARM unwind opcodes and exception
10 // handling table entry kinds.
11 //
12 // The enumerations and constants in this file reflect the ARM EHABI
13 // Specification as published by ARM.
14 //
15 // Exception Handling ABI for the ARM Architecture r2.09 - November 30, 2012
16 //
17 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
18 //
19 //===----------------------------------------------------------------------===//
20 
21 #ifndef LLVM_SUPPORT_ARMEHABI_H
22 #define LLVM_SUPPORT_ARMEHABI_H
23 
24 namespace llvm {
25 namespace ARM {
26 namespace EHABI {
27  /// ARM exception handling table entry kinds
28  enum EHTEntryKind {
29  EHT_GENERIC = 0x00,
30  EHT_COMPACT = 0x80
31  };
32 
33  enum {
34  /// Special entry for the function never unwind
36  };
37 
38  /// ARM-defined frame unwinding opcodes
40  // Format: 00xxxxxx
41  // Purpose: vsp = vsp + ((x << 2) + 4)
43 
44  // Format: 01xxxxxx
45  // Purpose: vsp = vsp - ((x << 2) + 4)
47 
48  // Format: 10000000 00000000
49  // Purpose: refuse to unwind
51 
52  // Format: 1000xxxx xxxxxxxx
53  // Purpose: pop r[15:12], r[11:4]
54  // Constraint: x != 0
56 
57  // Format: 1001xxxx
58  // Purpose: vsp = r[x]
59  // Constraint: x != 13 && x != 15
61 
62  // Format: 10100xxx
63  // Purpose: pop r[(4+x):4]
65 
66  // Format: 10101xxx
67  // Purpose: pop r14, r[(4+x):4]
69 
70  // Format: 10110000
71  // Purpose: finish
73 
74  // Format: 10110001 0000xxxx
75  // Purpose: pop r[3:0]
76  // Constraint: x != 0
78 
79  // Format: 10110010 x(uleb128)
80  // Purpose: vsp = vsp + ((x << 2) + 0x204)
82 
83  // Format: 10110011 xxxxyyyy
84  // Purpose: pop d[(x+y):x]
86 
87  // Format: 10111xxx
88  // Purpose: pop d[(8+x):8]
90 
91  // Format: 11000xxx
92  // Purpose: pop wR[(10+x):10]
94 
95  // Format: 11000110 xxxxyyyy
96  // Purpose: pop wR[(x+y):x]
98 
99  // Format: 11000111 0000xxxx
100  // Purpose: pop wCGR[3:0]
101  // Constraint: x != 0
103 
104  // Format: 11001000 xxxxyyyy
105  // Purpose: pop d[(16+x+y):(16+x)]
107 
108  // Format: 11001001 xxxxyyyy
109  // Purpose: pop d[(x+y):x]
111 
112  // Format: 11010xxx
113  // Purpose: pop d[(8+x):8]
115  };
116 
117  /// ARM-defined Personality Routine Index
119  // To make the exception handling table become more compact, ARM defined
120  // several personality routines in EHABI. There are 3 different
121  // personality routines in ARM EHABI currently. It is possible to have 16
122  // pre-defined personality routines at most.
126 
128  };
129 }
130 }
131 }
132 
133 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Special entry for the function never unwind.
Definition: ARMEHABI.h:35
PersonalityRoutineIndex
ARM-defined Personality Routine Index.
Definition: ARMEHABI.h:118
EHTEntryKind
ARM exception handling table entry kinds.
Definition: ARMEHABI.h:28
UnwindOpcodes
ARM-defined frame unwinding opcodes.
Definition: ARMEHABI.h:39