From 10cce66930b3dc0405106bbb62a6d44602bec118 Mon Sep 17 00:00:00 2001 From: "Paul A. Clarke" Date: Fri, 29 Mar 2019 19:16:34 -0500 Subject: [powerpc] Use __builtin_{mffs,mtfsf} Replace inline asm uses of the "mffs" and "mtfsf" instructions with the analogous GCC builtins. __builtin_mffs and __builtin_mtfsf are both available in GCC 5 and above. Given the minimum GCC level for GLibC is now GCC 6.2, it is safe to use these builtins without restriction. 2019-03-29 Paul A. Clarke * sysdeps/powerpc/fpu/fenv_libc.h (fegetenv_register): Replace inline asm with builtin. * sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h (FP_INIT_ROUNDMODE): Likewise. * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (_GET_DI_FPSCR): Likewise. (_GET_SI_FPSCR): Likewise. (_SET_SI_FPSCR): Likewise. --- sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sysdeps/powerpc/powerpc64/le/fpu') diff --git a/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h b/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h index ac74097d44..b4b27f95f4 100644 --- a/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h +++ b/sysdeps/powerpc/powerpc64/le/fpu/sfp-machine.h @@ -107,8 +107,7 @@ void __sfp_handle_exceptions (int); #define FP_INIT_ROUNDMODE \ do { \ - __asm__ __volatile__ ("mffs %0" \ - : "=f" (_fpscr.d)); \ + _fpscr.d = __builtin_mffs (); \ } while (0) # define FP_ROUNDMODE (_fpscr.i & FP_RND_MASK) -- cgit 1.4.1