diff options
author | Davide Italiano <davide@freebsd.org> | 2017-04-14 22:27:28 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2017-04-14 22:27:28 +0000 |
commit | 9cac9f65e1ac4d7ac574775610c952986e7b1e81 (patch) | |
tree | 78f3d6b1d158b7517f20bef8f934a9ef0e2d9b18 /source/Plugins/Instruction | |
parent | be16fe4b5d0c0934f176a230f3a8d082830a06b8 (diff) | |
download | lldb-9cac9f65e1ac4d7ac574775610c952986e7b1e81.tar.gz |
[ARM/Emulation] Remove an unneeded comparison and simplify. NFCI.
reg0 is always zero and comparison to an unsigned always yields
true.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@300375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source/Plugins/Instruction')
-rw-r--r-- | source/Plugins/Instruction/ARM/EmulationStateARM.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/Plugins/Instruction/ARM/EmulationStateARM.cpp b/source/Plugins/Instruction/ARM/EmulationStateARM.cpp index 7b10f8ffa..5e90965c1 100644 --- a/source/Plugins/Instruction/ARM/EmulationStateARM.cpp +++ b/source/Plugins/Instruction/ARM/EmulationStateARM.cpp @@ -66,7 +66,7 @@ bool EmulationStateARM::LoadPseudoRegistersFromFrame(StackFrame &frame) { bool EmulationStateARM::StorePseudoRegisterValue(uint32_t reg_num, uint64_t value) { - if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr)) + if (reg_num <= dwarf_cpsr) m_gpr[reg_num - dwarf_r0] = (uint32_t)value; else if ((dwarf_s0 <= reg_num) && (reg_num <= dwarf_s31)) { uint32_t idx = reg_num - dwarf_s0; @@ -89,7 +89,7 @@ uint64_t EmulationStateARM::ReadPseudoRegisterValue(uint32_t reg_num, uint64_t value = 0; success = true; - if ((dwarf_r0 <= reg_num) && (reg_num <= dwarf_cpsr)) + if (reg_num <= dwarf_cpsr) value = m_gpr[reg_num - dwarf_r0]; else if ((dwarf_s0 <= reg_num) && (reg_num <= dwarf_s31)) { uint32_t idx = reg_num - dwarf_s0; |