rv32emu
rv32emu copied to clipboard
jit: Incomplete `muldivmod`
Function muldivmod in src/jit_x64.c is incomplete:
/* Short circuit for imm == 0 */
if (!reg && imm == 0) {
assert(NULL);
if (div || mul) {
/* For division and multiplication, set result to zero. */
emit_alu32(state, 0x31, dst, dst);
} else {
/* For modulo, set result to dividend. */
emit_mov(state, dst, dst);
}
return;
}
When imm equals to zero, there is no chance to resume the execution.