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.

Backports commit 4a18cd44f3c905d443c26e26bb9b09932606d1a3 from qemu
This commit is contained in:
Laurent Vivier 2018-03-01 08:59:40 -05:00 committed by Lioncash
parent 527c68f40e
commit 7055c38183
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1197,7 +1197,7 @@ DISAS_INSN(mulw)
SRC_EA(env, src, OS_WORD, sign, NULL); SRC_EA(env, src, OS_WORD, sign, NULL);
tcg_gen_mul_i32(tcg_ctx, tmp, tmp, src); tcg_gen_mul_i32(tcg_ctx, tmp, tmp, src);
tcg_gen_mov_i32(tcg_ctx, reg, tmp); tcg_gen_mov_i32(tcg_ctx, reg, tmp);
gen_logic_cc(s, tmp, OS_WORD); gen_logic_cc(s, tmp, OS_LONG);
} }
DISAS_INSN(divw) DISAS_INSN(divw)