public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/azanella/clang] math: x86: Avoid the use of __libgcc_cmp_return__ for __gcc_CMPtype
Date: Thu, 12 May 2022 19:32:55 +0000 (GMT)	[thread overview]
Message-ID: <20220512193255.CD9B238845FF@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0ff9de167a11fb7e82501cdb8d8dd4e0164c0ed3

commit 0ff9de167a11fb7e82501cdb8d8dd4e0164c0ed3
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 1cacdb4ebd..60c4b9fcef 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


             reply	other threads:[~2022-05-12 19:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-12 19:32 Adhemerval Zanella [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-08-30 12:36 Adhemerval Zanella
2023-02-09 19:48 Adhemerval Zanella
2022-10-28 17:41 Adhemerval Zanella
2022-10-04 12:58 Adhemerval Zanella
2022-06-09 21:19 Adhemerval Zanella
2022-06-09 13:16 Adhemerval Zanella
2022-06-03 14:05 Adhemerval Zanella
2022-05-13 14:19 Adhemerval Zanella
2022-05-10 18:23 Adhemerval Zanella
2022-04-29 14:03 Adhemerval Zanella
2022-04-04 12:53 Adhemerval Zanella
2022-03-31 19:06 Adhemerval Zanella
2022-03-29 20:29 Adhemerval Zanella
2022-03-16 18:02 Adhemerval Zanella
2022-03-15 18:40 Adhemerval Zanella
2022-03-11 17:24 Adhemerval Zanella
2022-03-10 19:23 Adhemerval Zanella

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220512193255.CD9B238845FF@sourceware.org \
    --to=azanella@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).