svn commit: r275264 - head/sys/arm/include

Andrew Turner andrew at FreeBSD.org
Sat Nov 29 19:31:24 UTC 2014


Author: andrew
Date: Sat Nov 29 19:31:23 2014
New Revision: 275264
URL: https://svnweb.freebsd.org/changeset/base/275264

Log:
  Update _ENTRY to use _EENTRY to reduce the common code.

Modified:
  head/sys/arm/include/asm.h

Modified: head/sys/arm/include/asm.h
==============================================================================
--- head/sys/arm/include/asm.h	Sat Nov 29 19:27:43 2014	(r275263)
+++ head/sys/arm/include/asm.h	Sat Nov 29 19:31:23 2014	(r275264)
@@ -58,6 +58,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
@@ -66,22 +78,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


More information about the svn-src-head mailing list