adjust the PIC case for ERROR() to handle __cerror being at a larger offset

than will fit in the immediate field of the LDX instruction.
This commit is contained in:
chs 2001-06-15 01:09:50 +00:00
parent 6000674775
commit 77b0e1dfba
1 changed files with 6 additions and 2 deletions

View File

@ -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.4 2000/07/18 22:39:25 eeh Exp $
* $NetBSD: SYS.h,v 1.5 2001/06/15 01:09:50 chs Exp $
*/
#include <machine/asm.h>
@ -57,7 +57,11 @@
#ifdef PIC
#define ERROR() \
PIC_PROLOGUE(%g1,%g2); \
ldx [%g1+_C_LABEL(__cerror)],%g2; jmp %g2; nop
sethi %hi(_C_LABEL(__cerror)),%g2; \
or %g2,%lo(_C_LABEL(__cerror)),%g2; \
ldx [%g1+%g2],%g2; \
jmp %g2; \
nop
#else
#define ERROR() \
sethi %hi(_C_LABEL(__cerror)),%g1; or %lo(_C_LABEL(__cerror)),%g1,%g1; \