diff options
author | Pavel Chupin <pavel.v.chupin@intel.com> | 2014-01-30 22:13:55 +0400 |
---|---|---|
committer | Pavel Chupin <pavel.v.chupin@intel.com> | 2014-02-05 18:49:08 +0400 |
commit | 5854943608ddcce075eab056ee15318a8abce5f1 (patch) | |
tree | 7c8230ed46284c52ac5e72296d87c8ae437f5f20 /gcc-4.8/gcc/testsuite/gcc.target/i386 | |
parent | 5be615df32ce970fcccda93cf577e9ce35b1d397 (diff) | |
download | toolchain_gcc-5854943608ddcce075eab056ee15318a8abce5f1.tar.gz toolchain_gcc-5854943608ddcce075eab056ee15318a8abce5f1.tar.bz2 toolchain_gcc-5854943608ddcce075eab056ee15318a8abce5f1.zip |
[4.8] Add -mlong-double-128 and make it default for 64-bit Bionic
Backport of r207428:
2014-02-03 H.J. Lu <hongjiu.lu@intel.com>
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.
Change-Id: I2e1ce44792dd78df521fa485f2c0d2303dbb83bd
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/i386')
26 files changed, 200 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-1.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-1.c new file mode 100644 index 000000000..cbd9bb5ec --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-2.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-2.c new file mode 100644 index 000000000..9aef4bf0c --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-3.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-3.c new file mode 100644 index 000000000..86b9b12e2 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-4.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-4.c new file mode 100644 index 000000000..af7363581 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-5.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-5.c new file mode 100644 index 000000000..fb32c5b7e --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-6.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-6.c new file mode 100644 index 000000000..279751620 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-7.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-7.c new file mode 100644 index 000000000..eaa7f6302 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-8.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-8.c new file mode 100644 index 000000000..d869efc43 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-128-9.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-128-9.c new file mode 100644 index 000000000..bc90f2177 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-1.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-1.c index cf933796f..f5c83a585 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-1.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-2.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-2.c index ddf4fe656..13a7be08b 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-2.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-3.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-3.c index e748fab2e..99d3d5ffc 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-3.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-4.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-4.c index d9c25aaec..471f0bf72 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-4.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-5.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-5.c new file mode 100644 index 000000000..f634425eb --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-6.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-6.c new file mode 100644 index 000000000..76b030d0c --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-7.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-7.c new file mode 100644 index 000000000..9f66d37e0 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-8.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-8.c new file mode 100644 index 000000000..fd2fdbc10 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-64-9.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-64-9.c new file mode 100644 index 000000000..595dba358 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-1.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-1.c index d3b75a0be..887bd6c9f 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-1.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-10.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-10.c new file mode 100644 index 000000000..311ae4f40 --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-2.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-2.c index 954dfd15d..7ca064394 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-2.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-3.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-3.c index e0e8365e3..39dc8a450 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-3.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-4.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-4.c index cac2d55bc..4ee21b662 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-4.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-5.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-5.c index 4aa606fd1..78a16037e 100644 --- a/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-5.c +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-8.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-8.c new file mode 100644 index 000000000..b82305ffb --- /dev/null +++ b/gcc-4.8/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-4.8/gcc/testsuite/gcc.target/i386/long-double-80-9.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/long-double-80-9.c new file mode 100644 index 000000000..91ff9d10e --- /dev/null +++ b/gcc-4.8/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" } } */ |