From: Andreas Arnez Date: Tue, 28 Feb 2023 12:48:06 +0000 (+0100) Subject: S390: Fix _FPU_SETCW/GETCW when compiling with Clang [BZ #30130] X-Git-Tag: glibc-2.38~517 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3862773e1efba89ac7da43be80e64140b073c4e2;p=thirdparty%2Fglibc.git S390: Fix _FPU_SETCW/GETCW when compiling with Clang [BZ #30130] 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. --- diff --git a/sysdeps/s390/fpu/fpu_control.h b/sysdeps/s390/fpu/fpu_control.h index e00d7775f45..567b180034d 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;