Add a macro "CALL()" to call a function correctly in the pic and non pic
case. Write ERROR() in terms of call.
This commit is contained in:
parent
e14e91f738
commit
9a416d6f08
@ -37,7 +37,7 @@
|
||||
* @(#)SYS.h 8.1 (Berkeley) 6/4/93
|
||||
*
|
||||
* from: Header: SYS.h,v 1.2 92/07/03 18:57:00 torek Exp
|
||||
* $NetBSD: SYS.h,v 1.10 2000/06/26 06:31:37 kleink Exp $
|
||||
* $NetBSD: SYS.h,v 1.11 2001/07/23 01:40:33 christos Exp $
|
||||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
@ -63,13 +63,14 @@
|
||||
* change it to be position independent later, if need be.
|
||||
*/
|
||||
#ifdef PIC
|
||||
#define ERROR() \
|
||||
#define CALL(name) \
|
||||
PIC_PROLOGUE(%g1,%g2); \
|
||||
ld [%g1+CERROR],%g2; jmp %g2; nop
|
||||
ld [%g1+name],%g2; jmp %g2; nop
|
||||
#else
|
||||
#define ERROR() \
|
||||
sethi %hi(CERROR),%g1; or %lo(CERROR),%g1,%g1; jmp %g1; nop
|
||||
#define CALL(name) \
|
||||
sethi %hi(name),%g1; or %lo(name),%g1,%g1; jmp %g1; nop
|
||||
#endif
|
||||
#define ERROR() CALL(CERROR)
|
||||
|
||||
/*
|
||||
* SYSCALL is used when further action must be taken before returning.
|
||||
|
Loading…
Reference in New Issue
Block a user