diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2013-03-31 14:33:16 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-04-26 23:02:40 +0200 |
commit | 8e7a6db96566fe4162edaeb3e8b62fc8004d1598 (patch) | |
tree | 3693d69998d3f6304f702f07bcb108ee3551c7fe /target-ppc | |
parent | 2cf3eb6df552cee74b52de9989e270b74e42847e (diff) |
target-ppc: fix nego and subf*o instructions
The overflow computation of nego and subf*o instructions has been broken
in commit ffe30937. Contrary to other targets, the instruction is subtract
from an not subtract on PowerPC.
This patch fixes the issue by using the correct argument in the xor
computation. Thanks to Peter Maydell for the hint.
With this change the PPC emulation passes the Gwenole Beauchesne
testsuite again.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 5e741d1ab4..294ab5809c 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -746,7 +746,7 @@ static inline void gen_op_arith_compute_ov(DisasContext *ctx, TCGv arg0, { TCGv t0 = tcg_temp_new(); - tcg_gen_xor_tl(cpu_ov, arg0, arg1); + tcg_gen_xor_tl(cpu_ov, arg0, arg2); tcg_gen_xor_tl(t0, arg1, arg2); if (sub) { tcg_gen_and_tl(cpu_ov, cpu_ov, t0); |