forked from OSchip/llvm-project
builtins: define and use ALWAYS_INLINE
Abstract out the always inline spelling similar to ASAN. NFC. llvm-svn: 249986
This commit is contained in:
parent
8b3353f20f
commit
e49971517a
|
@ -43,10 +43,12 @@
|
|||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define ALWAYS_INLINE __forceinline
|
||||
#define NOINLINE __declspec(noinline)
|
||||
#define NORETURN __declspec(noreturn)
|
||||
#define UNUSED
|
||||
#else
|
||||
#define ALWAYS_INLINE __attribute__((always_inline))
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
|
|
@ -19,20 +19,19 @@ typedef union {
|
|||
#define LOWORDER(xy,xHi,xLo,yHi,yLo) \
|
||||
(((((xHi)*(yHi) - (xy)) + (xHi)*(yLo)) + (xLo)*(yHi)) + (xLo)*(yLo))
|
||||
|
||||
static __inline double __attribute__((always_inline)) local_fabs(double x) {
|
||||
static __inline ALWAYS_INLINE double local_fabs(double x) {
|
||||
doublebits result = {.d = x};
|
||||
result.x &= UINT64_C(0x7fffffffffffffff);
|
||||
return result.d;
|
||||
}
|
||||
|
||||
static __inline double __attribute__((always_inline)) high26bits(double x) {
|
||||
static __inline ALWAYS_INLINE double high26bits(double x) {
|
||||
doublebits result = {.d = x};
|
||||
result.x &= UINT64_C(0xfffffffff8000000);
|
||||
return result.d;
|
||||
}
|
||||
|
||||
static __inline int __attribute__((always_inline))
|
||||
different_sign(double x, double y) {
|
||||
static __inline ALWAYS_INLINE int different_sign(double x, double y) {
|
||||
doublebits xsignbit = {.d = x}, ysignbit = {.d = y};
|
||||
int result = (int)(xsignbit.x >> 63) ^ (int)(ysignbit.x >> 63);
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue