summaryrefslogtreecommitdiff
path: root/src/core/arm/disassembler
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/arm/disassembler')
-rw-r--r--src/core/arm/disassembler/arm_disasm.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/core/arm/disassembler/arm_disasm.cpp b/src/core/arm/disassembler/arm_disasm.cpp
index f6d44d85a..aaf47b3f0 100644
--- a/src/core/arm/disassembler/arm_disasm.cpp
+++ b/src/core/arm/disassembler/arm_disasm.cpp
@@ -779,20 +779,12 @@ Opcode ARM_Disasm::Decode10(uint32_t insn) {
779 return OP_LDM; 779 return OP_LDM;
780 return OP_STM; 780 return OP_STM;
781 } 781 }
782 // Branch or Branch with link
783 uint8_t is_link = (insn >> 24) & 1;
784 uint32_t offset = insn & 0xffffff;
785 782
786 // Sign-extend the 24-bit offset 783 // Branch with link
787 if ((offset >> 23) & 1) 784 if ((insn >> 24) & 1)
788 offset |= 0xff000000; 785 return OP_BL;
789 786
790 // Pre-compute the left-shift and the prefetch offset 787 return OP_B;
791 offset <<= 2;
792 offset += 8;
793 if (is_link == 0)
794 return OP_B;
795 return OP_BL;
796} 788}
797 789
798Opcode ARM_Disasm::Decode11(uint32_t insn) { 790Opcode ARM_Disasm::Decode11(uint32_t insn) {