Skip to content

Commit

Permalink
Merge pull request #43 from yamam/fix-mulhi
Browse files Browse the repository at this point in the history
LGTM!
  • Loading branch information
tmori authored Jul 2, 2024
2 parents f7f9c48 + 1720cb2 commit 7e5a333
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpu/cpu_exec/op_exec_arithm.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ int op_exec_mulhi(TargetCoreType *cpu)
if (reg2 >= CPU_GREG_NUM) {
return -1;
}
result = op_mulhi(&cpu->reg, imm_data, cpu->reg.r[reg1]);
result = op_mulhi(&cpu->reg, imm_data, (sint32)((sint16)cpu->reg.r[reg1]));
DBG_PRINT((DBG_EXEC_OP_BUF(), DBG_EXEC_OP_BUF_LEN(), "0x%x: MULHI imm16(%d),r%d(%d) r%d(%d):%d\n", cpu->reg.pc, imm_data, reg1, cpu->reg.r[reg1], reg2, cpu->reg.r[reg2], result));

cpu->reg.r[reg2] = result;
Expand Down

0 comments on commit 7e5a333

Please sign in to comment.