public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] math: x86: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtype
@ 2023-11-14 18:49 Pranav Kant
  0 siblings, 0 replies; only message in thread
From: Pranav Kant @ 2023-11-14 18:49 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=950a6559add2cf1a547ae93651e3a96880206054

commit 950a6559add2cf1a547ae93651e3a96880206054
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 10 14:41:31 2022 -0300

    math: x86: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtype

Diff:
---
 sysdeps/x86/fpu/sfp-machine.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/sysdeps/x86/fpu/sfp-machine.h b/sysdeps/x86/fpu/sfp-machine.h
index df8906acb4..fcbcf69053 100644
--- a/sysdeps/x86/fpu/sfp-machine.h
+++ b/sysdeps/x86/fpu/sfp-machine.h
@@ -1,10 +1,19 @@
 /* Configure soft-fp for building sqrtf128.  Based on sfp-machine.h in
    libgcc, with soft-float and other irrelevant parts removed.  */
 
+#if defined __x86_64__ && defined __ILP32__
+typedef long long int __gcc_CMPtype;
+#else
+typedef long int __gcc_CMPtype;
+#endif
+#if !defined(__clang__) && defined(__GNUC__)
 /* The type of the result of a floating point comparison.  This must
    match `__libgcc_cmp_return__' in GCC for the target.  */
-typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
-#define CMPtype __gcc_CMPtype
+typedef int __gcc_CMPtype_GCC __attribute__ ((mode (__libgcc_cmp_return__)));
+# define CMPtype __gcc_CMPtype
+_Static_assert(sizeof(__gcc_CMPtype) == sizeof(__gcc_CMPtype_GCC),
+	       "sizeof(__gcc_CMPtype) != sizeof(__gcc_CMPtype_GCC)");
+#endif
 
 #ifdef __x86_64__
 # define _FP_W_TYPE_SIZE	64

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-14 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14 18:49 [glibc/google/grte/v5-2.27/master] math: x86: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtype Pranav Kant

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).