summaryrefslogtreecommitdiffstats
path: root/compiler-rt
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt')
-rw-r--r--compiler-rt/lib/arm/Makefile.mk2
-rw-r--r--compiler-rt/lib/arm/adddf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/addsf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/bswapdi2.S1
-rw-r--r--compiler-rt/lib/arm/bswapsi2.S1
-rw-r--r--compiler-rt/lib/arm/divdf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/divsf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/eqdf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/eqsf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/extendsfdf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/fixdfsivfp.S1
-rw-r--r--compiler-rt/lib/arm/fixsfsivfp.S1
-rw-r--r--compiler-rt/lib/arm/fixunsdfsivfp.S1
-rw-r--r--compiler-rt/lib/arm/fixunssfsivfp.S1
-rw-r--r--compiler-rt/lib/arm/floatsidfvfp.S1
-rw-r--r--compiler-rt/lib/arm/floatsisfvfp.S1
-rw-r--r--compiler-rt/lib/arm/floatunssidfvfp.S1
-rw-r--r--compiler-rt/lib/arm/floatunssisfvfp.S1
-rw-r--r--compiler-rt/lib/arm/gedf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/gesf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/gtdf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/gtsf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/ledf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/lesf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/ltdf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/ltsf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/muldf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/mulsf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/nedf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/negdf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/negsf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/nesf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/subdf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/subsf3vfp.S1
-rw-r--r--compiler-rt/lib/arm/switch.S2
-rw-r--r--compiler-rt/lib/arm/truncdfsf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/unorddf2vfp.S1
-rw-r--r--compiler-rt/lib/arm/unordsf2vfp.S1
-rw-r--r--compiler-rt/lib/assembly.h42
-rw-r--r--compiler-rt/lib/i386/Makefile.mk2
-rw-r--r--compiler-rt/lib/i386/ashldi3.S2
-rw-r--r--compiler-rt/lib/i386/ashrdi3.S2
-rw-r--r--compiler-rt/lib/i386/divdi3.S2
-rw-r--r--compiler-rt/lib/i386/floatdidf.S2
-rw-r--r--compiler-rt/lib/i386/floatdisf.S2
-rw-r--r--compiler-rt/lib/i386/floatdixf.S2
-rw-r--r--compiler-rt/lib/i386/floatundidf.S2
-rw-r--r--compiler-rt/lib/i386/floatundisf.S2
-rw-r--r--compiler-rt/lib/i386/floatundixf.S2
-rw-r--r--compiler-rt/lib/i386/lshrdi3.S2
-rw-r--r--compiler-rt/lib/i386/moddi3.S2
-rw-r--r--compiler-rt/lib/i386/muldi3.S2
-rw-r--r--compiler-rt/lib/i386/udivdi3.S2
-rw-r--r--compiler-rt/lib/i386/umoddi3.S2
-rw-r--r--compiler-rt/lib/ppc/Makefile.mk2
-rw-r--r--compiler-rt/lib/ppc/restFP.S1
-rw-r--r--compiler-rt/lib/ppc/saveFP.S1
-rw-r--r--compiler-rt/lib/x86_64/Makefile.mk2
-rw-r--r--compiler-rt/lib/x86_64/floatundidf.S2
-rw-r--r--compiler-rt/lib/x86_64/floatundisf.S2
-rw-r--r--compiler-rt/lib/x86_64/floatundixf.S2
61 files changed, 120 insertions, 4 deletions
diff --git a/compiler-rt/lib/arm/Makefile.mk b/compiler-rt/lib/arm/Makefile.mk
index 7f9a9822024..ac08a61a3b4 100644
--- a/compiler-rt/lib/arm/Makefile.mk
+++ b/compiler-rt/lib/arm/Makefile.mk
@@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
-Dependencies := $(wildcard $(Dir)/*.h)
+Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk
diff --git a/compiler-rt/lib/arm/adddf3vfp.S b/compiler-rt/lib/arm/adddf3vfp.S
index f4bb1ce4c39..b1f7077ab0c 100644
--- a/compiler-rt/lib/arm/adddf3vfp.S
+++ b/compiler-rt/lib/arm/adddf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// double __adddf3vfp(double a, double b) { return a + b; }
diff --git a/compiler-rt/lib/arm/addsf3vfp.S b/compiler-rt/lib/arm/addsf3vfp.S
index 81b114f6729..4a4a041aaba 100644
--- a/compiler-rt/lib/arm/addsf3vfp.S
+++ b/compiler-rt/lib/arm/addsf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __addsf3vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/bswapdi2.S b/compiler-rt/lib/arm/bswapdi2.S
index 7e1aeb177ec..70c13e6b9ce 100644
--- a/compiler-rt/lib/arm/bswapdi2.S
+++ b/compiler-rt/lib/arm/bswapdi2.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern uint64_t __bswapdi2(uint64_t);
diff --git a/compiler-rt/lib/arm/bswapsi2.S b/compiler-rt/lib/arm/bswapsi2.S
index d7f977e8fa0..8f0e1d34990 100644
--- a/compiler-rt/lib/arm/bswapsi2.S
+++ b/compiler-rt/lib/arm/bswapsi2.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern uint32_t __bswapsi2(uint32_t);
diff --git a/compiler-rt/lib/arm/divdf3vfp.S b/compiler-rt/lib/arm/divdf3vfp.S
index 59421ef1465..c62c61e68ba 100644
--- a/compiler-rt/lib/arm/divdf3vfp.S
+++ b/compiler-rt/lib/arm/divdf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __divdf3vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/divsf3vfp.S b/compiler-rt/lib/arm/divsf3vfp.S
index 62c79ea568c..4bf74636a00 100644
--- a/compiler-rt/lib/arm/divsf3vfp.S
+++ b/compiler-rt/lib/arm/divsf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __divsf3vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/eqdf2vfp.S b/compiler-rt/lib/arm/eqdf2vfp.S
index 8111a0d541d..25cc959148e 100644
--- a/compiler-rt/lib/arm/eqdf2vfp.S
+++ b/compiler-rt/lib/arm/eqdf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __eqdf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/eqsf2vfp.S b/compiler-rt/lib/arm/eqsf2vfp.S
index 7d995b5a153..a87b7674844 100644
--- a/compiler-rt/lib/arm/eqsf2vfp.S
+++ b/compiler-rt/lib/arm/eqsf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __eqsf2vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/extendsfdf2vfp.S b/compiler-rt/lib/arm/extendsfdf2vfp.S
index 024bbf0f17a..ea251e2bbda 100644
--- a/compiler-rt/lib/arm/extendsfdf2vfp.S
+++ b/compiler-rt/lib/arm/extendsfdf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __extendsfdf2vfp(float a);
diff --git a/compiler-rt/lib/arm/fixdfsivfp.S b/compiler-rt/lib/arm/fixdfsivfp.S
index 75c322de938..41788597b67 100644
--- a/compiler-rt/lib/arm/fixdfsivfp.S
+++ b/compiler-rt/lib/arm/fixdfsivfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __fixdfsivfp(double a);
diff --git a/compiler-rt/lib/arm/fixsfsivfp.S b/compiler-rt/lib/arm/fixsfsivfp.S
index cd2fbe8cc81..d480390593d 100644
--- a/compiler-rt/lib/arm/fixsfsivfp.S
+++ b/compiler-rt/lib/arm/fixsfsivfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __fixsfsivfp(float a);
diff --git a/compiler-rt/lib/arm/fixunsdfsivfp.S b/compiler-rt/lib/arm/fixunsdfsivfp.S
index ab6c4df9ba3..bd9c1b83649 100644
--- a/compiler-rt/lib/arm/fixunsdfsivfp.S
+++ b/compiler-rt/lib/arm/fixunsdfsivfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern unsigned int __fixunsdfsivfp(double a);
diff --git a/compiler-rt/lib/arm/fixunssfsivfp.S b/compiler-rt/lib/arm/fixunssfsivfp.S
index c39c69839ae..c8ce25f3a93 100644
--- a/compiler-rt/lib/arm/fixunssfsivfp.S
+++ b/compiler-rt/lib/arm/fixunssfsivfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern unsigned int __fixunssfsivfp(float a);
diff --git a/compiler-rt/lib/arm/floatsidfvfp.S b/compiler-rt/lib/arm/floatsidfvfp.S
index d4029248132..b268d04d71d 100644
--- a/compiler-rt/lib/arm/floatsidfvfp.S
+++ b/compiler-rt/lib/arm/floatsidfvfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __floatsidfvfp(int a);
diff --git a/compiler-rt/lib/arm/floatsisfvfp.S b/compiler-rt/lib/arm/floatsisfvfp.S
index 29e7e0df5b5..dea5a4eb53d 100644
--- a/compiler-rt/lib/arm/floatsisfvfp.S
+++ b/compiler-rt/lib/arm/floatsisfvfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __floatsisfvfp(int a);
diff --git a/compiler-rt/lib/arm/floatunssidfvfp.S b/compiler-rt/lib/arm/floatunssidfvfp.S
index 148945f6676..077385ec0fd 100644
--- a/compiler-rt/lib/arm/floatunssidfvfp.S
+++ b/compiler-rt/lib/arm/floatunssidfvfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __floatunssidfvfp(unsigned int a);
diff --git a/compiler-rt/lib/arm/floatunssisfvfp.S b/compiler-rt/lib/arm/floatunssisfvfp.S
index c8322787a6e..3ad71942223 100644
--- a/compiler-rt/lib/arm/floatunssisfvfp.S
+++ b/compiler-rt/lib/arm/floatunssisfvfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __floatunssisfvfp(unsigned int a);
diff --git a/compiler-rt/lib/arm/gedf2vfp.S b/compiler-rt/lib/arm/gedf2vfp.S
index 77d07bd8934..3f2f6c14d07 100644
--- a/compiler-rt/lib/arm/gedf2vfp.S
+++ b/compiler-rt/lib/arm/gedf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __gedf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/gesf2vfp.S b/compiler-rt/lib/arm/gesf2vfp.S
index 205c3650ede..83b2f0961e0 100644
--- a/compiler-rt/lib/arm/gesf2vfp.S
+++ b/compiler-rt/lib/arm/gesf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __gesf2vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/gtdf2vfp.S b/compiler-rt/lib/arm/gtdf2vfp.S
index 8d6ebcf42e1..2daa7c4e126 100644
--- a/compiler-rt/lib/arm/gtdf2vfp.S
+++ b/compiler-rt/lib/arm/gtdf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __gtdf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/gtsf2vfp.S b/compiler-rt/lib/arm/gtsf2vfp.S
index 745a7c6dcfe..c388865082f 100644
--- a/compiler-rt/lib/arm/gtsf2vfp.S
+++ b/compiler-rt/lib/arm/gtsf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __gtsf2vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/ledf2vfp.S b/compiler-rt/lib/arm/ledf2vfp.S
index 4dc9f47fb5b..1ab250daca2 100644
--- a/compiler-rt/lib/arm/ledf2vfp.S
+++ b/compiler-rt/lib/arm/ledf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __ledf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/lesf2vfp.S b/compiler-rt/lib/arm/lesf2vfp.S
index b0a17af8f28..8166d4b26f0 100644
--- a/compiler-rt/lib/arm/lesf2vfp.S
+++ b/compiler-rt/lib/arm/lesf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __lesf2vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/ltdf2vfp.S b/compiler-rt/lib/arm/ltdf2vfp.S
index 315bb6f7c94..e17406bff82 100644
--- a/compiler-rt/lib/arm/ltdf2vfp.S
+++ b/compiler-rt/lib/arm/ltdf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __ltdf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/ltsf2vfp.S b/compiler-rt/lib/arm/ltsf2vfp.S
index 18a1cc50cc6..f281a71a0a2 100644
--- a/compiler-rt/lib/arm/ltsf2vfp.S
+++ b/compiler-rt/lib/arm/ltsf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __ltsf2vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/muldf3vfp.S b/compiler-rt/lib/arm/muldf3vfp.S
index 5292b8e87b4..7ae256af594 100644
--- a/compiler-rt/lib/arm/muldf3vfp.S
+++ b/compiler-rt/lib/arm/muldf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __muldf3vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/mulsf3vfp.S b/compiler-rt/lib/arm/mulsf3vfp.S
index e6cdca3a6fc..16dbdb227f2 100644
--- a/compiler-rt/lib/arm/mulsf3vfp.S
+++ b/compiler-rt/lib/arm/mulsf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __mulsf3vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/nedf2vfp.S b/compiler-rt/lib/arm/nedf2vfp.S
index 8cf4dc2f19f..a7541de143f 100644
--- a/compiler-rt/lib/arm/nedf2vfp.S
+++ b/compiler-rt/lib/arm/nedf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __nedf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/negdf2vfp.S b/compiler-rt/lib/arm/negdf2vfp.S
index b047ccc726c..bff2767bd36 100644
--- a/compiler-rt/lib/arm/negdf2vfp.S
+++ b/compiler-rt/lib/arm/negdf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __negdf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/negsf2vfp.S b/compiler-rt/lib/arm/negsf2vfp.S
index 1b0f3d6bea3..9b0ce2811d9 100644
--- a/compiler-rt/lib/arm/negsf2vfp.S
+++ b/compiler-rt/lib/arm/negsf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __negsf2vfp(float a);
diff --git a/compiler-rt/lib/arm/nesf2vfp.S b/compiler-rt/lib/arm/nesf2vfp.S
index da0eef65614..ee37c1d9f6d 100644
--- a/compiler-rt/lib/arm/nesf2vfp.S
+++ b/compiler-rt/lib/arm/nesf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __nesf2vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/subdf3vfp.S b/compiler-rt/lib/arm/subdf3vfp.S
index c138c3a2ea1..ebeca2fb94d 100644
--- a/compiler-rt/lib/arm/subdf3vfp.S
+++ b/compiler-rt/lib/arm/subdf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern double __subdf3vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/subsf3vfp.S b/compiler-rt/lib/arm/subsf3vfp.S
index 493a8508666..3e9d602c7b3 100644
--- a/compiler-rt/lib/arm/subsf3vfp.S
+++ b/compiler-rt/lib/arm/subsf3vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __subsf3vfp(float a, float b);
diff --git a/compiler-rt/lib/arm/switch.S b/compiler-rt/lib/arm/switch.S
index bfde0dad2b4..7b11c4f1e62 100644
--- a/compiler-rt/lib/arm/switch.S
+++ b/compiler-rt/lib/arm/switch.S
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
+
//
// When compiling switch statements in thumb mode, the compiler
// can use these __switch* helper functions The compiler emits a blx to
diff --git a/compiler-rt/lib/arm/truncdfsf2vfp.S b/compiler-rt/lib/arm/truncdfsf2vfp.S
index 2e26fdcf201..0d635beab65 100644
--- a/compiler-rt/lib/arm/truncdfsf2vfp.S
+++ b/compiler-rt/lib/arm/truncdfsf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern float __truncdfsf2vfp(double a);
diff --git a/compiler-rt/lib/arm/unorddf2vfp.S b/compiler-rt/lib/arm/unorddf2vfp.S
index e458eb8c156..85968b47a76 100644
--- a/compiler-rt/lib/arm/unorddf2vfp.S
+++ b/compiler-rt/lib/arm/unorddf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __unorddf2vfp(double a, double b);
diff --git a/compiler-rt/lib/arm/unordsf2vfp.S b/compiler-rt/lib/arm/unordsf2vfp.S
index 6b69080ff33..852d4ebfb6c 100644
--- a/compiler-rt/lib/arm/unordsf2vfp.S
+++ b/compiler-rt/lib/arm/unordsf2vfp.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// extern int __unordsf2vfp(float a, float b);
diff --git a/compiler-rt/lib/assembly.h b/compiler-rt/lib/assembly.h
new file mode 100644
index 00000000000..808f7e404ca
--- /dev/null
+++ b/compiler-rt/lib/assembly.h
@@ -0,0 +1,42 @@
+/* ===-- assembly.h - compiler-rt assembler support macros -----------------===
+ *
+ * The LLVM Compiler Infrastructure
+ *
+ * This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ *
+ * ===----------------------------------------------------------------------===
+ *
+ * This file defines macros for use in compiler-rt assembler source.
+ * This file is not part of the interface of this library.
+ *
+ * ===----------------------------------------------------------------------===
+ */
+
+#ifndef COMPILERRT_ASSEMBLY_H
+#define COMPILERRT_ASSEMBLY_H
+
+// Define SYMBOL_NAME to add the appropriate symbol prefix; we can't use
+// USER_LABEL_PREFIX directly because of cpp brokenness.
+#if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__)
+
+#define SYMBOL_NAME(name) name
+#define SEPARATOR @
+
+#else
+
+#define SYMBOL_NAME(name) _##name
+#define SEPARATOR ;
+
+#endif
+
+#define DEFINE_COMPILERRT_FUNCTION(name) \
+ .globl SYMBOL_NAME(name) SEPARATOR \
+ SYMBOL_NAME(name):
+
+#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
+ .globl SYMBOL_NAME(name) SEPARATOR \
+ .private_extern SYMBOL_NAME(name) SEPARATOR \
+ SYMBOL_NAME(name):
+
+#endif /* COMPILERRT_ASSEMBLY_H */
diff --git a/compiler-rt/lib/i386/Makefile.mk b/compiler-rt/lib/i386/Makefile.mk
index 4453e03df13..3ed4dc80b0d 100644
--- a/compiler-rt/lib/i386/Makefile.mk
+++ b/compiler-rt/lib/i386/Makefile.mk
@@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
-Dependencies := $(wildcard $(Dir)/*.h)
+Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk
diff --git a/compiler-rt/lib/i386/ashldi3.S b/compiler-rt/lib/i386/ashldi3.S
index 0d9aba4597c..7a7906ba995 100644
--- a/compiler-rt/lib/i386/ashldi3.S
+++ b/compiler-rt/lib/i386/ashldi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// di_int __ashldi3(di_int input, int count);
// This routine has some extra memory traffic, loading the 64-bit input via two
diff --git a/compiler-rt/lib/i386/ashrdi3.S b/compiler-rt/lib/i386/ashrdi3.S
index 216801469d7..d0a4c4289ef 100644
--- a/compiler-rt/lib/i386/ashrdi3.S
+++ b/compiler-rt/lib/i386/ashrdi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// di_int __ashrdi3(di_int input, int count);
#ifdef __i386__
diff --git a/compiler-rt/lib/i386/divdi3.S b/compiler-rt/lib/i386/divdi3.S
index 3b50266d72f..1ce22da678f 100644
--- a/compiler-rt/lib/i386/divdi3.S
+++ b/compiler-rt/lib/i386/divdi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// di_int __divdi3(di_int a, di_int b);
// result = a / b.
diff --git a/compiler-rt/lib/i386/floatdidf.S b/compiler-rt/lib/i386/floatdidf.S
index 34736ac58d9..012697b1baf 100644
--- a/compiler-rt/lib/i386/floatdidf.S
+++ b/compiler-rt/lib/i386/floatdidf.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// double __floatundidf(du_int a);
#ifdef __i386__
diff --git a/compiler-rt/lib/i386/floatdisf.S b/compiler-rt/lib/i386/floatdisf.S
index 20b80d1d895..152a93d69cc 100644
--- a/compiler-rt/lib/i386/floatdisf.S
+++ b/compiler-rt/lib/i386/floatdisf.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// float __floatdisf(di_int a);
// This routine has some extra memory traffic, loading the 64-bit input via two
diff --git a/compiler-rt/lib/i386/floatdixf.S b/compiler-rt/lib/i386/floatdixf.S
index 71e2d2abc73..cd85c097cde 100644
--- a/compiler-rt/lib/i386/floatdixf.S
+++ b/compiler-rt/lib/i386/floatdixf.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// float __floatdixf(di_int a);
#ifdef __i386__
diff --git a/compiler-rt/lib/i386/floatundidf.S b/compiler-rt/lib/i386/floatundidf.S
index 943ec380530..e38e4556e2b 100644
--- a/compiler-rt/lib/i386/floatundidf.S
+++ b/compiler-rt/lib/i386/floatundidf.S
@@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
+
// double __floatundidf(du_int a);
#ifdef __i386__
diff --git a/compiler-rt/lib/i386/floatundisf.S b/compiler-rt/lib/i386/floatundisf.S
index a1b29667c86..39f9dcf115c 100644
--- a/compiler-rt/lib/i386/floatundisf.S
+++ b/compiler-rt/lib/i386/floatundisf.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// float __floatundisf(du_int a);
// Note that there is a hardware instruction, fildll, that does most of what
diff --git a/compiler-rt/lib/i386/floatundixf.S b/compiler-rt/lib/i386/floatundixf.S
index c24689aac41..b8586625334 100644
--- a/compiler-rt/lib/i386/floatundixf.S
+++ b/compiler-rt/lib/i386/floatundixf.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// long double __floatundixf(du_int a);16
#ifdef __i386__
diff --git a/compiler-rt/lib/i386/lshrdi3.S b/compiler-rt/lib/i386/lshrdi3.S
index a70113f8c11..fd1fae0eea2 100644
--- a/compiler-rt/lib/i386/lshrdi3.S
+++ b/compiler-rt/lib/i386/lshrdi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// di_int __lshrdi3(di_int input, int count);
// This routine has some extra memory traffic, loading the 64-bit input via two
diff --git a/compiler-rt/lib/i386/moddi3.S b/compiler-rt/lib/i386/moddi3.S
index af1f38a13ec..bfc965147e2 100644
--- a/compiler-rt/lib/i386/moddi3.S
+++ b/compiler-rt/lib/i386/moddi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// di_int __moddi3(di_int a, di_int b);
// result = remainder of a / b.
diff --git a/compiler-rt/lib/i386/muldi3.S b/compiler-rt/lib/i386/muldi3.S
index 9f29c3ced40..262556a32c8 100644
--- a/compiler-rt/lib/i386/muldi3.S
+++ b/compiler-rt/lib/i386/muldi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// di_int __muldi3(di_int a, di_int b);
#ifdef __i386__
diff --git a/compiler-rt/lib/i386/udivdi3.S b/compiler-rt/lib/i386/udivdi3.S
index 977cee36c48..c1626aba767 100644
--- a/compiler-rt/lib/i386/udivdi3.S
+++ b/compiler-rt/lib/i386/udivdi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// du_int __udivdi3(du_int a, du_int b);
// result = a / b.
diff --git a/compiler-rt/lib/i386/umoddi3.S b/compiler-rt/lib/i386/umoddi3.S
index 2ddd71006b8..7e4f84a9378 100644
--- a/compiler-rt/lib/i386/umoddi3.S
+++ b/compiler-rt/lib/i386/umoddi3.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// du_int __umoddi3(du_int a, du_int b);
// result = remainder of a / b.
diff --git a/compiler-rt/lib/ppc/Makefile.mk b/compiler-rt/lib/ppc/Makefile.mk
index 80654729bfe..34c93722c7d 100644
--- a/compiler-rt/lib/ppc/Makefile.mk
+++ b/compiler-rt/lib/ppc/Makefile.mk
@@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
-Dependencies := $(wildcard $(Dir)/*.h)
+Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk
diff --git a/compiler-rt/lib/ppc/restFP.S b/compiler-rt/lib/ppc/restFP.S
index 8fd8fa13b25..8d27d04f8e9 100644
--- a/compiler-rt/lib/ppc/restFP.S
+++ b/compiler-rt/lib/ppc/restFP.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// Helper function used by compiler to restore ppc floating point registers at
diff --git a/compiler-rt/lib/ppc/saveFP.S b/compiler-rt/lib/ppc/saveFP.S
index ef0590f21a4..ad9b187aef1 100644
--- a/compiler-rt/lib/ppc/saveFP.S
+++ b/compiler-rt/lib/ppc/saveFP.S
@@ -7,6 +7,7 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
//
// Helper function used by compiler to save ppc floating point registers in
diff --git a/compiler-rt/lib/x86_64/Makefile.mk b/compiler-rt/lib/x86_64/Makefile.mk
index d6a2ac75f2c..950f2fc8c5d 100644
--- a/compiler-rt/lib/x86_64/Makefile.mk
+++ b/compiler-rt/lib/x86_64/Makefile.mk
@@ -17,6 +17,6 @@ ObjNames := $(Sources:%.c=%.o) $(AsmSources:%.S=%.o)
Target := Optimized
# FIXME: use automatic dependencies?
-Dependencies := $(wildcard $(Dir)/*.h)
+Dependencies := $(wildcard lib/*.h $(Dir)/*.h)
include make/subdir.mk
diff --git a/compiler-rt/lib/x86_64/floatundidf.S b/compiler-rt/lib/x86_64/floatundidf.S
index 4ccaac2ce7e..fea46af841c 100644
--- a/compiler-rt/lib/x86_64/floatundidf.S
+++ b/compiler-rt/lib/x86_64/floatundidf.S
@@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#include "../assembly.h"
+
// double __floatundidf(du_int a);
#ifdef __x86_64__
diff --git a/compiler-rt/lib/x86_64/floatundisf.S b/compiler-rt/lib/x86_64/floatundisf.S
index b40868740ae..4cbbf201717 100644
--- a/compiler-rt/lib/x86_64/floatundisf.S
+++ b/compiler-rt/lib/x86_64/floatundisf.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// float __floatundisf(du_int a);
#ifdef __x86_64__
diff --git a/compiler-rt/lib/x86_64/floatundixf.S b/compiler-rt/lib/x86_64/floatundixf.S
index 0764da49afa..47a0ff4f589 100644
--- a/compiler-rt/lib/x86_64/floatundixf.S
+++ b/compiler-rt/lib/x86_64/floatundixf.S
@@ -1,6 +1,8 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
+#include "../assembly.h"
+
// long double __floatundixf(du_int a);
#ifdef __x86_64__
OpenPOWER on IntegriCloud