From a2a1ddb57a57be005c4ee78b055adb2bd199ff2e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 3 Feb 2014 15:18:44 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 19 ++++++++++++++ gcc/config/i386/i386-c.c | 3 +++ gcc/config/i386/i386.c | 15 ++++++++--- gcc/config/i386/i386.h | 5 +++- gcc/config/i386/i386.opt | 8 ++++-- gcc/doc/invoke.texi | 8 ++++-- gcc/testsuite/ChangeLog | 30 ++++++++++++++++++++++ .../{long-double-64-1.c => long-double-128-1.c} | 3 ++- .../{long-double-64-2.c => long-double-128-2.c} | 3 ++- .../{long-double-64-3.c => long-double-128-3.c} | 3 ++- gcc/testsuite/gcc.target/i386/long-double-128-4.c | 11 ++++++++ gcc/testsuite/gcc.target/i386/long-double-128-5.c | 11 ++++++++ .../{long-double-64-1.c => long-double-128-6.c} | 3 ++- .../{long-double-64-1.c => long-double-128-7.c} | 5 ++-- gcc/testsuite/gcc.target/i386/long-double-128-8.c | 11 ++++++++ gcc/testsuite/gcc.target/i386/long-double-128-9.c | 13 ++++++++++ gcc/testsuite/gcc.target/i386/long-double-64-1.c | 1 + gcc/testsuite/gcc.target/i386/long-double-64-2.c | 3 ++- gcc/testsuite/gcc.target/i386/long-double-64-3.c | 3 ++- gcc/testsuite/gcc.target/i386/long-double-64-4.c | 1 + gcc/testsuite/gcc.target/i386/long-double-64-5.c | 11 ++++++++ gcc/testsuite/gcc.target/i386/long-double-64-6.c | 11 ++++++++ gcc/testsuite/gcc.target/i386/long-double-64-7.c | 11 ++++++++ .../{long-double-64-2.c => long-double-64-8.c} | 3 ++- .../{long-double-64-2.c => long-double-64-9.c} | 3 ++- gcc/testsuite/gcc.target/i386/long-double-80-1.c | 1 + gcc/testsuite/gcc.target/i386/long-double-80-10.c | 11 ++++++++ gcc/testsuite/gcc.target/i386/long-double-80-2.c | 1 + gcc/testsuite/gcc.target/i386/long-double-80-3.c | 1 + gcc/testsuite/gcc.target/i386/long-double-80-4.c | 1 + gcc/testsuite/gcc.target/i386/long-double-80-5.c | 1 + gcc/testsuite/gcc.target/i386/long-double-80-8.c | 11 ++++++++ gcc/testsuite/gcc.target/i386/long-double-80-9.c | 11 ++++++++ 33 files changed, 218 insertions(+), 18 deletions(-) copy gcc/testsuite/gcc.target/i386/{long-double-64-1.c => long-double-128-1.c} (53%) copy gcc/testsuite/gcc.target/i386/{long-double-64-2.c => long-double-128-2.c} (52%) copy gcc/testsuite/gcc.target/i386/{long-double-64-3.c => long-double-128-3.c} (52%) create mode 100644 gcc/testsuite/gcc.target/i386/long-double-128-4.c create mode 100644 gcc/testsuite/gcc.target/i386/long-double-128-5.c copy gcc/testsuite/gcc.target/i386/{long-double-64-1.c => long-double-128-6.c} (50%) copy gcc/testsuite/gcc.target/i386/{long-double-64-1.c => long-double-128-7.c} (59%) create mode 100644 gcc/testsuite/gcc.target/i386/long-double-128-8.c create mode 100644 gcc/testsuite/gcc.target/i386/long-double-128-9.c create mode 100644 gcc/testsuite/gcc.target/i386/long-double-64-5.c create mode 100644 gcc/testsuite/gcc.target/i386/long-double-64-6.c create mode 100644 gcc/testsuite/gcc.target/i386/long-double-64-7.c copy gcc/testsuite/gcc.target/i386/{long-double-64-2.c => long-double-64-8.c} (55%) copy gcc/testsuite/gcc.target/i386/{long-double-64-2.c => long-double-64-9.c} (54%) create mode 100644 gcc/testsuite/gcc.target/i386/long-double-80-10.c create mode 100644 gcc/testsuite/gcc.target/i386/long-double-80-8.c create mode 100644 gcc/testsuite/gcc.target/i386/long-double-80-9.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6df43b80f5..5938f54df1e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,24 @@ 2014-02-03 H.J. Lu + * 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. + +2014-02-03 H.J. Lu + PR rtl-optimization/60024 * sel-sched.c (init_regs_for_mode): Check if mode is OK first. diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c index ee83de66471..0c5072041de 100644 --- a/gcc/config/i386/i386-c.c +++ b/gcc/config/i386/i386-c.c @@ -513,6 +513,9 @@ ix86_target_macros (void) if (TARGET_LONG_DOUBLE_64) cpp_define (parse_in, "__LONG_DOUBLE_64__"); + if (TARGET_LONG_DOUBLE_128) + cpp_define (parse_in, "__LONG_DOUBLE_128__"); + cpp_define_formatted (parse_in, "__ATOMIC_HLE_ACQUIRE=%d", IX86_HLE_ACQUIRE); cpp_define_formatted (parse_in, "__ATOMIC_HLE_RELEASE=%d", IX86_HLE_RELEASE); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a5d65595bde..58f36e0445a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -2628,6 +2628,7 @@ ix86_target_string (HOST_WIDE_INT isa, int flags, const char *arch, static struct ix86_target_opts flag_opts[] = { { "-m128bit-long-double", MASK_128BIT_LONG_DOUBLE }, + { "-mlong-double-128", MASK_LONG_DOUBLE_128 }, { "-mlong-double-64", MASK_LONG_DOUBLE_64 }, { "-m80387", MASK_80387 }, { "-maccumulate-outgoing-args", MASK_ACCUMULATE_OUTGOING_ARGS }, @@ -4195,10 +4196,18 @@ ix86_option_override_internal (bool main_args_p, else if (opts_set->x_target_flags & MASK_RECIP) opts->x_recip_mask &= ~(RECIP_MASK_ALL & ~opts->x_recip_mask_explicit); - /* Default long double to 64-bit for Bionic. */ + /* Default long double to 64-bit for 32-bit Bionic and to __float128 + for 64-bit Bionic. */ if (TARGET_HAS_BIONIC - && !(opts_set->x_target_flags & MASK_LONG_DOUBLE_64)) - opts->x_target_flags |= MASK_LONG_DOUBLE_64; + && !(opts_set->x_target_flags + & (MASK_LONG_DOUBLE_64 | MASK_LONG_DOUBLE_128))) + opts->x_target_flags |= (TARGET_64BIT + ? MASK_LONG_DOUBLE_128 + : MASK_LONG_DOUBLE_64); + + /* Only one of them can be active. */ + gcc_assert ((opts->x_target_flags & MASK_LONG_DOUBLE_64) == 0 + || (opts->x_target_flags & MASK_LONG_DOUBLE_128) == 0); /* Save the initial options in case the user does function specific options. */ diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index bfb6dc6436f..0e757c9c4aa 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -668,12 +668,15 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define LONG_LONG_TYPE_SIZE 64 #define FLOAT_TYPE_SIZE 32 #define DOUBLE_TYPE_SIZE 64 -#define LONG_DOUBLE_TYPE_SIZE (TARGET_LONG_DOUBLE_64 ? 64 : 80) +#define LONG_DOUBLE_TYPE_SIZE \ + (TARGET_LONG_DOUBLE_64 ? 64 : (TARGET_LONG_DOUBLE_128 ? 128 : 80)) /* Define this to set long double type size to use in libgcc2.c, which can not depend on target_flags. */ #ifdef __LONG_DOUBLE_64__ #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 64 +#elif defined (__LONG_DOUBLE_128__) +#define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 128 #else #define LIBGCC2_LONG_DOUBLE_TYPE_SIZE 80 #endif diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt index 485ed2ad633..d5dd0fa3e00 100644 --- a/gcc/config/i386/i386.opt +++ b/gcc/config/i386/i386.opt @@ -186,13 +186,17 @@ Target RejectNegative Report InverseMask(128BIT_LONG_DOUBLE) Save sizeof(long double) is 12 mlong-double-80 -Target Report RejectNegative InverseMask(LONG_DOUBLE_64) Save +Target Report RejectNegative Negative(mlong-double-64) InverseMask(LONG_DOUBLE_64) Save Use 80-bit long double mlong-double-64 -Target Report RejectNegative Mask(LONG_DOUBLE_64) Save +Target Report RejectNegative Negative(mlong-double-128) Mask(LONG_DOUBLE_64) InverseMask(LONG_DOUBLE_128) Save Use 64-bit long double +mlong-double-128 +Target Report RejectNegative Negative(mlong-double-80) Mask(LONG_DOUBLE_128) InverseMask(LONG_DOUBLE_64) Save +Use 128-bit long double + maccumulate-outgoing-args Target Report Mask(ACCUMULATE_OUTGOING_ARGS) Save Reserve space for outgoing arguments in the function prologue diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 5c396007a98..89e80ac130a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -674,7 +674,7 @@ Objective-C and Objective-C++ Dialects}. -minline-stringops-dynamically -mstringop-strategy=@var{alg} @gol -mmemcpy-strategy=@var{strategy} -mmemset-strategy=@var{strategy} -mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol --m96bit-long-double -mlong-double-64 -mlong-double-80 @gol +-m96bit-long-double -mlong-double-64 -mlong-double-80 -mlong-double-128 @gol -mregparm=@var{num} -msseregparm @gol -mveclibabi=@var{type} -mvect8-ret-in-mem @gol -mpc32 -mpc64 -mpc80 -mstackrealign @gol @@ -15053,11 +15053,15 @@ with code compiled without that switch. @item -mlong-double-64 @itemx -mlong-double-80 +@itemx -mlong-double-128 @opindex mlong-double-64 @opindex mlong-double-80 +@opindex mlong-double-128 These switches control the size of @code{long double} type. A size of 64 bits makes the @code{long double} type equivalent to the @code{double} -type. This is the default for Bionic C library. +type. This is the default for 32-bit Bionic C library. A size +of 128 bits makes the @code{long double} type equivalent to the +@code{__float128} type. This is the default for 64-bit Bionic C library. @strong{Warning:} if you override the default value for your target ABI, this changes the size of diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f718dd25db..d87b06e62d1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,33 @@ +2014-02-03 H.J. Lu + + * 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 PR rtl-optimization/57662 diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-1.c b/gcc/testsuite/gcc.target/i386/long-double-128-1.c similarity index 53% copy from gcc/testsuite/gcc.target/i386/long-double-64-1.c copy to gcc/testsuite/gcc.target/i386/long-double-128-1.c index cf933796f8a..cbd9bb5ecd1 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-1.c +++ b/gcc/testsuite/gcc.target/i386/long-double-128-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mlong-double-64" } */ +/* { dg-options "-O2 -mlong-double-128" } */ long double foo (long double x) @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-2.c b/gcc/testsuite/gcc.target/i386/long-double-128-2.c similarity index 52% copy from gcc/testsuite/gcc.target/i386/long-double-64-2.c copy to gcc/testsuite/gcc.target/i386/long-double-128-2.c index ddf4fe656d0..9aef4bf0c79 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-2.c +++ b/gcc/testsuite/gcc.target/i386/long-double-128-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 "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-3.c b/gcc/testsuite/gcc.target/i386/long-double-128-3.c similarity index 52% copy from gcc/testsuite/gcc.target/i386/long-double-64-3.c copy to gcc/testsuite/gcc.target/i386/long-double-128-3.c index e748fab2edd..86b9b12e20e 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-3.c +++ b/gcc/testsuite/gcc.target/i386/long-double-128-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 "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 00000000000..af7363581d7 --- /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 00000000000..fb32c5b7e20 --- /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-64-1.c b/gcc/testsuite/gcc.target/i386/long-double-128-6.c similarity index 50% copy from gcc/testsuite/gcc.target/i386/long-double-64-1.c copy to gcc/testsuite/gcc.target/i386/long-double-128-6.c index cf933796f8a..2797516201d 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-1.c +++ b/gcc/testsuite/gcc.target/i386/long-double-128-6.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -mlong-double-64" } */ +/* { dg-options "-O2 -mlong-double-64 -mlong-double-128" } */ long double foo (long double x) @@ -8,3 +8,4 @@ foo (long double x) } /* { dg-final { scan-assembler-not "fldt" } } */ +/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */ diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-1.c b/gcc/testsuite/gcc.target/i386/long-double-128-7.c similarity index 59% copy from gcc/testsuite/gcc.target/i386/long-double-64-1.c copy to gcc/testsuite/gcc.target/i386/long-double-128-7.c index cf933796f8a..eaa7f630208 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-1.c +++ b/gcc/testsuite/gcc.target/i386/long-double-128-7.c @@ -1,10 +1,11 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mlong-double-64" } */ -long double -foo (long double x) +__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 00000000000..d869efc437e --- /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 00000000000..bc90f217717 --- /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 cf933796f8a..f5c83a5858b 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 ddf4fe656d0..13a7be08b04 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 e748fab2edd..99d3d5ffc79 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 d9c25aaec08..471f0bf72d7 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 00000000000..f634425eb5c --- /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 00000000000..76b030d0c04 --- /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 00000000000..9f66d37e0ad --- /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-2.c b/gcc/testsuite/gcc.target/i386/long-double-64-8.c similarity index 55% copy from gcc/testsuite/gcc.target/i386/long-double-64-2.c copy to gcc/testsuite/gcc.target/i386/long-double-64-8.c index ddf4fe656d0..fd2fdbc10dc 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-2.c +++ b/gcc/testsuite/gcc.target/i386/long-double-64-8.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mbionic" } */ +/* { dg-options "-O2 -mlong-double-64 -mbionic" } */ long double foo (long double x) @@ -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-9.c similarity index 54% copy from gcc/testsuite/gcc.target/i386/long-double-64-2.c copy to gcc/testsuite/gcc.target/i386/long-double-64-9.c index ddf4fe656d0..595dba358d2 100644 --- a/gcc/testsuite/gcc.target/i386/long-double-64-2.c +++ b/gcc/testsuite/gcc.target/i386/long-double-64-9.c @@ -1,5 +1,5 @@ /* { dg-do compile { target *-*-linux* } } */ -/* { dg-options "-O2 -mbionic" } */ +/* { dg-options "-O2 -mlong-double-64 -mandroid" } */ long double foo (long double x) @@ -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-80-1.c b/gcc/testsuite/gcc.target/i386/long-double-80-1.c index d3b75a0be21..887bd6c9f65 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 00000000000..311ae4f4055 --- /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 954dfd15d42..7ca06439402 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 e0e8365e32c..39dc8a450de 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 cac2d55bc16..4ee21b662a3 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 4aa606fd1ba..78a16037e56 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 00000000000..b82305ffb65 --- /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 00000000000..91ff9d10eea --- /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" } } */ -- 2.11.4.GIT