diff options
author | Oxore <oxore@protonmail.com> | 2023-05-09 00:13:42 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-05-09 00:13:42 +0300 |
commit | 6ace370b059dad7b723ae402f61b7060a1aa82c6 (patch) | |
tree | c4a5f454824cdc95e238b7509ed44ad2e64e6d05 /disasm.cpp | |
parent | 2f2c8dbc006ec03e9887ab7a91f7cf97bb6ce53d (diff) |
Fix calculation of branch_addr in DBcc
Diffstat (limited to 'disasm.cpp')
-rw-r--r-- | disasm.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1324,7 +1324,8 @@ static void disasm_dbcc(DisasmNode &node, uint16_t instr, const DataBuffer &code Condition condition = static_cast<Condition>((instr >> 8) & 0xf); const char *mnemonic = dbcc_mnemonic_by_condition(condition); const int dn = (instr & 7); - const uint32_t branch_addr = static_cast<uint32_t>(node.offset + dispmt_raw); + const uint32_t branch_addr = static_cast<uint32_t>( + node.offset + dispmt_raw + kInstructionSizeStepBytes); node.branch_addr = branch_addr; node.has_branch_addr = true; const int32_t dispmt = dispmt_raw + kInstructionSizeStepBytes; |