summaryrefslogtreecommitdiffstats
path: root/sys/arm/include
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-12-14 16:28:53 +0000
committerandrew <andrew@FreeBSD.org>2014-12-14 16:28:53 +0000
commit90fc0dee7a26d23d867362739d7b6e6e0dbe0373 (patch)
tree9b4054152142c6af30b2bb73b6c1b80cf305d9f7 /sys/arm/include
parent041226eb036d08804fe0e5cb72da0876281e63f3 (diff)
downloadFreeBSD-src-90fc0dee7a26d23d867362739d7b6e6e0dbe0373.zip
FreeBSD-src-90fc0dee7a26d23d867362739d7b6e6e0dbe0373.tar.gz
Clean up our ARM assembly:
MFC 275256: Switch to the ARM unified assembly language as the clang integrated as only supports it. Binutils supports it when the ".syntax unified" directive is set. Sponsored by: ABT Systems Ltd MFC 275264: Update _ENTRY to use _EENTRY to reduce the common code. MFC 275321: Remove extra labels, ENTRY_NP already provides them. Sponsored by: ABT Systems Ltd MFC 275322: Correctly a few incorrect uses of ENTRY/EENTRY and END/EEND Sponsored by: ABT Systems Ltd MFC 275416: Fix the name of the coprocessor to include the "p" prefix, the clang integrated assembler expects this. Sponsored by: ABT Systems Ltd MFC 275418: Switch to unified syntax so these can be built with clang 3.5. Sponsored by: ABT Systems Ltd MFC 275519: Add missing END macros to some of the xscale functions. Sponsored by: ABT Systems Ltd MFC 275520: Use the unified syntax in a few more assembly files Sponsored by: ABT Systems Ltd MFC 275521: Set the alignment to 4-bytes after a string as clang 3.5 can switch to thumb mode if this is incorrect. Sponsored by: ABT Systems Ltd MFC 275522: Place the literal pool after a RET otherwise clang 3.5 tries to put it too far away from a ldr psuedo instruction. With this clang will place the literal value here where it's close enough to be loaded. Sponsored by: ABT Systems Ltd MFC 275523: Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is unsupported as it needs a newer cpu. Sponsored by: ABT Systems Ltd MFC 275524: Switch to a .cpu directive. These will work when clang 3.5 is imported where the .arch directive is a nop. Sponsored by: ABT Systems Ltd
Diffstat (limited to 'sys/arm/include')
-rw-r--r--sys/arm/include/asm.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/arm/include/asm.h b/sys/arm/include/asm.h
index 231d559..e5f06e7 100644
--- a/sys/arm/include/asm.h
+++ b/sys/arm/include/asm.h
@@ -64,6 +64,18 @@
#endif
/*
+ * EENTRY()/EEND() mark "extra" entry/exit points from a function.
+ * The unwind info cannot handle the concept of a nested function, or a function
+ * with multiple .fnstart directives, but some of our assembler code is written
+ * with multiple labels to allow entry at several points. The EENTRY() macro
+ * defines such an extra entry point without a new .fnstart, so that it's
+ * basically just a label that you can jump to. The EEND() macro does nothing
+ * at all, except document the exit point associated with the same-named entry.
+ */
+#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x:
+#define _EEND(x) /* nothing */
+
+/*
* gas/arm uses @ as a single comment character and thus cannot be used here
* Instead it recognised the # instead of an @ symbols in .type directives
* We define a couple of macros so that assembly code will not be dependent
@@ -72,22 +84,10 @@
#define _ASM_TYPE_FUNCTION #function
#define _ASM_TYPE_OBJECT #object
#define GLOBAL(X) .globl x
-#define _ENTRY(x) \
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: _FNSTART
+#define _ENTRY(x) \
+ .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART
#define _END(x) .size x, . - x; _FNEND
-/*
- * EENTRY()/EEND() mark "extra" entry/exit points from a function.
- * The unwind info cannot handle the concept of a nested function, or a function
- * with multiple .fnstart directives, but some of our assembler code is written
- * with multiple labels to allow entry at several points. The EENTRY() macro
- * defines such an extra entry point without a new .fnstart, so that it's
- * basically just a label that you can jump to. The EEND() macro does nothing
- * at all, except document the exit point associated with the same-named entry.
- */
-#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x:
-#define _EEND(x) /* nothing */
-
#ifdef GPROF
# define _PROF_PROLOGUE \
mov ip, lr; bl __mcount
OpenPOWER on IntegriCloud