Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/sparc64 From rev. 1.11 of the 32-bit version:



details:   https://anonhg.NetBSD.org/src/rev/2c5ddb37d26b
branches:  trunk
changeset: 513068:2c5ddb37d26b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Jul 23 07:26:50 2001 +0000

description:
>From rev. 1.11 of the 32-bit version:

Add a macro "CALL()" to call a function correctly in the pic and non pic
case. Write ERROR() in terms of call.

diffstat:

 lib/libc/arch/sparc64/SYS.h |  13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r bb746dd89186 -r 2c5ddb37d26b lib/libc/arch/sparc64/SYS.h
--- a/lib/libc/arch/sparc64/SYS.h       Mon Jul 23 05:49:09 2001 +0000
+++ b/lib/libc/arch/sparc64/SYS.h       Mon Jul 23 07:26:50 2001 +0000
@@ -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.5 2001/06/15 01:09:50 chs Exp $
+ *     $NetBSD: SYS.h,v 1.6 2001/07/23 07:26:50 thorpej Exp $
  */
 
 #include <machine/asm.h>
@@ -55,18 +55,19 @@
  * change it to be position independent later, if need be.
  */
 #ifdef PIC
-#define        ERROR() \
+#define        CALL(name) \
        PIC_PROLOGUE(%g1,%g2); \
-       sethi %hi(_C_LABEL(__cerror)),%g2; \
-       or %g2,%lo(_C_LABEL(__cerror)),%g2; \
+       sethi %hi(name),%g2; \
+       or %g2,%lo(name),%g2; \
        ldx [%g1+%g2],%g2; \
        jmp %g2; \
        nop
 #else
-#define        ERROR() \
-       sethi %hi(_C_LABEL(__cerror)),%g1; or %lo(_C_LABEL(__cerror)),%g1,%g1; \
+#define        CALL(name) \
+       sethi %hi(name),%g1; or %lo(name),%g1,%g1; \
        jmp %g1; nop
 #endif
+#define        ERROR() CALL(_C_LABEL(__cerror))
 
 /*
  * SYSCALL is used when further action must be taken before returning.



Home | Main Index | Thread Index | Old Index