forked from OSchip/llvm-project
[LLDB][ARM] Remove unused LoadPseudoRegistersFromFrame function
https://reviews.llvm.org/D131658 identified a bug in this and turns out it's not used anywhere. Reviewed By: JDevlieghere, clayborg Differential Revision: https://reviews.llvm.org/D131664
This commit is contained in:
parent
0b90e136ee
commit
662c1c2881
lldb/source/Plugins/Instruction/ARM
|
@ -26,43 +26,6 @@ EmulationStateARM::EmulationStateARM() : m_vfp_regs(), m_memory() {
|
|||
|
||||
EmulationStateARM::~EmulationStateARM() = default;
|
||||
|
||||
bool EmulationStateARM::LoadPseudoRegistersFromFrame(StackFrame &frame) {
|
||||
RegisterContext *reg_ctx = frame.GetRegisterContext().get();
|
||||
bool success = true;
|
||||
uint32_t reg_num;
|
||||
|
||||
for (int i = dwarf_r0; i < dwarf_r0 + 17; ++i) {
|
||||
reg_num =
|
||||
reg_ctx->ConvertRegisterKindToRegisterNumber(eRegisterKindDWARF, i);
|
||||
const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex(reg_num);
|
||||
RegisterValue reg_value;
|
||||
if (reg_ctx->ReadRegister(reg_info, reg_value)) {
|
||||
m_gpr[i - dwarf_r0] = reg_value.GetAsUInt32();
|
||||
} else
|
||||
success = false;
|
||||
}
|
||||
|
||||
for (int i = dwarf_d0; i < dwarf_d0 + 32; ++i) {
|
||||
reg_num =
|
||||
reg_ctx->ConvertRegisterKindToRegisterNumber(eRegisterKindDWARF, i);
|
||||
RegisterValue reg_value;
|
||||
const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoAtIndex(reg_num);
|
||||
|
||||
if (reg_ctx->ReadRegister(reg_info, reg_value)) {
|
||||
uint64_t value = reg_value.GetAsUInt64();
|
||||
uint32_t idx = i - dwarf_d0;
|
||||
if (idx < 16) {
|
||||
m_vfp_regs.s_regs[idx * 2] = (uint32_t)value;
|
||||
m_vfp_regs.s_regs[idx * 2 + 1] = (uint32_t)(value >> 32);
|
||||
} else
|
||||
m_vfp_regs.d_regs[idx - 16] = value;
|
||||
} else
|
||||
success = false;
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
bool EmulationStateARM::StorePseudoRegisterValue(uint32_t reg_num,
|
||||
uint64_t value) {
|
||||
if (reg_num <= dwarf_cpsr)
|
||||
|
|
|
@ -32,8 +32,6 @@ public:
|
|||
|
||||
void ClearPseudoMemory();
|
||||
|
||||
bool LoadPseudoRegistersFromFrame(lldb_private::StackFrame &frame);
|
||||
|
||||
bool LoadStateFromDictionary(lldb_private::OptionValueDictionary *test_data);
|
||||
|
||||
bool CompareState(EmulationStateARM &other_state,
|
||||
|
|
Loading…
Reference in New Issue