1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 00:10:21 +02:00

fix i386 floating-point sub(a,0,a)

2008-01-05  Paolo Bonzini  <bonzini@gnu.org>

	* 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: bonzini@gnu.org--2004b/lightning--stable--1.2--patch-61
This commit is contained in:
Paolo Bonzini 2008-01-05 15:05:46 +00:00
parent 0f828ae7de
commit 950b2cefe9
4 changed files with 24 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2008-01-05 Paolo Bonzini <bonzini@gnu.org>
* 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 <bonzini@gnu.org>
* lightning/i386/fp-32.h: Fix sub(a,b,a) with a ~= JIT_FPR0.

View file

@ -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)

View file

@ -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

View file

@ -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