1//===-- lldb-loongarch-register-enums.h -------------------------*- 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 LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_LOONGARCH_REGISTER_ENUMS_H
10#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_LOONGARCH_REGISTER_ENUMS_H
11
12// LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
13
14// Internal codes for all loongarch registers.
15enum {
16 // The same order as user_regs_struct in <asm/ptrace.h>
17 // note: these enum values are used as byte_offset
18 gpr_first_loongarch = 0,
19 gpr_r0_loongarch = gpr_first_loongarch,
20 gpr_r1_loongarch,
21 gpr_r2_loongarch,
22 gpr_r3_loongarch,
23 gpr_r4_loongarch,
24 gpr_r5_loongarch,
25 gpr_r6_loongarch,
26 gpr_r7_loongarch,
27 gpr_r8_loongarch,
28 gpr_r9_loongarch,
29 gpr_r10_loongarch,
30 gpr_r11_loongarch,
31 gpr_r12_loongarch,
32 gpr_r13_loongarch,
33 gpr_r14_loongarch,
34 gpr_r15_loongarch,
35 gpr_r16_loongarch,
36 gpr_r17_loongarch,
37 gpr_r18_loongarch,
38 gpr_r19_loongarch,
39 gpr_r20_loongarch,
40 gpr_r21_loongarch,
41 gpr_r22_loongarch,
42 gpr_r23_loongarch,
43 gpr_r24_loongarch,
44 gpr_r25_loongarch,
45 gpr_r26_loongarch,
46 gpr_r27_loongarch,
47 gpr_r28_loongarch,
48 gpr_r29_loongarch,
49 gpr_r30_loongarch,
50 gpr_r31_loongarch,
51 gpr_orig_a0_loongarch,
52 gpr_pc_loongarch,
53 gpr_badv_loongarch,
54 gpr_reserved0_loongarch,
55 gpr_reserved1_loongarch,
56 gpr_reserved2_loongarch,
57 gpr_reserved3_loongarch,
58 gpr_reserved4_loongarch,
59 gpr_reserved5_loongarch,
60 gpr_reserved6_loongarch,
61 gpr_reserved7_loongarch,
62 gpr_reserved8_loongarch,
63 gpr_reserved9_loongarch,
64 gpr_last_loongarch = 44,
65
66 gpr_zero_loongarch = gpr_r0_loongarch,
67 gpr_ra_loongarch = gpr_r1_loongarch,
68 gpr_tp_loongarch = gpr_r2_loongarch,
69 gpr_sp_loongarch = gpr_r3_loongarch,
70 gpr_a0_loongarch = gpr_r4_loongarch,
71 gpr_a1_loongarch = gpr_r5_loongarch,
72 gpr_a2_loongarch = gpr_r6_loongarch,
73 gpr_a3_loongarch = gpr_r7_loongarch,
74 gpr_a4_loongarch = gpr_r8_loongarch,
75 gpr_a5_loongarch = gpr_r9_loongarch,
76 gpr_a6_loongarch = gpr_r10_loongarch,
77 gpr_a7_loongarch = gpr_r11_loongarch,
78 gpr_t0_loongarch = gpr_r12_loongarch,
79 gpr_t1_loongarch = gpr_r13_loongarch,
80 gpr_t2_loongarch = gpr_r14_loongarch,
81 gpr_t3_loongarch = gpr_r15_loongarch,
82 gpr_t4_loongarch = gpr_r16_loongarch,
83 gpr_t5_loongarch = gpr_r17_loongarch,
84 gpr_t6_loongarch = gpr_r18_loongarch,
85 gpr_t7_loongarch = gpr_r19_loongarch,
86 gpr_t8_loongarch = gpr_r20_loongarch,
87 gpr_fp_loongarch = gpr_r22_loongarch,
88 gpr_s0_loongarch = gpr_r23_loongarch,
89 gpr_s1_loongarch = gpr_r24_loongarch,
90 gpr_s2_loongarch = gpr_r25_loongarch,
91 gpr_s3_loongarch = gpr_r26_loongarch,
92 gpr_s4_loongarch = gpr_r27_loongarch,
93 gpr_s5_loongarch = gpr_r28_loongarch,
94 gpr_s6_loongarch = gpr_r29_loongarch,
95 gpr_s7_loongarch = gpr_r30_loongarch,
96 gpr_s8_loongarch = gpr_r31_loongarch,
97
98 fpr_first_loongarch = 45,
99 fpr_f0_loongarch = fpr_first_loongarch,
100 fpr_f1_loongarch,
101 fpr_f2_loongarch,
102 fpr_f3_loongarch,
103 fpr_f4_loongarch,
104 fpr_f5_loongarch,
105 fpr_f6_loongarch,
106 fpr_f7_loongarch,
107 fpr_f8_loongarch,
108 fpr_f9_loongarch,
109 fpr_f10_loongarch,
110 fpr_f11_loongarch,
111 fpr_f12_loongarch,
112 fpr_f13_loongarch,
113 fpr_f14_loongarch,
114 fpr_f15_loongarch,
115 fpr_f16_loongarch,
116 fpr_f17_loongarch,
117 fpr_f18_loongarch,
118 fpr_f19_loongarch,
119 fpr_f20_loongarch,
120 fpr_f21_loongarch,
121 fpr_f22_loongarch,
122 fpr_f23_loongarch,
123 fpr_f24_loongarch,
124 fpr_f25_loongarch,
125 fpr_f26_loongarch,
126 fpr_f27_loongarch,
127 fpr_f28_loongarch,
128 fpr_f29_loongarch,
129 fpr_f30_loongarch,
130 fpr_f31_loongarch,
131 fpr_fcc0_loongarch,
132 fpr_fcc1_loongarch,
133 fpr_fcc2_loongarch,
134 fpr_fcc3_loongarch,
135 fpr_fcc4_loongarch,
136 fpr_fcc5_loongarch,
137 fpr_fcc6_loongarch,
138 fpr_fcc7_loongarch,
139 fpr_fcsr_loongarch,
140 fpr_last_loongarch = fpr_fcsr_loongarch,
141
142 fpr_fa0_loongarch = fpr_f0_loongarch,
143 fpr_fa1_loongarch = fpr_f1_loongarch,
144 fpr_fa2_loongarch = fpr_f2_loongarch,
145 fpr_fa3_loongarch = fpr_f3_loongarch,
146 fpr_fa4_loongarch = fpr_f4_loongarch,
147 fpr_fa5_loongarch = fpr_f5_loongarch,
148 fpr_fa6_loongarch = fpr_f6_loongarch,
149 fpr_fa7_loongarch = fpr_f7_loongarch,
150 fpr_ft0_loongarch = fpr_f8_loongarch,
151 fpr_ft1_loongarch = fpr_f9_loongarch,
152 fpr_ft2_loongarch = fpr_f10_loongarch,
153 fpr_ft3_loongarch = fpr_f11_loongarch,
154 fpr_ft4_loongarch = fpr_f12_loongarch,
155 fpr_ft5_loongarch = fpr_f13_loongarch,
156 fpr_ft6_loongarch = fpr_f14_loongarch,
157 fpr_ft7_loongarch = fpr_f15_loongarch,
158 fpr_ft8_loongarch = fpr_f16_loongarch,
159 fpr_ft9_loongarch = fpr_f17_loongarch,
160 fpr_ft10_loongarch = fpr_f18_loongarch,
161 fpr_ft11_loongarch = fpr_f19_loongarch,
162 fpr_ft12_loongarch = fpr_f20_loongarch,
163 fpr_ft13_loongarch = fpr_f21_loongarch,
164 fpr_ft14_loongarch = fpr_f22_loongarch,
165 fpr_ft15_loongarch = fpr_f23_loongarch,
166 fpr_fs0_loongarch = fpr_f24_loongarch,
167 fpr_fs1_loongarch = fpr_f25_loongarch,
168 fpr_fs2_loongarch = fpr_f26_loongarch,
169 fpr_fs3_loongarch = fpr_f27_loongarch,
170 fpr_fs4_loongarch = fpr_f28_loongarch,
171 fpr_fs5_loongarch = fpr_f29_loongarch,
172 fpr_fs6_loongarch = fpr_f30_loongarch,
173 fpr_fs7_loongarch = fpr_f31_loongarch,
174
175 k_num_registers_loongarch
176};
177
178#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_LOONGARCH_REGISTER_ENUMS_H
179

source code of lldb/source/Plugins/Process/Utility/lldb-loongarch-register-enums.h