mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-11 11:50:06 +00:00
math: x86: Use prefix for FP_INIT_ROUNDMODE
Not all compilers support the inline asm prefix '%v' to emit the avx instruction if AVX is enable. Use a prefix instead. Checked on x86_64-linux-gnu and i686-linux-gnu.
This commit is contained in:
parent
0784e7913f
commit
2fc7320668
@ -39,9 +39,15 @@ typedef unsigned int UTItype __attribute__ ((mode (TI)));
|
||||
|
||||
# define FP_RND_MASK 0x6000
|
||||
|
||||
# ifdef __AVX__
|
||||
# define AVX_INSN_PREFIX "v"
|
||||
# else
|
||||
# define AVX_INSN_PREFIX ""
|
||||
# endif
|
||||
|
||||
# define FP_INIT_ROUNDMODE \
|
||||
do { \
|
||||
__asm__ __volatile__ ("%vstmxcsr\t%0" : "=m" (_fcw)); \
|
||||
__asm__ __volatile__ (AVX_INSN_PREFIX "stmxcsr\t%0" : "=m" (_fcw)); \
|
||||
} while (0)
|
||||
#else
|
||||
# define _FP_W_TYPE_SIZE 32
|
||||
|
Loading…
Reference in New Issue
Block a user