summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--sys/sparc64/include/asm.h40
-rw-r--r--sys/sparc64/include/asmacros.h38
-rw-r--r--sys/sparc64/sparc64/exception.S7
-rw-r--r--sys/sparc64/sparc64/interrupt.S5
-rw-r--r--sys/sparc64/sparc64/locore.S5
-rw-r--r--sys/sparc64/sparc64/mp_exception.S5
-rw-r--r--sys/sparc64/sparc64/mp_locore.S5
-rw-r--r--sys/sparc64/sparc64/support.S5
-rw-r--r--sys/sparc64/sparc64/swtch.S5
9 files changed, 60 insertions, 55 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
diff --git a/sys/sparc64/include/asmacros.h b/sys/sparc64/include/asmacros.h
index b81e2f6..2fd5143 100644
--- a/sys/sparc64/include/asmacros.h
+++ b/sys/sparc64/include/asmacros.h
@@ -112,24 +112,7 @@
call printf ; \
nop
-/*
- * If the kernel can be located above 4G, setx needs to be used to load
- * symbol values, otherwise set is sufficient.
- */
-#ifdef HIGH_KERNEL
-#define SET(sym, tmp, dst) \
- setx sym, tmp, dst
-#else
-#define SET(sym, tmp, dst) \
- set sym, dst
-#endif
-
#define _ALIGN_DATA .align 8
-#ifdef GPROF
-#define _ALIGN_TEXT .align 32
-#else
-#define _ALIGN_TEXT .align 16
-#endif
#define DATA(name) \
.data ; \
@@ -140,27 +123,6 @@ name:
#define EMPTY
-/*
- * 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(name) \
- .text ; \
- _ALIGN_TEXT ; \
- .globl name ; \
- .type name, @function ; \
-name:
-
-#define END(name) \
- .size name, . - name
-
#endif /* LOCORE */
#endif /* _KERNEL */
diff --git a/sys/sparc64/sparc64/exception.S b/sys/sparc64/sparc64/exception.S
index 97e0ba8..7efb36a 100644
--- a/sys/sparc64/sparc64/exception.S
+++ b/sys/sparc64/sparc64/exception.S
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * from BSDI: locore.s,v 1.36.2.15 1999/08/23 22:34:41 cp Exp
+ * BSDI $Id: locore.s,v 1.36.2.15 1999/08/23 22:34:41 cp Exp $
*/
/*-
* Copyright (c) 2001 Jake Burkholder.
@@ -51,8 +51,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include "opt_compat.h"
@@ -67,6 +65,9 @@
#include <machine/wstate.h>
#include "assym.s"
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
#define TSB_KERNEL_MASK 0x0
#define TSB_KERNEL 0x0
diff --git a/sys/sparc64/sparc64/interrupt.S b/sys/sparc64/sparc64/interrupt.S
index 11c1753..2aa2dba 100644
--- a/sys/sparc64/sparc64/interrupt.S
+++ b/sys/sparc64/sparc64/interrupt.S
@@ -22,8 +22,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <machine/asi.h>
@@ -32,6 +30,9 @@
#include <machine/pstate.h>
#include "assym.s"
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
/*
* Handle a vectored interrupt.
diff --git a/sys/sparc64/sparc64/locore.S b/sys/sparc64/sparc64/locore.S
index 3d36be1..dabe63f 100644
--- a/sys/sparc64/sparc64/locore.S
+++ b/sys/sparc64/sparc64/locore.S
@@ -22,8 +22,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <sys/syscall.h>
@@ -34,6 +32,9 @@
#include <machine/upa.h>
#include "assym.s"
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
.register %g2,#ignore
diff --git a/sys/sparc64/sparc64/mp_exception.S b/sys/sparc64/sparc64/mp_exception.S
index d8e977e..fda3b9e 100644
--- a/sys/sparc64/sparc64/mp_exception.S
+++ b/sys/sparc64/sparc64/mp_exception.S
@@ -22,8 +22,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <machine/asi.h>
@@ -32,6 +30,9 @@
#include <machine/pstate.h>
#include "assym.s"
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
.register %g2, #ignore
.register %g3, #ignore
diff --git a/sys/sparc64/sparc64/mp_locore.S b/sys/sparc64/sparc64/mp_locore.S
index 998b25e..9281a67 100644
--- a/sys/sparc64/sparc64/mp_locore.S
+++ b/sys/sparc64/sparc64/mp_locore.S
@@ -22,8 +22,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <machine/asi.h>
@@ -33,6 +31,9 @@
#include <machine/upa.h>
#include "assym.s"
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
.register %g2, #ignore
.register %g3, #ignore
diff --git a/sys/sparc64/sparc64/support.S b/sys/sparc64/sparc64/support.S
index ddd4336..a97922f 100644
--- a/sys/sparc64/sparc64/support.S
+++ b/sys/sparc64/sparc64/support.S
@@ -22,8 +22,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <machine/asi.h>
@@ -32,6 +30,9 @@
#include <machine/pstate.h>
#include "assym.s"
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
.register %g2, #ignore
.register %g3, #ignore
diff --git a/sys/sparc64/sparc64/swtch.S b/sys/sparc64/sparc64/swtch.S
index ae2256b..621d98c 100644
--- a/sys/sparc64/sparc64/swtch.S
+++ b/sys/sparc64/sparc64/swtch.S
@@ -22,8 +22,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
#include <machine/asmacros.h>
@@ -35,6 +33,9 @@
.register %g3, #ignore
#include "assym.s"
+#include <machine/asm.h>
+
+__FBSDID("$FreeBSD$");
/*
* void cpu_throw(struct thread *old, struct thread *new)
OpenPOWER on IntegriCloud