LLVM
8.0.1
include
llvm
Support
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
36
EXIDX_CANTUNWIND
= 0x1
37
};
38
39
/// ARM-defined frame unwinding opcodes
40
enum
UnwindOpcodes
{
41
// Format: 00xxxxxx
42
// Purpose: vsp = vsp + ((x << 2) + 4)
43
UNWIND_OPCODE_INC_VSP
= 0x00,
44
45
// Format: 01xxxxxx
46
// Purpose: vsp = vsp - ((x << 2) + 4)
47
UNWIND_OPCODE_DEC_VSP
= 0x40,
48
49
// Format: 10000000 00000000
50
// Purpose: refuse to unwind
51
UNWIND_OPCODE_REFUSE
= 0x8000,
52
53
// Format: 1000xxxx xxxxxxxx
54
// Purpose: pop r[15:12], r[11:4]
55
// Constraint: x != 0
56
UNWIND_OPCODE_POP_REG_MASK_R4
= 0x8000,
57
58
// Format: 1001xxxx
59
// Purpose: vsp = r[x]
60
// Constraint: x != 13 && x != 15
61
UNWIND_OPCODE_SET_VSP
= 0x90,
62
63
// Format: 10100xxx
64
// Purpose: pop r[(4+x):4]
65
UNWIND_OPCODE_POP_REG_RANGE_R4
= 0xa0,
66
67
// Format: 10101xxx
68
// Purpose: pop r14, r[(4+x):4]
69
UNWIND_OPCODE_POP_REG_RANGE_R4_R14
= 0xa8,
70
71
// Format: 10110000
72
// Purpose: finish
73
UNWIND_OPCODE_FINISH
= 0xb0,
74
75
// Format: 10110001 0000xxxx
76
// Purpose: pop r[3:0]
77
// Constraint: x != 0
78
UNWIND_OPCODE_POP_REG_MASK
= 0xb100,
79
80
// Format: 10110010 x(uleb128)
81
// Purpose: vsp = vsp + ((x << 2) + 0x204)
82
UNWIND_OPCODE_INC_VSP_ULEB128
= 0xb2,
83
84
// Format: 10110011 xxxxyyyy
85
// Purpose: pop d[(x+y):x]
86
UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDX
= 0xb300,
87
88
// Format: 10111xxx
89
// Purpose: pop d[(8+x):8]
90
UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDX_D8
= 0xb8,
91
92
// Format: 11000xxx
93
// Purpose: pop wR[(10+x):10]
94
UNWIND_OPCODE_POP_WIRELESS_MMX_REG_RANGE_WR10
= 0xc0,
95
96
// Format: 11000110 xxxxyyyy
97
// Purpose: pop wR[(x+y):x]
98
UNWIND_OPCODE_POP_WIRELESS_MMX_REG_RANGE
= 0xc600,
99
100
// Format: 11000111 0000xxxx
101
// Purpose: pop wCGR[3:0]
102
// Constraint: x != 0
103
UNWIND_OPCODE_POP_WIRELESS_MMX_REG_MASK
= 0xc700,
104
105
// Format: 11001000 xxxxyyyy
106
// Purpose: pop d[(16+x+y):(16+x)]
107
UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDD_D16
= 0xc800,
108
109
// Format: 11001001 xxxxyyyy
110
// Purpose: pop d[(x+y):x]
111
UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDD
= 0xc900,
112
113
// Format: 11010xxx
114
// Purpose: pop d[(8+x):8]
115
UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDD_D8
= 0xd0
116
};
117
118
/// ARM-defined Personality Routine Index
119
enum
PersonalityRoutineIndex
{
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.
124
AEABI_UNWIND_CPP_PR0
= 0,
125
AEABI_UNWIND_CPP_PR1
= 1,
126
AEABI_UNWIND_CPP_PR2
= 2,
127
128
NUM_PERSONALITY_INDEX
129
};
130
}
131
}
132
}
133
134
#endif
llvm::ARM::EHABI::UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDX
Definition:
ARMEHABI.h:86
llvm::ARM::EHABI::UNWIND_OPCODE_SET_VSP
Definition:
ARMEHABI.h:61
llvm::ARM::EHABI::UNWIND_OPCODE_DEC_VSP
Definition:
ARMEHABI.h:47
llvm::ARM::EHABI::UNWIND_OPCODE_POP_REG_RANGE_R4_R14
Definition:
ARMEHABI.h:69
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:24
llvm::ARM::EHABI::UNWIND_OPCODE_INC_VSP
Definition:
ARMEHABI.h:43
llvm::ARM::EHABI::AEABI_UNWIND_CPP_PR0
Definition:
ARMEHABI.h:124
llvm::ARM::EHABI::UNWIND_OPCODE_POP_REG_MASK
Definition:
ARMEHABI.h:78
llvm::ARM::EHABI::UNWIND_OPCODE_POP_WIRELESS_MMX_REG_RANGE_WR10
Definition:
ARMEHABI.h:94
llvm::ARM::EHABI::PersonalityRoutineIndex
PersonalityRoutineIndex
ARM-defined Personality Routine Index.
Definition:
ARMEHABI.h:119
llvm::ARM::EHABI::UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDX_D8
Definition:
ARMEHABI.h:90
llvm::ARM::EHABI::UNWIND_OPCODE_POP_WIRELESS_MMX_REG_MASK
Definition:
ARMEHABI.h:103
llvm::ARM::EHABI::UNWIND_OPCODE_FINISH
Definition:
ARMEHABI.h:73
llvm::ARM::EHABI::NUM_PERSONALITY_INDEX
Definition:
ARMEHABI.h:128
llvm::ARM::EHABI::EHT_GENERIC
Definition:
ARMEHABI.h:30
llvm::ARM::EHABI::UNWIND_OPCODE_POP_REG_MASK_R4
Definition:
ARMEHABI.h:56
llvm::ARM::EHABI::AEABI_UNWIND_CPP_PR1
Definition:
ARMEHABI.h:125
llvm::ARM::EHABI::UNWIND_OPCODE_REFUSE
Definition:
ARMEHABI.h:51
llvm::ARM::EHABI::UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDD_D16
Definition:
ARMEHABI.h:107
llvm::ARM::EHABI::EHTEntryKind
EHTEntryKind
ARM exception handling table entry kinds.
Definition:
ARMEHABI.h:29
llvm::ARM::EHABI::UNWIND_OPCODE_POP_REG_RANGE_R4
Definition:
ARMEHABI.h:65
llvm::ARM::EHABI::UNWIND_OPCODE_POP_WIRELESS_MMX_REG_RANGE
Definition:
ARMEHABI.h:98
llvm::ARM::EHABI::UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDD_D8
Definition:
ARMEHABI.h:115
llvm::ARM::EHABI::UNWIND_OPCODE_INC_VSP_ULEB128
Definition:
ARMEHABI.h:82
llvm::ARM::EHABI::EXIDX_CANTUNWIND
Special entry for the function never unwind.
Definition:
ARMEHABI.h:36
llvm::ARM::EHABI::UNWIND_OPCODE_POP_VFP_REG_RANGE_FSTMFDD
Definition:
ARMEHABI.h:111
llvm::ARM::EHABI::UnwindOpcodes
UnwindOpcodes
ARM-defined frame unwinding opcodes.
Definition:
ARMEHABI.h:40
llvm::ARM::EHABI::AEABI_UNWIND_CPP_PR2
Definition:
ARMEHABI.h:126
llvm::ARM::EHABI::EHT_COMPACT
Definition:
ARMEHABI.h:31
Generated on Sun Dec 20 2020 13:53:34 for LLVM by
1.8.13