11#include "llvm/Support/Compiler.h"
14#ifdef DECLARE_REGISTER_INFOS_S390X_STRUCT
17#define GPR_OFFSET(num) (16 + 8 * num)
19#define ACR_OFFSET(num) (16 + 8 * 16 + 4 * num)
21#define FPR_OFFSET(num) (8 + 8 * num)
25#define DEFINE_GPR(name, size, offset, alt, generic) \
27 #name, alt, size, offset, eEncodingUint, eFormatHex, \
28 {dwarf_##name##_s390x, dwarf_##name##_s390x, generic, \
29 LLDB_INVALID_REGNUM, lldb_##name##_s390x }, \
33#define DEFINE_GPR_NODWARF(name, size, offset, alt, generic) \
35 #name, alt, size, offset, eEncodingUint, eFormatHex, \
36 {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, generic, \
37 LLDB_INVALID_REGNUM, lldb_##name##_s390x }, \
41#define DEFINE_FPR(name, size, offset) \
43 #name, NULL, size, offset, eEncodingUint, eFormatHex, \
44 {dwarf_##name##_s390x, dwarf_##name##_s390x, LLDB_INVALID_REGNUM, \
45 LLDB_INVALID_REGNUM, lldb_##name##_s390x }, \
49#define DEFINE_FPR_NODWARF(name, size, offset) \
51 #name, NULL, size, offset, eEncodingUint, eFormatHex, \
52 {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
53 LLDB_INVALID_REGNUM, lldb_##name##_s390x }, \
57static RegisterInfo g_register_infos_s390x[] = {
103 DEFINE_FPR_NODWARF(fpc, 4, 0),
106 DEFINE_GPR_NODWARF(orig_r2, 8, 16 + 16 * 8 + 16 * 4,
nullptr,
112static_assert((
sizeof(g_register_infos_s390x) /
113 sizeof(g_register_infos_s390x[0])) == k_num_registers_s390x,
114 "g_register_infos_s390x has wrong number of register infos");
120#undef DEFINE_GPR_NODWARF
122#undef DEFINE_FPR_NODWARF
#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4)
#define FPR_OFFSET(regname)
#define LLDB_REGNUM_GENERIC_SP
#define LLDB_REGNUM_GENERIC_ARG4
#define LLDB_REGNUM_GENERIC_ARG3
#define LLDB_REGNUM_GENERIC_ARG1
#define LLDB_REGNUM_GENERIC_FLAGS
#define LLDB_INVALID_REGNUM
#define LLDB_REGNUM_GENERIC_ARG2
#define LLDB_REGNUM_GENERIC_PC
#define LLDB_REGNUM_GENERIC_FP
#define LLDB_REGNUM_GENERIC_ARG5