From: Andreas Arnez <arnez@linux.ibm.com>
To: libc-alpha@sourceware.org
Cc: Stefan Liebler <stli@linux.ibm.com>
Subject: [PATCH] S390: Fix _FPU_SETCW/GETCW when compiling with Clang [BZ #30130]
Date: Tue, 28 Feb 2023 13:48:06 +0100 [thread overview]
Message-ID: <877cw2rm61.fsf@li-07e5db4c-3052-11b2-a85c-815382633c95.ibm.com> (raw)
The _FPU_SETCW and _FPU_GETCW macros are defined with inline assemblies.
They use the sfpc and efpc instructions, respectively. But both contain
a spurious second operand that leads to a compile error with Clang.
Removing this operand works both with gcc/gas (since binutils 2.18) as
well as with clang/llvm.
---
sysdeps/s390/fpu/fpu_control.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sysdeps/s390/fpu/fpu_control.h b/sysdeps/s390/fpu/fpu_control.h
index e00d7775f4..567b180034 100644
--- a/sysdeps/s390/fpu/fpu_control.h
+++ b/sysdeps/s390/fpu/fpu_control.h
@@ -32,8 +32,8 @@
typedef unsigned int fpu_control_t;
/* Macros for accessing the hardware control word. */
-#define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0,0" : "=d" (cw))
-#define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0,0" : : "d" (cw))
+#define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0" : "=d" (cw))
+#define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0" : : "d" (cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
--
2.39.1
next reply other threads:[~2023-02-28 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-28 12:48 Andreas Arnez [this message]
2023-02-28 13:05 ` Stefan Liebler
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=877cw2rm61.fsf@li-07e5db4c-3052-11b2-a85c-815382633c95.ibm.com \
--to=arnez@linux.ibm.com \
--cc=libc-alpha@sourceware.org \
--cc=stli@linux.ibm.com \
/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).