From: Franz Sirl Date: Sun, 22 Jul 2001 10:10:09 +0000 (+0000) Subject: ieee.exp: Only use -ffloat-store only on i[34567]86-*-*. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e5d4fff46599ec82874600968810e4e0b0b4aee7;p=gcc.git ieee.exp: Only use -ffloat-store only on i[34567]86-*-*. 2001-07-22 Franz Sirl * gcc.c-torture/execute/ieee/ieee.exp: Only use -ffloat-store only on i[34567]86-*-*. Delete handling of ieee_multilib_flags. Pass -mieee for alpha*-*-* and sh-*-*. * gcc.c-torture/execute/20010114-2.c: Move into ieee subdir. From-SVN: r44238 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a35d48eacb..cb3909f01e7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2001-07-22 Franz Sirl + + * gcc.c-torture/execute/ieee/ieee.exp: Only use -ffloat-store only on + i[34567]86-*-*. + Delete handling of ieee_multilib_flags. + Pass -mieee for alpha*-*-* and sh-*-*. + * gcc.c-torture/execute/20010114-2.c: Move into ieee subdir. + 2001-07-21 Nathan Sidwell Remove old-abi tests. diff --git a/gcc/testsuite/gcc.c-torture/execute/20010114-2.c b/gcc/testsuite/gcc.c-torture/execute/20010114-2.c deleted file mode 100644 index e5ab9485ffe..00000000000 --- a/gcc/testsuite/gcc.c-torture/execute/20010114-2.c +++ /dev/null @@ -1,31 +0,0 @@ -extern void exit (int); -extern void abort (void); - -float -rintf (float x) -{ - static const float TWO23 = 8388608.0; - - if (__builtin_fabs (x) < TWO23) - { - if (x > 0.0) - { - x += TWO23; - x -= TWO23; - } - else if (x < 0.0) - { - x = TWO23 - x; - x = -(x - TWO23); - } - } - - return x; -} - -int main (void) -{ - if (rintf (-1.5) != -2.0) - abort (); - exit (0); -} diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.c new file mode 100644 index 00000000000..e5ab9485ffe --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/20010114-2.c @@ -0,0 +1,31 @@ +extern void exit (int); +extern void abort (void); + +float +rintf (float x) +{ + static const float TWO23 = 8388608.0; + + if (__builtin_fabs (x) < TWO23) + { + if (x > 0.0) + { + x += TWO23; + x -= TWO23; + } + else if (x < 0.0) + { + x = TWO23 - x; + x = -(x - TWO23); + } + } + + return x; +} + +int main (void) +{ + if (rintf (-1.5) != -2.0) + abort (); + exit (0); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp index dd8f50c7563..a5bbc4dbca6 100644 --- a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp +++ b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp @@ -31,15 +31,18 @@ if $tracelevel then { strace $tracelevel } -if [target_info exists ieee_multilib_flags] { - set additional_flags [target_info ieee_multilib_flags]; -} else { - set additional_flags ""; +set additional_flags ""; + +# We must use -ffloat-store/-mieee to ensure that excess precision on some +# machines does not cause problems +if [istarget "i\[34567\]86-*-*"] then { + lappend additional_flags "-ffloat-store" } -# We must use -ffloat-store to ensure that excess precision on some machines -# does not cause problems -lappend additional_flags "-ffloat-store" +if { [istarget "alpha*-*-*"] + || [istarget "sh-*-*"] } then { + lappend additional_flags "-mieee" +} # load support procs load_lib c-torture.exp