Fix whitespace issue.
[glibc.git] / sysdeps / x86_64 / fpu / math_private.h
blob4be753654a52ef24e15cf549e7f6c0bb13f2811c
1 #ifndef _MATH_PRIVATE_H
3 #define math_opt_barrier(x) \
4 ({ __typeof(x) __x; \
5 if (sizeof (x) <= sizeof (double)) \
6 __asm ("" : "=x" (__x) : "0" (x)); \
7 else \
8 __asm ("" : "=t" (__x) : "0" (x)); \
9 __x; })
10 #define math_force_eval(x) \
11 do \
12 { \
13 if (sizeof (x) <= sizeof (double)) \
14 __asm __volatile ("" : : "x" (x)); \
15 else \
16 __asm __volatile ("" : : "f" (x)); \
17 } \
18 while (0)
20 #include <math/math_private.h>
22 /* We can do a few things better on x86-64. */
24 /* Direct movement of float into integer register. */
25 #undef EXTRACT_WORDS64
26 #define EXTRACT_WORDS64(i,d) \
27 do { \
28 long int i_; \
29 asm ("movd %1, %0" : "=rm" (i_) : "x" (d)); \
30 (i) = i_; \
31 } while (0)
33 /* And the reverse. */
34 #undef INSERT_WORDS64
35 #define INSERT_WORDS64(d,i) \
36 do { \
37 long int i_ = i; \
38 asm ("movd %1, %0" : "=x" (d) : "rm" (i_)); \
39 } while (0)
41 /* Direct movement of float into integer register. */
42 #undef GET_FLOAT_WORD
43 #define GET_FLOAT_WORD(i,d) \
44 do { \
45 int i_; \
46 asm ("movd %1, %0" : "=rm" (i_) : "x" (d)); \
47 (i) = i_; \
48 } while (0)
50 /* And the reverse. */
51 #undef SET_FLOAT_WORD
52 #define SET_FLOAT_WORD(d,i) \
53 do { \
54 int i_ = i; \
55 asm ("movd %1, %0" : "=x" (d) : "rm" (i_)); \
56 } while (0)
58 #endif