14#include "llvm/Support/Compiler.h"
22#define GPR_OFFSET(idx) ((idx)*4)
23#define FPU_OFFSET(idx) ((idx)*4 + sizeof(RegisterInfoPOSIX_arm::GPR))
25 (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm::FPU, fpscr) + \
26 sizeof(RegisterInfoPOSIX_arm::GPR))
28 (sizeof(RegisterInfoPOSIX_arm::GPR) + sizeof(RegisterInfoPOSIX_arm::FPU))
29#define EXC_OFFSET(idx) \
30 ((idx) * 4 + sizeof(RegisterInfoPOSIX_arm::GPR) + \
31 sizeof(RegisterInfoPOSIX_arm::FPU) + sizeof(RegisterInfoPOSIX_arm::TLS))
32#define DBG_OFFSET(reg) \
33 ((LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm::DBG, reg) + \
34 sizeof(RegisterInfoPOSIX_arm::GPR) + sizeof(RegisterInfoPOSIX_arm::FPU) + \
35 sizeof(RegisterInfoPOSIX_arm::TLS) + sizeof(RegisterInfoPOSIX_arm::EXC)))
37#define DEFINE_DBG(reg, i) \
38 #reg, NULL, sizeof(((RegisterInfoPOSIX_arm::DBG *) NULL)->reg[i]), \
39 DBG_OFFSET(reg[i]), eEncodingUint, eFormatHex, \
40 {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
41 LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
44#define REG_CONTEXT_SIZE \
45 (sizeof(RegisterInfoPOSIX_arm::GPR) + sizeof(RegisterInfoPOSIX_arm::FPU) + \
46 sizeof(RegisterInfoPOSIX_arm::EXC))
49#define DECLARE_REGISTER_INFOS_ARM_STRUCT
51#undef DECLARE_REGISTER_INFOS_ARM_STRUCT
56 case llvm::Triple::arm:
57 return g_register_infos_arm;
59 assert(
false &&
"Unhandled target architecture.");
67 case llvm::Triple::arm:
68 return static_cast<uint32_t
>(
sizeof(g_register_infos_arm) /
69 sizeof(g_register_infos_arm[0]));
71 assert(
false &&
"Unhandled target architecture.");
99 "g_gpr_regnums_arm has wrong number of register infos");
147 "g_fpu_regnums_arm has wrong number of register infos");
156 "g_tls_regnums_arm has wrong number of register infos");
192 uint32_t reg_index)
const {
195 if (reg_index <= fpu_q15)
const size_t k_num_gpr_registers
const size_t k_num_fpr_registers
static const RegisterInfo * GetRegisterInfoPtr(const ArchSpec &target_arch)
static uint32_t GetRegisterInfoCount(const ArchSpec &target_arch)
static uint32_t GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch)
static const uint32_t g_fpu_regnums_arm[]
static const lldb_private::RegisterInfo * GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch)
static const uint32_t g_gpr_regnums_arm[]
static const RegisterSet g_reg_sets_arm[k_num_register_sets_with_tls]
static const uint32_t g_tls_regnums_arm[]
@ k_num_register_sets_with_tls
@ k_num_register_sets_without_tls
size_t GetRegisterSetCount() const override
size_t GetRegisterSetFromRegisterIndex(uint32_t reg_index) const override
size_t GetFPRSize() const override
uint32_t GetRegisterCount() const override
uint32_t m_register_info_count
RegisterInfoPOSIX_arm(const lldb_private::ArchSpec &target_arch, bool has_tls_reg=false)
const lldb_private::RegisterSet * GetRegisterSet(size_t reg_set) const override
size_t GetGPRSize() const override
const lldb_private::RegisterInfo * GetRegisterInfo() const override
const lldb_private::RegisterInfo * m_register_info_p
An architecture specification class.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
RegisterInfoAndSetInterface(const lldb_private::ArchSpec &target_arch)
#define LLDB_INVALID_REGNUM
A class that represents a running process on the host machine.
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.