target-m68k: fix muluw/mulsw
PATCH 1/1 target-m68k: fix muluw/mulsw
"The multiplier and multiplicand are both word operands, and the result is a long-word operand."
So compute flags on a long-word result, not on a word result.
Signed-off-by Laurent Vivier <[email protected]>
--- target-m68k/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target-m68k/translate.c +1 -1
@@ -1186,7 +1186,7 @@ DISAS_INSN(mulw)SRC_EA (env, src,OS_WORD , sign,NULL );tcg_gen_mul_i32 (tmp, tmp, src);tcg_gen_mov_i32 (reg, tmp); -gen_logic_cc (s, tmp,OS_WORD ); +gen_logic_cc (s, tmp,OS_LONG ); }DISAS_INSN (divw)
Signature · 1 line
2.7.4
Quoted 9 lines · Laurent Vivier
"The multiplier and multiplicand are both word operands, and the result is a long-word operand."
So compute flags on a long-word result, not on a word result.
Signed-off-by Laurent Vivier <[email protected]>--- target-m68k/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Richard Henderson <[email protected]>
r~