Explorar o código

aarch64/fpu_control.h: Don't use gcc-internal types

Commit 618001c26e224fd4aff72b8e5530498acbad747a introduced fenv support
from glibc. However that uses type names which are gcc-internal and not
supported by compilers such as clang. Clang also does not have builtins
for accessing the fpsr / fpcr registers, so it needs to use the
fall-back path.

Include stdint.h and use uint64_t instead of __uint64_t to make the code
work with clang as well.

Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
Marcus Haehnel hai 2 días
pai
achega
1731400fc5
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  1. 5 4
      libc/sysdeps/linux/aarch64/fpu_control.h

+ 5 - 4
libc/sysdeps/linux/aarch64/fpu_control.h

@@ -18,6 +18,7 @@
 #define _AARCH64_FPU_CONTROL_H
 
 #include <features.h>
+#include <stdint.h>
 
 /* Macros for accessing the FPCR and FPSR.  */
 
@@ -29,27 +30,27 @@
 #else
 # define _FPU_GETCW(fpcr)					\
   ({ 								\
-   __uint64_t __fpcr;						\
+   uint64_t __fpcr;						\
    __asm__ __volatile__ ("mrs	%0, fpcr" : "=r" (__fpcr));	\
    fpcr = __fpcr;						\
   })
 
 # define _FPU_SETCW(fpcr)					\
   ({								\
-   __uint64_t __fpcr = fpcr;					\
+   uint64_t __fpcr = fpcr;					\
    __asm__ __volatile__ ("msr	fpcr, %0" : : "r" (__fpcr));    \
   })
 
 # define _FPU_GETFPSR(fpsr)					\
   ({								\
-   __uint64_t __fpsr;						\
+   uint64_t __fpsr;						\
    __asm__ __volatile__ ("mrs	%0, fpsr" : "=r" (__fpsr));	\
    fpsr = __fpsr;						\
   })
 
 # define _FPU_SETFPSR(fpsr)					\
   ({								\
-   __uint64_t __fpsr = fpsr;					\
+   uint64_t __fpsr = fpsr;					\
    __asm__ __volatile__ ("msr	fpsr, %0" : : "r" (__fpsr));    \
   })
 #endif