summaryrefslogtreecommitdiff
path: root/lib/builtins
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2015-10-11 17:35:42 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2015-10-11 17:35:42 +0000
commit4a5943aa040c06c4c36fc6a8902e72fc97520a2c (patch)
treed04f9744d3a8ca0d313728d31897e407f8b230a6 /lib/builtins
parentd13e190deab4e4ae5cb18421f14d904e980aee9e (diff)
builtins: define and use ALWAYS_INLINE
Abstract out the always inline spelling similar to ASAN. NFC. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins')
-rw-r--r--lib/builtins/int_lib.h2
-rw-r--r--lib/builtins/ppc/DD.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/builtins/int_lib.h b/lib/builtins/int_lib.h
index e6fcf2f4e..c2a5090ed 100644
--- a/lib/builtins/int_lib.h
+++ b/lib/builtins/int_lib.h
@@ -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))
diff --git a/lib/builtins/ppc/DD.h b/lib/builtins/ppc/DD.h
index b5d6a1248..679c7f186 100644
--- a/lib/builtins/ppc/DD.h
+++ b/lib/builtins/ppc/DD.h
@@ -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;