LLVM  8.0.1
ARMEHABI.h
Go to the documentation of this file.
1 //===--- ARMEHABI.h - ARM Exception Handling ABI ----------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the constants for the ARM unwind opcodes and exception
11 // handling table entry kinds.
12 //
13 // The enumerations and constants in this file reflect the ARM EHABI
14 // Specification as published by ARM.
15 //
16 // Exception Handling ABI for the ARM Architecture r2.09 - November 30, 2012
17 //
18 // http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf
19 //
20 //===----------------------------------------------------------------------===//
21 
22 #ifndef LLVM_SUPPORT_ARMEHABI_H
23 #define LLVM_SUPPORT_ARMEHABI_H
24 
25 namespace llvm {
26 namespace ARM {
27 namespace EHABI {
28  /// ARM exception handling table entry kinds
29  enum EHTEntryKind {
30  EHT_GENERIC = 0x00,
31  EHT_COMPACT = 0x80
32  };
33 
34  enum {
35  /// Special entry for the function never unwind
37  };
38 
39  /// ARM-defined frame unwinding opcodes
41  // Format: 00xxxxxx
42  // Purpose: vsp = vsp + ((x << 2) + 4)
44 
45  // Format: 01xxxxxx
46  // Purpose: vsp = vsp - ((x << 2) + 4)
48 
49  // Format: 10000000 00000000
50  // Purpose: refuse to unwind
52 
53  // Format: 1000xxxx xxxxxxxx
54  // Purpose: pop r[15:12], r[11:4]
55  // Constraint: x != 0
57 
58  // Format: 1001xxxx
59  // Purpose: vsp = r[x]
60  // Constraint: x != 13 && x != 15
62 
63  // Format: 10100xxx
64  // Purpose: pop r[(4+x):4]
66 
67  // Format: 10101xxx
68  // Purpose: pop r14, r[(4+x):4]
70 
71  // Format: 10110000
72  // Purpose: finish
74 
75  // Format: 10110001 0000xxxx
76  // Purpose: pop r[3:0]
77  // Constraint: x != 0
79 
80  // Format: 10110010 x(uleb128)
81  // Purpose: vsp = vsp + ((x << 2) + 0x204)
83 
84  // Format: 10110011 xxxxyyyy
85  // Purpose: pop d[(x+y):x]
87 
88  // Format: 10111xxx
89  // Purpose: pop d[(8+x):8]
91 
92  // Format: 11000xxx
93  // Purpose: pop wR[(10+x):10]
95 
96  // Format: 11000110 xxxxyyyy
97  // Purpose: pop wR[(x+y):x]
99 
100  // Format: 11000111 0000xxxx
101  // Purpose: pop wCGR[3:0]
102  // Constraint: x != 0
104 
105  // Format: 11001000 xxxxyyyy
106  // Purpose: pop d[(16+x+y):(16+x)]
108 
109  // Format: 11001001 xxxxyyyy
110  // Purpose: pop d[(x+y):x]
112 
113  // Format: 11010xxx
114  // Purpose: pop d[(8+x):8]
116  };
117 
118  /// ARM-defined Personality Routine Index
120  // To make the exception handling table become more compact, ARM defined
121  // several personality routines in EHABI. There are 3 different
122  // personality routines in ARM EHABI currently. It is possible to have 16
123  // pre-defined personality routines at most.
127 
129  };
130 }
131 }
132 }
133 
134 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
PersonalityRoutineIndex
ARM-defined Personality Routine Index.
Definition: ARMEHABI.h:119
EHTEntryKind
ARM exception handling table entry kinds.
Definition: ARMEHABI.h:29
Special entry for the function never unwind.
Definition: ARMEHABI.h:36
UnwindOpcodes
ARM-defined frame unwinding opcodes.
Definition: ARMEHABI.h:40