guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 56/437: fix i386 floating-point sub(a,0,a)


From: Andy Wingo
Subject: [Guile-commits] 56/437: fix i386 floating-point sub(a,0,a)
Date: Mon, 2 Jul 2018 05:13:45 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 950b2cefe9d9a18c16e87f30fd49c1e30e7a95aa
Author: Paolo Bonzini <address@hidden>
Date:   Sat Jan 5 15:05:46 2008 +0000

    fix i386 floating-point sub(a,0,a)
    
    2008-01-05  Paolo Bonzini  <address@hidden>
    
        * lightning/i386/fp-32.h: Fix sub(a,0,a).
        * lightning/tests/3to2.c: Add new testcases.
        * lightning/tests/3to2.ok: Add new testcases.
    
    git-archimport-id: address@hidden/lightning--stable--1.2--patch-61
---
 ChangeLog              | 6 ++++++
 lightning/i386/fp-32.h | 6 ++++--
 tests/3to2.c           | 8 ++++++++
 tests/3to2.ok          | 6 ++++++
 4 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 63ea188..a7e8841 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-01-05  Paolo Bonzini  <address@hidden>
+
+       * lightning/i386/fp-32.h: Fix sub(a,0,a).
+       * lightning/tests/3to2.c: Add new testcases.
+       * lightning/tests/3to2.ok: Add new testcases.
+
 2008-01-02  Paolo Bonzini  <address@hidden>
 
        * lightning/i386/fp-32.h: Fix sub(a,b,a) with a ~= JIT_FPR0.
diff --git a/lightning/i386/fp-32.h b/lightning/i386/fp-32.h
index 362c955..b6cd9fd 100644
--- a/lightning/i386/fp-32.h
+++ b/lightning/i386/fp-32.h
@@ -7,7 +7,7 @@
 
 /***********************************************************************
  *
- * Copyright 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+ * Copyright 2000, 2001, 2002, 2004, 2008 Free Software Foundation, Inc.
  * Written by Paolo Bonzini.
  *
  * This file is part of GNU lightning.
@@ -63,7 +63,9 @@
           ((s2) == 0 ? opr(0, (rd))                    \
            : (s2) == (s1) ? jit_fxch((rd), op(0, 0))   \
            : jit_fxch((rd), op((s2), 0)))              \
-        : (rd) == (s2) ? jit_fxch((s2), opr((s1), 0))  \
+        : (rd) == (s2) ?                              \
+         ((s1) == 0 ? op(0, (rd))                     \
+          : jit_fxch((rd), opr((s1), 0)))             \
         : (FLDr (s1), op((s2)+1, 0), FSTPr((rd)+1)))
 
 #define jit_addr_d(rd,s1,s2)    jit_fp_binary((rd),(s1),(s2),FADDrr,FADDrr)
diff --git a/tests/3to2.c b/tests/3to2.c
index b829d84..cc50767 100644
--- a/tests/3to2.c
+++ b/tests/3to2.c
@@ -114,6 +114,10 @@ main ()
   test_double (JIT_FPR3, JIT_FPR1, JIT_FPR3);
   test_double (JIT_FPR3, JIT_FPR1, JIT_FPR2);
 
+  test_double (JIT_FPR3, JIT_FPR0, JIT_FPR0);
+  test_double (JIT_FPR3, JIT_FPR0, JIT_FPR3);
+  test_double (JIT_FPR3, JIT_FPR3, JIT_FPR0);
+
   test_int (JIT_R0, JIT_R0, JIT_R0);
   test_int (JIT_R0, JIT_R0, JIT_R1);
   test_int (JIT_R0, JIT_R1, JIT_R0);
@@ -124,6 +128,10 @@ main ()
   test_int (JIT_V0, JIT_R1, JIT_V0);
   test_int (JIT_V0, JIT_R1, JIT_R2);
 
+  test_int (JIT_V0, JIT_R0, JIT_R0);
+  test_int (JIT_V0, JIT_R0, JIT_V0);
+  test_int (JIT_V0, JIT_V0, JIT_R0);
+
   return 0;
 }
 #else
diff --git a/tests/3to2.ok b/tests/3to2.ok
index 8eec0b6..e97e0fc 100644
--- a/tests/3to2.ok
+++ b/tests/3to2.ok
@@ -9,8 +9,14 @@
 0 0
 1 1
 1 1
+0 0
+1 1
+1 1
 1 1
 0 0
 1 1
 1 1
 1 1
+0 0
+1 1
+1 1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]