Pull in machine/cdefs.h for the ABI definitions. Provide a PTR_LA,

ala sgi, and use it in preference to a bare 'la' so that it gets
translated to a 'dla' for the 64-bit pointer ABIs.
This commit is contained in:
Warner Losh 2009-07-05 08:13:19 +00:00
parent f547073088
commit 0d978536b2

@ -60,6 +60,7 @@
#include <machine/regdef.h>
#endif
#include <machine/endian.h>
#include <machine/cdefs.h>
#undef __FBSDID
#if !defined(lint) && !defined(STRIP_FBSDID)
@ -281,7 +282,7 @@ _C_LABEL(x):
* Macros to panic and printf from assembly language.
*/
#define PANIC(msg) \
la a0, 9f; \
PTR_LA a0, 9f; \
jal _C_LABEL(panic); \
nop; \
MSG(msg)
@ -289,7 +290,7 @@ _C_LABEL(x):
#define PANIC_KSEG0(msg, reg) PANIC(msg)
#define PRINTF(msg) \
la a0, 9f; \
PTR_LA a0, 9f; \
jal _C_LABEL(printf); \
nop; \
MSG(msg)
@ -308,7 +309,7 @@ _C_LABEL(x):
*/
#define DO_AST \
44: \
la s0, _C_LABEL(disableintr) ;\
PTR_LA s0, _C_LABEL(disableintr) ;\
jalr s0 ;\
nop ;\
move a0, v0 ;\
@ -318,12 +319,12 @@ _C_LABEL(x):
lw s2, TD_FLAGS(s1) ;\
li s0, TDF_ASTPENDING | TDF_NEEDRESCHED;\
and s2, s0 ;\
la s0, _C_LABEL(restoreintr) ;\
PTR_LA s0, _C_LABEL(restoreintr) ;\
jalr s0 ;\
nop ;\
beq s2, zero, 4f ;\
nop ;\
la s0, _C_LABEL(ast) ;\
PTR_LA s0, _C_LABEL(ast) ;\
jalr s0 ;\
addu a0, s3, U_PCB_REGS ;\
j 44b ;\
@ -362,12 +363,14 @@ _C_LABEL(x):
*/
#if !defined(_MIPS_BSD_API) || _MIPS_BSD_API == _MIPS_BSD_API_LP32
/* #if !defined(__mips_n64) */
#define REG_L lw
#define REG_S sw
#define REG_LI li
#define REG_PROLOGUE .set push
#define REG_EPILOGUE .set pop
#define SZREG 4
#define PTR_LA la
#else
#define REG_L ld
#define REG_S sd
@ -375,6 +378,7 @@ _C_LABEL(x):
#define REG_PROLOGUE .set push ; .set mips3
#define REG_EPILOGUE .set pop
#define SZREG 8
#define PTR_LA dla
#endif /* _MIPS_BSD_API */
#define mfc0_macro(data, spr) \