summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/include/asm.h
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2003-04-26 20:54:45 +0000
committerobrien <obrien@FreeBSD.org>2003-04-26 20:54:45 +0000
commit0c6d9d6137c9e68207e641fb4b21724c795fdf17 (patch)
tree01993e56694db8746714ee7cd281ee66233d061e /sys/sparc64/include/asm.h
parent02bfd4df0a9a2d2c8862cfc1238029ef8f903c9b (diff)
downloadFreeBSD-src-0c6d9d6137c9e68207e641fb4b21724c795fdf17.zip
FreeBSD-src-0c6d9d6137c9e68207e641fb4b21724c795fdf17.tar.gz
I was wrong, the ENTRY bits in asm.h did have a purpose -- for userland.
Restore the bits and remove them from asmacros.h. *.S will now be asm.h consumers. Approved by: jake
Diffstat (limited to 'sys/sparc64/include/asm.h')
-rw-r--r--sys/sparc64/include/asm.h40
1 files changed, 38 insertions, 2 deletions
diff --git a/sys/sparc64/include/asm.h b/sys/sparc64/include/asm.h
index 950849e..48d0a33 100644
--- a/sys/sparc64/include/asm.h
+++ b/sys/sparc64/include/asm.h
@@ -70,13 +70,49 @@
#define CNAME(csym) csym
#define HIDENAME(asmsym) __CONCAT(.,asmsym)
-#define CCFSZ 192
-#define SPOFF 2047
+/* sys/sparc64/sparc64/ *.S have their own definitions. */
+#ifndef CCFSZ
+#define CCFSZ 192 /* 0xc0 */
+#endif
+#ifndef SPOFF
+#define SPOFF 2047 /* 0x7ff */
+#endif
+
+#ifdef GPROF
+#define _ALIGN_TEXT .align 32
+#else
+#define _ALIGN_TEXT .p2align 4
+#endif
+
+#define _START_ENTRY \
+ .text ; \
+ _ALIGN_TEXT
+
+/*
+ * Define a function entry point.
+ *
+ * The compiler produces #function for the .type pseudo-op, but the '#'
+ * character has special meaning in cpp macros, so we use @function like
+ * other architectures. The assembler seems to accept both.
+ * The assembler also accepts a .proc pseudo-op, which is used by the
+ * peep hole optimizer, whose argument is the type code of the return
+ * value. Since this is difficult to predict and its expected that
+ * assembler code is already optimized, we leave it out.
+ */
+#define _ENTRY(x) \
+ _START_ENTRY ; \
+ .globl CNAME(x) ; \
+ .type CNAME(x),@function ; \
+CNAME(x):
+
+#define ENTRY(x) _ENTRY(x)
+#define END(x) .size x, . - x
/*
* Kernel RCS ID tag and copyright macros
*/
+#undef __FBSDID
#if !defined(lint) && !defined(STRIP_FBSDID)
#define __FBSDID(s) .ident s
#else
OpenPOWER on IntegriCloud