public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Stefan Liebler <stli@linux.ibm.com>
To: Andreas Arnez <arnez@linux.ibm.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH] S390: Fix _FPU_SETCW/GETCW when compiling with Clang [BZ #30130]
Date: Tue, 28 Feb 2023 14:05:44 +0100	[thread overview]
Message-ID: <9038d70d-035b-e61e-edc7-dead8fad4a7e@linux.ibm.com> (raw)
In-Reply-To: <877cw2rm61.fsf@li-07e5db4c-3052-11b2-a85c-815382633c95.ibm.com>

On 28.02.23 13:48, Andreas Arnez wrote:
> 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;

As mentioned in the bugzilla. This patch is fine. I've just committed it
and closed the bugzilla.

Thanks,
Stefan

      reply	other threads:[~2023-02-28 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 12:48 Andreas Arnez
2023-02-28 13:05 ` Stefan Liebler [this message]

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=9038d70d-035b-e61e-edc7-dead8fad4a7e@linux.ibm.com \
    --to=stli@linux.ibm.com \
    --cc=arnez@linux.ibm.com \
    --cc=libc-alpha@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).