Use movq for 64-bit operations
The EXTRACT_WORDS64 and INSERT_WORDS64 macros use movd for a 64-bit operation. Somehow gcc manages to turn this into movq, but LLVM won't. 2013-05-15 Peter Collingbourne <pcc@google.com> * sysdeps/x86_64/fpu/math_private.h (MOVQ): New macro. (EXTRACT_WORDS64) Use where appropriate. (INSERT_WORDS64) Likewise.
This commit is contained in:
parent
791f3ba0db
commit
1deff3dca1
|
@ -1,5 +1,9 @@
|
||||||
2013-05-15 Peter Collingbourne <pcc@google.com>
|
2013-05-15 Peter Collingbourne <pcc@google.com>
|
||||||
|
|
||||||
|
* sysdeps/x86_64/fpu/math_private.h (MOVQ): New macro.
|
||||||
|
(EXTRACT_WORDS64) Use where appropriate.
|
||||||
|
(INSERT_WORDS64) Likewise.
|
||||||
|
|
||||||
* sysdeps/x86_64/fpu/multiarch/s_fma.c (__fma_fma4): Replace xm
|
* sysdeps/x86_64/fpu/multiarch/s_fma.c (__fma_fma4): Replace xm
|
||||||
constraints with x constraints.
|
constraints with x constraints.
|
||||||
* sysdeps/x86_64/fpu/multiarch/s_fmaf.c (__fmaf_fma4): Likewise.
|
* sysdeps/x86_64/fpu/multiarch/s_fmaf.c (__fmaf_fma4): Likewise.
|
||||||
|
|
|
@ -5,15 +5,17 @@
|
||||||
|
|
||||||
#if defined __AVX__ || defined SSE2AVX
|
#if defined __AVX__ || defined SSE2AVX
|
||||||
# define MOVD "vmovd"
|
# define MOVD "vmovd"
|
||||||
|
# define MOVQ "vmovq"
|
||||||
#else
|
#else
|
||||||
# define MOVD "movd"
|
# define MOVD "movd"
|
||||||
|
# define MOVQ "movq"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Direct movement of float into integer register. */
|
/* Direct movement of float into integer register. */
|
||||||
#define EXTRACT_WORDS64(i, d) \
|
#define EXTRACT_WORDS64(i, d) \
|
||||||
do { \
|
do { \
|
||||||
int64_t i_; \
|
int64_t i_; \
|
||||||
asm (MOVD " %1, %0" : "=rm" (i_) : "x" ((double) (d))); \
|
asm (MOVQ " %1, %0" : "=rm" (i_) : "x" ((double) (d))); \
|
||||||
(i) = i_; \
|
(i) = i_; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
@ -22,7 +24,7 @@
|
||||||
do { \
|
do { \
|
||||||
int64_t i_ = i; \
|
int64_t i_ = i; \
|
||||||
double d__; \
|
double d__; \
|
||||||
asm (MOVD " %1, %0" : "=x" (d__) : "rm" (i_)); \
|
asm (MOVQ " %1, %0" : "=x" (d__) : "rm" (i_)); \
|
||||||
d = d__; \
|
d = d__; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue