guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 154/437: Correct test cases to work with x87 in ix86.


From: Andy Wingo
Subject: [Guile-commits] 154/437: Correct test cases to work with x87 in ix86.
Date: Mon, 2 Jul 2018 05:14:08 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit 0e83b52d49086de1f74ca3906136aa4475b0d520
Author: pcpa <address@hidden>
Date:   Fri Dec 14 17:39:29 2012 -0200

    Correct test cases to work with x87 in ix86.
    
        * lib/jit_x86-x87.c, lib/jit_x86.c: Correct test cases in ix86
        when using the x87 coprocessor instead of sse2+.
---
 ChangeLog         | 5 +++++
 lib/jit_x86-x87.c | 8 ++++----
 lib/jit_x86.c     | 2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b0802dd..9d7c4e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2012-12-14 Paulo Andrade <address@hidden>
 
+       * lib/jit_x86-x87.c, lib/jit_x86.c: Correct test cases in ix86
+       when using the x87 coprocessor instead of sse2+.
+
+2012-12-14 Paulo Andrade <address@hidden>
+
        * include/lightning.h, include/lightning/jit_private.h,
        lib/jit_arm.c, lib/jit_mips.c, lib/jit_ppc.c, lib/jit_x86.c,
        lib/lightning.c: Make jit_ellipsis implementation not
diff --git a/lib/jit_x86-x87.c b/lib/jit_x86-x87.c
index 5ad905d..579c661 100644
--- a/lib/jit_x86-x87.c
+++ b/lib/jit_x86-x87.c
@@ -442,7 +442,7 @@ _x87_addr_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t 
r1, jit_int32_t r2)
            faddr(_ST0_REGNO, r2);
        else {
            fxchr(r0);
-           faddr(_ST0_REGNO, r2);
+           faddr(_ST0_REGNO, r0 == r2 ? _ST0_REGNO : r2);
            fxchr(r0);
        }
     }
@@ -476,7 +476,7 @@ _x87_subr_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t 
r1, jit_int32_t r2)
            fsubr(_ST0_REGNO, r2);
        else {
            fxchr(r0);
-           fsubr(_ST0_REGNO, r0);
+           fsubr(_ST0_REGNO, r0 == r2 ? _ST0_REGNO : r2);
            fxchr(r0);
        }
     }
@@ -510,7 +510,7 @@ _x87_mulr_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t 
r1, jit_int32_t r2)
            fmulr(_ST0_REGNO, r2);
        else {
            fxchr(r0);
-           fmulr(_ST0_REGNO, r2);
+           fmulr(_ST0_REGNO, r0 == r2 ? _ST0_REGNO : r2);
            fxchr(r0);
        }
     }
@@ -544,7 +544,7 @@ _x87_divr_d(jit_state_t *_jit, jit_int32_t r0, jit_int32_t 
r1, jit_int32_t r2)
            fdivr(_ST0_REGNO, r2);
        else {
            fxchr(r0);
-           fdivr(_ST0_REGNO, r0);
+           fdivr(_ST0_REGNO, r0 == r2 ? _ST0_REGNO : r2);
            fxchr(r0);
        }
     }
diff --git a/lib/jit_x86.c b/lib/jit_x86.c
index 8386a85..4bbc5e9 100644
--- a/lib/jit_x86.c
+++ b/lib/jit_x86.c
@@ -953,7 +953,7 @@ _jit_emit(jit_state_t *_jit)
                break
 #define case_rrf(name, type)                                           \
            case jit_code_##name##r##type:                              \
-               if (jit_x87_reg_p(node->u.w))                           \
+               if (jit_x87_reg_p(node->w.w))                           \
                    x87_##name##r##type(rn(node->u.w),                  \
                                        rn(node->v.w), rn(node->w.w));  \
                else                                                    \



reply via email to

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