diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2014-02-03 15:18:44 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2014-02-03 07:18:44 -0800 |
commit | a2a1ddb57a57be005c4ee78b055adb2bd199ff2e (patch) | |
tree | b8526b6d630f8e6d4efb2afb9dea0faba7170200 /gcc/testsuite | |
parent | f742cf901dd37dfeb116e7dc099461b1291389e8 (diff) | |
download | gcc-a2a1ddb57a57be005c4ee78b055adb2bd199ff2e.zip gcc-a2a1ddb57a57be005c4ee78b055adb2bd199ff2e.tar.gz gcc-a2a1ddb57a57be005c4ee78b055adb2bd199ff2e.tar.bz2 |
Add -mlong-double-128 and make it default for 64-bit Bionic
gcc/
* config/i386/i386.c (flag_opts): Add -mlong-double-128.
(ix86_option_override_internal): Default long double to 64-bit for
32-bit Bionic and to 128-bit for 64-bit Bionic.
* config/i386/i386.h (LONG_DOUBLE_TYPE_SIZE): Use 128 if
TARGET_LONG_DOUBLE_128 is true.
(LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Likewise.
* config/i386/i386.opt (mlong-double-80): Negate -mlong-double-64.
(mlong-double-64): Negate -mlong-double-128.
(mlong-double-128): New option.
* config/i386/i386-c.c (ix86_target_macros): Define
__LONG_DOUBLE_128__ for TARGET_LONG_DOUBLE_128.
* doc/invoke.texi: Document -mlong-double-128.
gcc/testsuite/
* gcc.target/i386/long-double-64-1.c: Verify __multf3 isn't used.
* gcc.target/i386/long-double-64-4.c: Likewise.
* gcc.target/i386/long-double-80-1.c: Likewise.
* gcc.target/i386/long-double-80-2.c: Likewise.
* gcc.target/i386/long-double-80-3.c: Likewise.
* gcc.target/i386/long-double-80-4.c: Likewise.
* gcc.target/i386/long-double-80-5.c: Likewise.
* gcc.target/i386/long-double-64-2.c: Limit to ia32. Verify
__multf3 isn't used.
* gcc.target/i386/long-double-64-3.c: Likewise.
* gcc.target/i386/long-double-128-1.c: New test.
* gcc.target/i386/long-double-128-2.c: Likewise.
* gcc.target/i386/long-double-128-3.c: Likewise.
* gcc.target/i386/long-double-128-4.c: Likewise.
* gcc.target/i386/long-double-128-5.c: Likewise.
* gcc.target/i386/long-double-128-6.c: Likewise.
* gcc.target/i386/long-double-128-7.c: Likewise.
* gcc.target/i386/long-double-128-8.c: Likewise.
* gcc.target/i386/long-double-128-9.c: Likewise.
* gcc.target/i386/long-double-64-5.c: Likewise.
* gcc.target/i386/long-double-64-6.c: Likewise.
* gcc.target/i386/long-double-64-7.c: Likewise.
* gcc.target/i386/long-double-64-8.c: Likewise.
* gcc.target/i386/long-double-64-9.c: Likewise.
* gcc.target/i386/long-double-80-10.c: Likewise.
* gcc.target/i386/long-double-80-8.c: Likewise.
* gcc.target/i386/long-double-80-9.c: Likewise.
From-SVN: r207428
Diffstat (limited to 'gcc/testsuite')
27 files changed, 230 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f718dd..d87b06e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,33 @@ +2014-02-03 H.J. Lu <hongjiu.lu@intel.com> + + * gcc.target/i386/long-double-64-1.c: Verify __multf3 isn't used. + * gcc.target/i386/long-double-64-4.c: Likewise. + * gcc.target/i386/long-double-80-1.c: Likewise. + * gcc.target/i386/long-double-80-2.c: Likewise. + * gcc.target/i386/long-double-80-3.c: Likewise. + * gcc.target/i386/long-double-80-4.c: Likewise. + * gcc.target/i386/long-double-80-5.c: Likewise. + * gcc.target/i386/long-double-64-2.c: Limit to ia32. Verify + __multf3 isn't used. + * gcc.target/i386/long-double-64-3.c: Likewise. + * gcc.target/i386/long-double-128-1.c: New test. + * gcc.target/i386/long-double-128-2.c: Likewise. + * gcc.target/i386/long-double-128-3.c: Likewise. + * gcc.target/i386/long-double-128-4.c: Likewise. + * gcc.target/i386/long-double-128-5.c: Likewise. + * gcc.target/i386/long-double-128-6.c: Likewise. + * gcc.target/i386/long-double-128-7.c: Likewise. + * gcc.target/i386/long-double-128-8.c: Likewise. + * gcc.target/i386/long-double-128-9.c: Likewise. + * gcc.target/i386/long-double-64-5.c: Likewise. + * gcc.target/i386/long-double-64-6.c: Likewise. + * gcc.target/i386/long-double-64-7.c: Likewise. + * gcc.target/i386/long-double-64-8.c: Likewise. + * gcc.target/i386/long-double-64-9.c: Likewise. + * gcc.target/i386/long-double-80-10.c: Likewise. + * gcc.target/i386/long-double-80-8.c: Likewise. + * gcc.target/i386/long-double-80-9.c: Likewise. + 2014-02-03 Andrey Belevantsev <abel@ispras.ru> PR rtl-optimization/57662 diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-1.c b/gcc/testsuite/gcc.target/i386/long-double-128-1.c new file mode 100644 index 0000000..cbd9bb5 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-128" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-2.c b/gcc/testsuite/gcc.target/i386/long-double-128-2.c new file mode 100644 index 0000000..9aef4bf --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-options "-O2 -mbionic" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-3.c b/gcc/testsuite/gcc.target/i386/long-double-128-3.c new file mode 100644 index 0000000..86b9b12 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-3.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-options "-O2 -mandroid" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-4.c b/gcc/testsuite/gcc.target/i386/long-double-128-4.c new file mode 100644 index 0000000..af73635 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-4.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-options "-O2 -mlong-double-128 -mbionic" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-5.c b/gcc/testsuite/gcc.target/i386/long-double-128-5.c new file mode 100644 index 0000000..fb32c5b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-5.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */ +/* { dg-options "-O2 -mlong-double-128 -mandroid" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-6.c b/gcc/testsuite/gcc.target/i386/long-double-128-6.c new file mode 100644 index 0000000..2797516 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-6.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-64 -mlong-double-128" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-7.c b/gcc/testsuite/gcc.target/i386/long-double-128-7.c new file mode 100644 index 0000000..eaa7f63 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-7.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-64" } */ + +__float128 +foo (__float128 x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-8.c b/gcc/testsuite/gcc.target/i386/long-double-128-8.c new file mode 100644 index 0000000..d869efc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-8.c @@ -0,0 +1,11 @@ +/* { dg-do run } */ +/* { dg-options "-O0 -mlong-double-64 -mfpmath=387" } */ + +int +main () +{ + __float128 a = -0.23456789; + if ((double) a >= 0) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-9.c b/gcc/testsuite/gcc.target/i386/long-double-128-9.c new file mode 100644 index 0000000..bc90f21 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-128-9.c @@ -0,0 +1,13 @@ +/* { dg-do run } */ +/* { dg-options "-O0 -mlong-double-64 -mfpmath=sse -msse2" } */ +/* { dg-require-effective-target sse2 } */ + +#include "sse2-check.h" + +static void +sse2_test (void) +{ + __float128 a = -0.23456789; + if ((double) a >= 0) + __builtin_abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-1.c b/gcc/testsuite/gcc.target/i386/long-double-64-1.c index cf93379..f5c83a5 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-1.c +++ b/gcc/testsuite/gcc.target/i386/long-double-64-1.c @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-2.c b/gcc/testsuite/gcc.target/i386/long-double-64-2.c index ddf4fe6..13a7be0 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-2.c +++ b/gcc/testsuite/gcc.target/i386/long-double-64-2.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target *-*-linux* } } */ +/* { dg-do compile { target { *-*-linux* && ia32 } } } */ /* { dg-options "-O2 -mbionic" } */ long double @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-3.c b/gcc/testsuite/gcc.target/i386/long-double-64-3.c index e748fab..99d3d5f 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-3.c +++ b/gcc/testsuite/gcc.target/i386/long-double-64-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target *-*-linux* } } */ +/* { dg-do compile { target { *-*-linux* && ia32 } } } */ /* { dg-options "-O2 -mandroid" } */ long double @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-4.c b/gcc/testsuite/gcc.target/i386/long-double-64-4.c index d9c25aa..471f0bf 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-4.c +++ b/gcc/testsuite/gcc.target/i386/long-double-64-4.c @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-5.c b/gcc/testsuite/gcc.target/i386/long-double-64-5.c new file mode 100644 index 0000000..f634425 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-64-5.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-128 -mlong-double-64" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-6.c b/gcc/testsuite/gcc.target/i386/long-double-64-6.c new file mode 100644 index 0000000..76b030d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-64-6.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-80 -mlong-double-128 -mlong-double-64" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-7.c b/gcc/testsuite/gcc.target/i386/long-double-64-7.c new file mode 100644 index 0000000..9f66d37 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-64-7.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-128 -mlong-double-80 -mlong-double-64" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-8.c b/gcc/testsuite/gcc.target/i386/long-double-64-8.c new file mode 100644 index 0000000..fd2fdbc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-64-8.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -mlong-double-64 -mbionic" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-9.c b/gcc/testsuite/gcc.target/i386/long-double-64-9.c new file mode 100644 index 0000000..595dba3 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-64-9.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-O2 -mlong-double-64 -mandroid" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-1.c b/gcc/testsuite/gcc.target/i386/long-double-80-1.c index d3b75a0..887bd6c 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-80-1.c +++ b/gcc/testsuite/gcc.target/i386/long-double-80-1.c @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-10.c b/gcc/testsuite/gcc.target/i386/long-double-80-10.c new file mode 100644 index 0000000..311ae4f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-80-10.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-128 -mlong-double-64 -mlong-double-80" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-2.c b/gcc/testsuite/gcc.target/i386/long-double-80-2.c index 954dfd1..7ca0643 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-80-2.c +++ b/gcc/testsuite/gcc.target/i386/long-double-80-2.c @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-3.c b/gcc/testsuite/gcc.target/i386/long-double-80-3.c index e0e8365..39dc8a4 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-80-3.c +++ b/gcc/testsuite/gcc.target/i386/long-double-80-3.c @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-4.c b/gcc/testsuite/gcc.target/i386/long-double-80-4.c index cac2d55..4ee21b6 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-80-4.c +++ b/gcc/testsuite/gcc.target/i386/long-double-80-4.c @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-5.c b/gcc/testsuite/gcc.target/i386/long-double-80-5.c index 4aa606f..78a1603 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-80-5.c +++ b/gcc/testsuite/gcc.target/i386/long-double-80-5.c @@ -8,3 +8,4 @@ foo (__float80 x) } /* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-8.c b/gcc/testsuite/gcc.target/i386/long-double-80-8.c new file mode 100644 index 0000000..b82305f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-80-8.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-128 -mlong-double-80" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-9.c b/gcc/testsuite/gcc.target/i386/long-double-80-9.c new file mode 100644 index 0000000..91ff9d1 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/long-double-80-9.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mlong-double-64 -mlong-double-128 -mlong-double-80" } */ + +long double +foo (long double x) +{ + return x * x; +} + +/* { dg-final { scan-assembler "fldt" } } */ +/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */ |