mirror of
https://github.com/opnsense/src.git
synced 2026-04-28 17:49:22 -04:00
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
This commit is contained in:
parent
66ff6821dd
commit
4bee32ae9c
9 changed files with 60 additions and 55 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue