[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
- [Guile-commits] 43/437: give credit to whom credit is due, (continued)
- [Guile-commits] 43/437: give credit to whom credit is due, Andy Wingo, 2018/07/02
- [Guile-commits] 41/437: x86-64 now passes test suite, Andy Wingo, 2018/07/02
- [Guile-commits] 47/437: refine ludovic's doc patch, Andy Wingo, 2018/07/02
- [Guile-commits] 38/437: add JIT_NEED_PUSH_POP and merge correct implementation of push/pop for SPARC, Andy Wingo, 2018/07/02
- [Guile-commits] 50/437: fix imprecisions in the ChangeLog, Andy Wingo, 2018/07/02
- [Guile-commits] 48/437: use CVTT instruction, fix lightning/Makefile.am, Andy Wingo, 2018/07/02
- [Guile-commits] 53/437: fix -I flags for opcode subdirectory, Andy Wingo, 2018/07/02
- [Guile-commits] 55/437: add Matthew Flatt to THANKS file, Andy Wingo, 2018/07/02
- [Guile-commits] 39/437: merge 64-bit cleanliness changes from mzscheme, Andy Wingo, 2018/07/02
- [Guile-commits] 49/437: add clean-local target to lightning/Makefile.am, Andy Wingo, 2018/07/02
- [Guile-commits] 56/437: fix i386 floating-point sub(a,0,a),
Andy Wingo <=
- [Guile-commits] 54/437: add 3to2 test and fix bug, Andy Wingo, 2018/07/02
- [Guile-commits] 52/437: improve set* encoding for i386, add testcase, Andy Wingo, 2018/07/02
- [Guile-commits] 57/437: don't truncate function pointers on amd64, Andy Wingo, 2018/07/02
- [Guile-commits] 68/437: cast memory address to long for JCCim, Andy Wingo, 2018/07/02
- [Guile-commits] 59/437: add --with-lightning-prefix option to lightning.m4, Andy Wingo, 2018/07/02
- [Guile-commits] 67/437: add underscores around __unused__ attribute, Andy Wingo, 2018/07/02
- [Guile-commits] 65/437: fix some problems (not all) with lightningize, Andy Wingo, 2018/07/02
- [Guile-commits] 63/437: Fix stxr_c(_EAX, _EBX, _ESI)., Andy Wingo, 2018/07/02
- [Guile-commits] 64/437: avoid "value computed is not used" in jit_allocai, Andy Wingo, 2018/07/02
- [Guile-commits] 66/437: warning patrol (allocai.c, ppc), Andy Wingo, 2018/07/02