cln/cln-1.3.2-Pre-processor-fix-for-ARM.patch

69 lines
1.5 KiB
Diff
Raw Normal View History

diff -dur cln-1.2.2.backup/src/base/digitseq/cl_asm_arm_.cc cln-1.2.2/src/base/digitseq/cl_asm_arm_.cc
--- cln-1.2.2.backup/src/base/digitseq/cl_asm_arm_.cc 2001-05-25 16:00:18.000000000 -0400
+++ cln-1.2.2/src/base/digitseq/cl_asm_arm_.cc 2009-08-18 12:21:20.000000000 -0400
@@ -42,6 +42,7 @@
#define C(x) _##x
#define EXPORT(x) EXPORT x
+#define DECLARE_WORD(x) x
#define DECLARE_FUNCTION(x)
#define GLABEL(x) _##x
#define LABEL(x) _##x
@@ -70,15 +71,33 @@
lr .req r14
pc .req r15
+
+
+#ifdef ASM_UNDERSCORE
#define C(x) _##x
#define EXPORT(x) .global _##x
+#define DECLARE_WORD(x) .word _##x
#if defined(__NetBSD__)
#define DECLARE_FUNCTION(x) .type _##x,%function
#else
#define DECLARE_FUNCTION(x)
#endif
-#define GLABEL(x) _##x##:
-#define LABEL(x) x##:
+#define GLABEL(x) _##x:
+
+#else
+#define C(x) x
+#define EXPORT(x) .global x
+#define DECLARE_WORD(x) .word x
+#if defined(__NetBSD__)
+#define DECLARE_FUNCTION(x) .type x,%function
+#else
+#define DECLARE_FUNCTION(x)
+#endif
+#define GLABEL(x) x:
+
+#endif
+
+#define LABEL(x) x:
#define RRX rrx
#define END
@@ -128,17 +147,17 @@
#ifdef MULU32_HIGH
ptr_mulu32_high:
- .word _mulu32_high
+ DECLARE_WORD(mulu32_high)
.align 0
#endif
#ifdef DIVU_16_REST
ptr_divu_16_rest:
- .word _divu_16_rest
+ DECLARE_WORD(divu_16_rest)
.align 0
#endif
#ifdef DIVU_32_REST
ptr_divu_32_rest:
- .word _divu_32_rest
+ DECLARE_WORD(divu_32_rest)
.align 0
#endif