LLDB mainline
RegisterInfos_mips64.h
Go to the documentation of this file.
1//===-- RegisterInfos_mips64.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#include <cstddef>
10
11#include "lldb/Core/dwarf.h"
12#include "llvm/Support/Compiler.h"
13
14#ifdef DECLARE_REGISTER_INFOS_MIPS64_STRUCT
15
16// Computes the offset of the given GPR in the user data area.
17#define GPR_OFFSET(regname) (LLVM_EXTENSION offsetof(GPR_freebsd_mips, regname))
18
19// Computes the offset of the given FPR in the extended data area.
20#define FPR_OFFSET(regname) \
21 (sizeof(GPR_freebsd_mips) + \
22 LLVM_EXTENSION offsetof(FPR_freebsd_mips, regname))
23
24// RegisterKind: EHFrame, DWARF, Generic, Process Plugin, LLDB
25
26// Note that the size and offset will be updated by platform-specific classes.
27#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \
28 { \
29 #reg, alt, sizeof(((GPR_freebsd_mips *) 0)->reg), \
30 GPR_OFFSET(reg), eEncodingUint, eFormatHex, \
31 {kind1, kind2, kind3, kind4, \
32 gpr_##reg##_mips64 }, \
33 NULL, NULL, NULL, \
34 }
35
36#define DEFINE_FPR(reg, alt, kind1, kind2, kind3) \
37 { \
38 #reg, alt, sizeof(((FPR_freebsd_mips *) 0)->reg), \
39 FPR_OFFSET(reg), eEncodingIEEE754, eFormatFloat, \
40 {kind1, kind2, kind3, LLDB_INVALID_REGNUM, \
41 fpr_##reg##_mips64 }, \
42 NULL, NULL, NULL, \
43 }
44
45#define DEFINE_FPR_INFO(reg, alt, kind1, kind2, kind3) \
46 { \
47 #reg, alt, sizeof(((FPR_freebsd_mips *) 0)->reg), \
48 FPR_OFFSET(reg), eEncodingUint, eFormatHex, \
49 {kind1, kind2, kind3, LLDB_INVALID_REGNUM, \
50 fpr_##reg##_mips64 }, \
51 NULL, NULL, NULL, \
52 }
53
54
55static RegisterInfo g_register_infos_mips64[] = {
56// General purpose registers. EH_Frame, DWARF,
57// Generic, Process Plugin
128 DEFINE_GPR(badvaddr, nullptr, dwarf_bad_mips64, dwarf_bad_mips64,
138
139 DEFINE_FPR(f0, nullptr, dwarf_f0_mips64, dwarf_f0_mips64,
141 DEFINE_FPR(f1, nullptr, dwarf_f1_mips64, dwarf_f1_mips64,
143 DEFINE_FPR(f2, nullptr, dwarf_f2_mips64, dwarf_f2_mips64,
145 DEFINE_FPR(f3, nullptr, dwarf_f3_mips64, dwarf_f3_mips64,
147 DEFINE_FPR(f4, nullptr, dwarf_f4_mips64, dwarf_f4_mips64,
149 DEFINE_FPR(f5, nullptr, dwarf_f5_mips64, dwarf_f5_mips64,
151 DEFINE_FPR(f6, nullptr, dwarf_f6_mips64, dwarf_f6_mips64,
153 DEFINE_FPR(f7, nullptr, dwarf_f7_mips64, dwarf_f7_mips64,
155 DEFINE_FPR(f8, nullptr, dwarf_f8_mips64, dwarf_f8_mips64,
157 DEFINE_FPR(f9, nullptr, dwarf_f9_mips64, dwarf_f9_mips64,
159 DEFINE_FPR(f10, nullptr, dwarf_f10_mips64, dwarf_f10_mips64,
161 DEFINE_FPR(f11, nullptr, dwarf_f11_mips64, dwarf_f11_mips64,
163 DEFINE_FPR(f12, nullptr, dwarf_f12_mips64, dwarf_f12_mips64,
165 DEFINE_FPR(f13, nullptr, dwarf_f13_mips64, dwarf_f13_mips64,
167 DEFINE_FPR(f14, nullptr, dwarf_f14_mips64, dwarf_f14_mips64,
169 DEFINE_FPR(f15, nullptr, dwarf_f15_mips64, dwarf_f15_mips64,
171 DEFINE_FPR(f16, nullptr, dwarf_f16_mips64, dwarf_f16_mips64,
173 DEFINE_FPR(f17, nullptr, dwarf_f17_mips64, dwarf_f17_mips64,
175 DEFINE_FPR(f18, nullptr, dwarf_f18_mips64, dwarf_f18_mips64,
177 DEFINE_FPR(f19, nullptr, dwarf_f19_mips64, dwarf_f19_mips64,
179 DEFINE_FPR(f20, nullptr, dwarf_f20_mips64, dwarf_f20_mips64,
181 DEFINE_FPR(f21, nullptr, dwarf_f21_mips64, dwarf_f21_mips64,
183 DEFINE_FPR(f22, nullptr, dwarf_f22_mips64, dwarf_f22_mips64,
185 DEFINE_FPR(f23, nullptr, dwarf_f23_mips64, dwarf_f23_mips64,
187 DEFINE_FPR(f24, nullptr, dwarf_f24_mips64, dwarf_f24_mips64,
189 DEFINE_FPR(f25, nullptr, dwarf_f25_mips64, dwarf_f25_mips64,
191 DEFINE_FPR(f26, nullptr, dwarf_f26_mips64, dwarf_f26_mips64,
193 DEFINE_FPR(f27, nullptr, dwarf_f27_mips64, dwarf_f27_mips64,
195 DEFINE_FPR(f28, nullptr, dwarf_f28_mips64, dwarf_f28_mips64,
197 DEFINE_FPR(f29, nullptr, dwarf_f29_mips64, dwarf_f29_mips64,
199 DEFINE_FPR(f30, nullptr, dwarf_f30_mips64, dwarf_f30_mips64,
201 DEFINE_FPR(f31, nullptr, dwarf_f31_mips64, dwarf_f31_mips64,
203 DEFINE_FPR_INFO(fcsr, nullptr, dwarf_fcsr_mips64, dwarf_fcsr_mips64,
205 DEFINE_FPR_INFO(fir, nullptr, dwarf_fir_mips64, dwarf_fir_mips64,
207};
208
209static_assert((sizeof(g_register_infos_mips64) /
210 sizeof(g_register_infos_mips64[0])) == k_num_registers_mips64,
211 "g_register_infos_mips64 has wrong number of register infos");
212
213#undef DEFINE_GPR
214#undef DEFINE_GPR_INFO
215#undef DEFINE_FPR
216#undef DEFINE_FPR_INFO
217#undef DEFINE_MSA
218#undef DEFINE_MSA_INFO
219#undef GPR_OFFSET
220#undef FPR_OFFSET
221#undef MSA_OFFSET
222
223#endif // DECLARE_REGISTER_INFOS_MIPS64_STRUCT
static const RegisterInfo g_register_infos_mips64[]
#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4)
@ dwarf_f12_mips64
@ dwarf_f25_mips64
@ dwarf_f28_mips64
@ dwarf_r1_mips64
@ dwarf_fcsr_mips64
@ dwarf_f8_mips64
@ dwarf_gp_mips64
@ dwarf_f1_mips64
@ dwarf_r7_mips64
@ dwarf_f6_mips64
@ dwarf_f19_mips64
@ dwarf_f20_mips64
@ dwarf_sp_mips64
@ dwarf_r13_mips64
@ dwarf_r30_mips64
@ dwarf_lo_mips64
@ dwarf_f17_mips64
@ dwarf_f2_mips64
@ dwarf_f5_mips64
@ dwarf_f3_mips64
@ dwarf_f14_mips64
@ dwarf_f26_mips64
@ dwarf_f7_mips64
@ dwarf_r8_mips64
@ dwarf_f18_mips64
@ dwarf_sr_mips64
@ dwarf_hi_mips64
@ dwarf_f31_mips64
@ dwarf_r19_mips64
@ dwarf_bad_mips64
@ dwarf_dummy_mips64
@ dwarf_f4_mips64
@ dwarf_r3_mips64
@ dwarf_r18_mips64
@ dwarf_f30_mips64
@ dwarf_f15_mips64
@ dwarf_r27_mips64
@ dwarf_r5_mips64
@ dwarf_cause_mips64
@ dwarf_r4_mips64
@ dwarf_f22_mips64
@ dwarf_r20_mips64
@ dwarf_r11_mips64
@ dwarf_r21_mips64
@ dwarf_r22_mips64
@ dwarf_ic_mips64
@ dwarf_f13_mips64
@ dwarf_r6_mips64
@ dwarf_pc_mips64
@ dwarf_f9_mips64
@ dwarf_f10_mips64
@ dwarf_f23_mips64
@ dwarf_r10_mips64
@ dwarf_f21_mips64
@ dwarf_f11_mips64
@ dwarf_f24_mips64
@ dwarf_f29_mips64
@ dwarf_f27_mips64
@ dwarf_f16_mips64
@ dwarf_r24_mips64
@ dwarf_r9_mips64
@ dwarf_r23_mips64
@ dwarf_r14_mips64
@ dwarf_fir_mips64
@ dwarf_r26_mips64
@ dwarf_f0_mips64
@ dwarf_r2_mips64
@ dwarf_r12_mips64
@ dwarf_r17_mips64
@ dwarf_r25_mips64
@ dwarf_r15_mips64
@ dwarf_r16_mips64
@ dwarf_ra_mips64
@ dwarf_zero_mips64
#define LLDB_REGNUM_GENERIC_RA
Definition: lldb-defines.h:59
#define LLDB_REGNUM_GENERIC_ARG8
Definition: lldb-defines.h:75
#define LLDB_REGNUM_GENERIC_ARG6
Definition: lldb-defines.h:71
#define LLDB_REGNUM_GENERIC_SP
Definition: lldb-defines.h:57
#define LLDB_REGNUM_GENERIC_ARG4
Definition: lldb-defines.h:67
#define LLDB_REGNUM_GENERIC_ARG3
Definition: lldb-defines.h:65
#define LLDB_REGNUM_GENERIC_ARG1
Definition: lldb-defines.h:61
#define LLDB_REGNUM_GENERIC_ARG7
Definition: lldb-defines.h:73
#define LLDB_REGNUM_GENERIC_FLAGS
Definition: lldb-defines.h:60
#define LLDB_INVALID_REGNUM
Definition: lldb-defines.h:87
#define LLDB_REGNUM_GENERIC_ARG2
Definition: lldb-defines.h:63
#define LLDB_REGNUM_GENERIC_PC
Definition: lldb-defines.h:56
#define LLDB_REGNUM_GENERIC_FP
Definition: lldb-defines.h:58
#define LLDB_REGNUM_GENERIC_ARG5
Definition: lldb-defines.h:69