qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] target-ppc: fix nego and subf*o instructions
@ 2013-04-01  0:33 Aurelien Jarno
  2013-04-01  1:15 ` Richard Henderson
  2013-04-02  8:18 ` Alexander Graf
  0 siblings, 2 replies; 3+ messages in thread
From: Aurelien Jarno @ 2013-04-01  0:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexander Graf, Aurelien Jarno, Richard Henderson

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.

Cc: Alexander Graf <agraf@suse.de>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-ppc/translate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-ppc/translate.c b/target-ppc/translate.c
index 5e741d1..294ab58 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);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] target-ppc: fix nego and subf*o instructions
  2013-04-01  0:33 [Qemu-devel] [PATCH v2] target-ppc: fix nego and subf*o instructions Aurelien Jarno
@ 2013-04-01  1:15 ` Richard Henderson
  2013-04-02  8:18 ` Alexander Graf
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2013-04-01  1:15 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel, Alexander Graf

On 03/31/2013 05:33 PM, Aurelien Jarno wrote:
> 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.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  target-ppc/translate.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] target-ppc: fix nego and subf*o instructions
  2013-04-01  0:33 [Qemu-devel] [PATCH v2] target-ppc: fix nego and subf*o instructions Aurelien Jarno
  2013-04-01  1:15 ` Richard Henderson
@ 2013-04-02  8:18 ` Alexander Graf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Graf @ 2013-04-02  8:18 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel, Richard Henderson


On 01.04.2013, at 02:33, Aurelien Jarno wrote:

> 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.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Thanks, applied to ppc-next.

Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-02  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-01  0:33 [Qemu-devel] [PATCH v2] target-ppc: fix nego and subf*o instructions Aurelien Jarno
2013-04-01  1:15 ` Richard Henderson
2013-04-02  8:18 ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).