1 //===-- lldb-riscv-register-enums.h -----------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_RISCV_REGISTER_ENUMS_H
10 #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_RISCV_REGISTER_ENUMS_H
12 // LLDB register codes (e.g. RegisterKind == eRegisterKindLLDB)
14 // Internal codes for all riscv registers.
16 // The same order as user_regs_struct in <asm/ptrace.h>
17 // note: these enum values are used as byte_offset
19 gpr_pc_riscv
= gpr_first_riscv
,
52 gpr_zero_riscv
= gpr_x0_riscv
,
53 gpr_ra_riscv
= gpr_x1_riscv
,
54 gpr_sp_riscv
= gpr_x2_riscv
,
55 gpr_gp_riscv
= gpr_x3_riscv
,
56 gpr_tp_riscv
= gpr_x4_riscv
,
57 gpr_t0_riscv
= gpr_x5_riscv
,
58 gpr_t1_riscv
= gpr_x6_riscv
,
59 gpr_t2_riscv
= gpr_x7_riscv
,
60 gpr_fp_riscv
= gpr_x8_riscv
,
61 gpr_s1_riscv
= gpr_x9_riscv
,
62 gpr_a0_riscv
= gpr_x10_riscv
,
63 gpr_a1_riscv
= gpr_x11_riscv
,
64 gpr_a2_riscv
= gpr_x12_riscv
,
65 gpr_a3_riscv
= gpr_x13_riscv
,
66 gpr_a4_riscv
= gpr_x14_riscv
,
67 gpr_a5_riscv
= gpr_x15_riscv
,
68 gpr_a6_riscv
= gpr_x16_riscv
,
69 gpr_a7_riscv
= gpr_x17_riscv
,
70 gpr_s2_riscv
= gpr_x18_riscv
,
71 gpr_s3_riscv
= gpr_x19_riscv
,
72 gpr_s4_riscv
= gpr_x20_riscv
,
73 gpr_s5_riscv
= gpr_x21_riscv
,
74 gpr_s6_riscv
= gpr_x22_riscv
,
75 gpr_s7_riscv
= gpr_x23_riscv
,
76 gpr_s8_riscv
= gpr_x24_riscv
,
77 gpr_s9_riscv
= gpr_x25_riscv
,
78 gpr_s10_riscv
= gpr_x26_riscv
,
79 gpr_s11_riscv
= gpr_x27_riscv
,
80 gpr_t3_riscv
= gpr_x28_riscv
,
81 gpr_t4_riscv
= gpr_x29_riscv
,
82 gpr_t5_riscv
= gpr_x30_riscv
,
83 gpr_t6_riscv
= gpr_x31_riscv
,
84 gpr_last_riscv
= gpr_x0_riscv
,
87 fpr_f0_riscv
= fpr_first_riscv
,
121 fpr_ft0_riscv
= fpr_f0_riscv
,
122 fpr_ft1_riscv
= fpr_f1_riscv
,
123 fpr_ft2_riscv
= fpr_f2_riscv
,
124 fpr_ft3_riscv
= fpr_f3_riscv
,
125 fpr_ft4_riscv
= fpr_f4_riscv
,
126 fpr_ft5_riscv
= fpr_f5_riscv
,
127 fpr_ft6_riscv
= fpr_f6_riscv
,
128 fpr_ft7_riscv
= fpr_f7_riscv
,
129 fpr_fs0_riscv
= fpr_f8_riscv
,
130 fpr_fs1_riscv
= fpr_f9_riscv
,
131 fpr_fa0_riscv
= fpr_f10_riscv
,
132 fpr_fa1_riscv
= fpr_f11_riscv
,
133 fpr_fa2_riscv
= fpr_f12_riscv
,
134 fpr_fa3_riscv
= fpr_f13_riscv
,
135 fpr_fa4_riscv
= fpr_f14_riscv
,
136 fpr_fa5_riscv
= fpr_f15_riscv
,
137 fpr_fa6_riscv
= fpr_f16_riscv
,
138 fpr_fa7_riscv
= fpr_f17_riscv
,
139 fpr_fs2_riscv
= fpr_f18_riscv
,
140 fpr_fs3_riscv
= fpr_f19_riscv
,
141 fpr_fs4_riscv
= fpr_f20_riscv
,
142 fpr_fs5_riscv
= fpr_f21_riscv
,
143 fpr_fs6_riscv
= fpr_f22_riscv
,
144 fpr_fs7_riscv
= fpr_f23_riscv
,
145 fpr_fs8_riscv
= fpr_f24_riscv
,
146 fpr_fs9_riscv
= fpr_f25_riscv
,
147 fpr_fs10_riscv
= fpr_f26_riscv
,
148 fpr_fs11_riscv
= fpr_f27_riscv
,
149 fpr_ft8_riscv
= fpr_f28_riscv
,
150 fpr_ft9_riscv
= fpr_f29_riscv
,
151 fpr_ft10_riscv
= fpr_f30_riscv
,
152 fpr_ft11_riscv
= fpr_f31_riscv
,
153 fpr_last_riscv
= fpr_fcsr_riscv
,
155 vpr_first_riscv
= 66,
156 vpr_v0_riscv
= vpr_first_riscv
,
188 vpr_last_riscv
= vpr_v31_riscv
,
190 k_num_registers_riscv
193 #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LLDB_RISCV_REGISTER_ENUMS_H