diff --git a/src/devices/cpu/arm/armdasm.cpp b/src/devices/cpu/arm/armdasm.cpp index 8da32648630..209eddde078 100644 --- a/src/devices/cpu/arm/armdasm.cpp +++ b/src/devices/cpu/arm/armdasm.cpp @@ -81,7 +81,7 @@ void arm_disassembler::WriteRegisterOperand1(std::ostream &stream, uint32_t opco if( opcode&0x10 ) /* Shift amount specified in bottom bits of RS */ { - util::stream_format(stream, ", %s R%d", pRegOp[shiftop], (opcode >> 7) & 0xf); + util::stream_format(stream, ", %s R%d", pRegOp[shiftop], (opcode >> 8) & 0xf); } else /* Shift amount immediate 5 bit unsigned integer */ { @@ -104,12 +104,7 @@ void arm_disassembler::WriteRegisterOperand1(std::ostream &stream, uint32_t opco void arm_disassembler::WriteBranchAddress(std::ostream &stream, uint32_t pc, uint32_t opcode) const { - opcode &= 0x00ffffff; - if( opcode&0x00800000 ) - { - opcode |= 0xff000000; /* sign-extend */ - } - pc += 8+4*opcode; + pc += 8+4*util::sext(opcode, 24); util::stream_format( stream, "&%07X", pc & 0x03ffffff ); } /* WriteBranchAddress */