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 Add support for large -fPIC relocations.
details: https://anonhg.NetBSD.org/src/rev/2569de85556c
branches: trunk
changeset: 526605:2569de85556c
user: eeh <eeh%NetBSD.org@localhost>
date: Tue May 07 01:31:33 2002 +0000
description:
Add support for large -fPIC relocations.
diffstat:
lib/libc/arch/sparc64/SYS.h | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diffs (44 lines):
diff -r fdaa8513072f -r 2569de85556c lib/libc/arch/sparc64/SYS.h
--- a/lib/libc/arch/sparc64/SYS.h Tue May 07 00:37:47 2002 +0000
+++ b/lib/libc/arch/sparc64/SYS.h Tue May 07 01:31:33 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: SYS.h,v 1.8 2002/05/05 17:51:46 thorpej Exp $ */
+/* $NetBSD: SYS.h,v 1.9 2002/05/07 01:31:33 eeh Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -56,20 +56,23 @@
* change it to be position independent later, if need be.
*/
#ifdef PIC
-#define CALL(name) \
- PIC_PROLOGUE(%g1,%g2); \
- sethi %hi(name),%g2; \
- or %g2,%lo(name),%g2; \
- ldx [%g1+%g2],%g2; \
- jmp %g2; \
+#ifdef BIGPIC
+#define JUMP(name) \
+ PIC_PROLOGUE(%g1,%g5); \
+ sethi %hi(_C_LABEL(name)),%g5; \
+ or %g5,%lo(_C_LABEL(name)),%g5; \
+ ldx [%g1+%g5],%g5; \
+ jmp %g5; \
nop
#else
-#define CALL(name) \
- sethi %hi(name),%g1; or %lo(name),%g1,%g1; \
- jmp %g1; nop
+#define JUMP(name) \
+ PIC_PROLOGUE(%g1,%g5); \
+ ldx [%g1+_C_LABEL(name)],%g5; jmp %g5; nop
#endif
-#define ERROR() CALL(_C_LABEL(__cerror))
-
+#else
+#define JUMP(name) set _C_LABEL(name),%g1; jmp %g1; nop
+#endif
+#define ERROR() JUMP(__cerror)
/*
* SYSCALL is used when further action must be taken before returning.
* Note that it adds a `nop' over what we could do, if we only knew what
Home |
Main Index |
Thread Index |
Old Index