1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

[powerpc] add 'volatile' to asm

Add 'volatile' keyword to a few asm statements, to force the compiler
to generate the instructions therein.

Some instances were implicitly volatile, but adding keyword for consistency.

2019-06-19  Paul A. Clarke  <pc@us.ibm.com>

	* sysdeps/powerpc/fpu/fenv_libc.h (relax_fenv_state): Add 'volatile'.
	* sysdeps/powerpc/fpu/fpu_control.h (__FPU_MFFS): Likewise.
	(__FPU_MFFSL): Likewise.
	(_FPU_SETCW): Likewise.
This commit is contained in:
Paul A. Clarke
2019-06-11 14:37:37 -05:00
parent 335c1007bf
commit 49bc41b642
3 changed files with 12 additions and 5 deletions

View File

@ -67,7 +67,7 @@ typedef unsigned int fpu_control_t;
/* Macros for accessing the hardware control word. */
# define __FPU_MFFS() \
({register double __fr; \
__asm__ ("mffs %0" : "=f" (__fr)); \
__asm__ __volatile__("mffs %0" : "=f" (__fr)); \
__fr; \
})
@ -81,7 +81,7 @@ typedef unsigned int fpu_control_t;
#ifdef _ARCH_PWR9
# define __FPU_MFFSL() \
({register double __fr; \
__asm__ ("mffsl %0" : "=f" (__fr)); \
__asm__ __volatile__("mffsl %0" : "=f" (__fr)); \
__fr; \
})
#else
@ -101,7 +101,7 @@ typedef unsigned int fpu_control_t;
__u.__ll = 0xfff80000LL << 32; /* This is a QNaN. */ \
__u.__ll |= (cw) & 0xffffffffLL; \
__fr = __u.__d; \
__asm__ ("mtfsf 255,%0" : : "f" (__fr)); \
__asm__ __volatile__("mtfsf 255,%0" : : "f" (__fr)); \
}
/* Default control word set at startup. */