This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Add -mlong-double-128 and make it default for 64-bit Bionic


Hi,

For 64-bit Android, long double is 128-bit IEEE-754 floating point type.
This patch adds -mlong-double-128 to i386 and makes it default for 64-bit
Bionic.  I only added MASK_LONG_DOUBLE_128.  I made -mlong-double-128,
-mlong-double-64 and -mlong-double-80 negate each other so that the
last one on command line wins.  It os OK since we don't support
-mlong-double-xxx in target attribute. I added some testcases to verify
it works correctly.  OK for trunk?

Thanks.


H.J.
---
gcc/

2014-01-30  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.

gcc/testsuite/

2014-01-30  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.
diff --git a/gcc/config/i386/i386-c.c b/gcc/config/i386/i386-c.c
index ee83de6..0c50720 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 1e65743..3a01b6e 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 bfb6dc6..0e757c9c 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 485ed2a..d5dd0fa 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 268abf6..73c7bbd 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/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" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]