Add -mlong-double-128 and make it default for 64-bit Bionic
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 3 Feb 2014 15:18:44 +0000 (15:18 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 3 Feb 2014 15:18:44 +0000 (07:18 -0800)
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

33 files changed:
gcc/ChangeLog
gcc/config/i386/i386-c.c
gcc/config/i386/i386.c
gcc/config/i386/i386.h
gcc/config/i386/i386.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/long-double-128-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-3.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-4.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-128-9.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-64-1.c
gcc/testsuite/gcc.target/i386/long-double-64-2.c
gcc/testsuite/gcc.target/i386/long-double-64-3.c
gcc/testsuite/gcc.target/i386/long-double-64-4.c
gcc/testsuite/gcc.target/i386/long-double-64-5.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-64-6.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-64-7.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-64-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-64-9.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-80-1.c
gcc/testsuite/gcc.target/i386/long-double-80-10.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-80-2.c
gcc/testsuite/gcc.target/i386/long-double-80-3.c
gcc/testsuite/gcc.target/i386/long-double-80-4.c
gcc/testsuite/gcc.target/i386/long-double-80-5.c
gcc/testsuite/gcc.target/i386/long-double-80-8.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/long-double-80-9.c [new file with mode: 0644]

index e6df43b80f5771d5d513d38d0c26b91c17ff27df..5938f54df1e323717c6d9dc273e4565a566b4f57 100644 (file)
@@ -1,3 +1,22 @@
+2014-02-03  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * 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  <hongjiu.lu@intel.com>
 
        PR rtl-optimization/60024
index ee83de66471ab9a60c3472668807343a494b41b0..0c5072041de0dca4b4026cd2f72d5d2dd4b4f7cd 100644 (file)
@@ -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);
 
index a5d65595bdedbbe453848cd2cdbdab73c2a6e8a2..58f36e0445a06f17d99a33b089882a2df8881146 100644 (file)
@@ -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.  */
index bfb6dc6436fd2fcbb210c629fcd3cffaa1c2cedb..0e757c9c4aafb6a28b1d41de531c157d940813b3 100644 (file)
@@ -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
index 485ed2ad633760a5359fb42b0124da841a208345..d5dd0fa3e00418aec0f9819178d6ccaf8490299e 100644 (file)
@@ -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
index 5c396007a9846e1ff1b7fd82d5a98b088b6a1d76..89e80ac130ab3fc57938bf87da7bbc96f36fc298 100644 (file)
@@ -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
index 4f718dd25dbe229a2bbc28ea81a38cbb0e7da5d0..d87b06e62d10876fa0c3b5551783f026d8e32a3a 100644 (file)
@@ -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 (file)
index 0000000..cbd9bb5
--- /dev/null
@@ -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 (file)
index 0000000..9aef4bf
--- /dev/null
@@ -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 (file)
index 0000000..86b9b12
--- /dev/null
@@ -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 (file)
index 0000000..af73635
--- /dev/null
@@ -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 (file)
index 0000000..fb32c5b
--- /dev/null
@@ -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 (file)
index 0000000..2797516
--- /dev/null
@@ -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 (file)
index 0000000..eaa7f63
--- /dev/null
@@ -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 (file)
index 0000000..d869efc
--- /dev/null
@@ -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 (file)
index 0000000..bc90f21
--- /dev/null
@@ -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 ();
+}
index cf933796f8aea30e2991ab157ee1ea698f9d2c98..f5c83a5858b64cbdb90124bdcf67c42b16318919 100644 (file)
@@ -8,3 +8,4 @@ foo (long double x)
 }
 
 /* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
index ddf4fe656d099863763007fe2027105babebef00..13a7be08b0481859de64f5705e4723274b22e4be 100644 (file)
@@ -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" } } */
index e748fab2edd3c2cd052192e806fcdf4078daa46f..99d3d5ffc793b06587c6968173296fa078baacb7 100644 (file)
@@ -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" } } */
index d9c25aaec080cf54c02aa2ed5899eaee5a6ce3f6..471f0bf72d7254f071a9ca15e68e356bd0f1a9a7 100644 (file)
@@ -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 (file)
index 0000000..f634425
--- /dev/null
@@ -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 (file)
index 0000000..76b030d
--- /dev/null
@@ -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 (file)
index 0000000..9f66d37
--- /dev/null
@@ -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 (file)
index 0000000..fd2fdbc
--- /dev/null
@@ -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 (file)
index 0000000..595dba3
--- /dev/null
@@ -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" } } */
index d3b75a0be21deb32137982899638677deebe3f1f..887bd6c9f65f33334f90dc0248dc729724b3e31b 100644 (file)
@@ -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 (file)
index 0000000..311ae4f
--- /dev/null
@@ -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" } } */
index 954dfd15d4271a414c25b245ae2994568eab1044..7ca0643940267b862a3a87dabe1ea8dda9771a7f 100644 (file)
@@ -8,3 +8,4 @@ foo (long double x)
 }
 
 /* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
index e0e8365e32c4ab6f653d41dafb324b8764e9f094..39dc8a450dede5d7dfb6cdfce40dc63f234f723e 100644 (file)
@@ -8,3 +8,4 @@ foo (long double x)
 }
 
 /* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
index cac2d55bc166cbd75b91de4822777a3dbc03baed..4ee21b662a30af23b1a872011e8b99e6e86d4e7b 100644 (file)
@@ -8,3 +8,4 @@ foo (long double x)
 }
 
 /* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
index 4aa606fd1ba052f804852cac2f20ba3a9ba1075b..78a16037e561ee8412c7cac643ecc371a0b60186 100644 (file)
@@ -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 (file)
index 0000000..b82305f
--- /dev/null
@@ -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 (file)
index 0000000..91ff9d1
--- /dev/null
@@ -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" } } */