Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/sparc While in transition, conditionally renam...
details: https://anonhg.NetBSD.org/src/rev/f19d299cfe45
branches: trunk
changeset: 467956:f19d299cfe45
user: kleink <kleink%NetBSD.org@localhost>
date: Wed Mar 31 18:14:27 1999 +0000
description:
While in transition, conditionally rename _ASM_LABEL(cerror) and
_ASM_LABEL(curbrk) to _C_LABEL(__cerror) and _C_LABEL(__curbrk), respectively,
depending on the object format chosen, to avoid user namespace clashes.
diffstat:
lib/libc/arch/sparc/SYS.h | 16 ++++++++++++----
lib/libc/arch/sparc/sys/brk.S | 12 ++++++------
lib/libc/arch/sparc/sys/cerror.S | 10 +++++-----
lib/libc/arch/sparc/sys/sbrk.S | 16 ++++++++--------
4 files changed, 31 insertions(+), 23 deletions(-)
diffs (190 lines):
diff -r b3bda9a0ce06 -r f19d299cfe45 lib/libc/arch/sparc/SYS.h
--- a/lib/libc/arch/sparc/SYS.h Wed Mar 31 18:01:31 1999 +0000
+++ b/lib/libc/arch/sparc/SYS.h Wed Mar 31 18:14:27 1999 +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.8 1997/05/04 06:40:57 kleink Exp $
+ * $NetBSD: SYS.h,v 1.9 1999/03/31 18:14:27 kleink Exp $
*/
#include <machine/asm.h>
@@ -50,6 +50,14 @@
#define _CAT(x,y) x/**/y
#endif
+#ifdef __ELF__
+#define CERROR _C_LABEL(__cerror)
+#define CURBRK _C_LABEL(__curbrk)
+#else
+#define CERROR _ASM_LABEL(cerror)
+#define CURBRK _ASM_LABEL(curbrk)
+#endif
+
/*
* ERROR branches to cerror. This is done with a macro so that I can
* change it to be position independent later, if need be.
@@ -57,10 +65,10 @@
#ifdef PIC
#define ERROR() \
PIC_PROLOGUE(%g1,%g2); \
- ld [%g1+cerror],%g2; jmp %g2; nop
+ ld [%g1+CERROR],%g2; jmp %g2; nop
#else
#define ERROR() \
- sethi %hi(cerror),%g1; or %lo(cerror),%g1,%g1; jmp %g1; nop
+ sethi %hi(CERROR),%g1; or %lo(CERROR),%g1,%g1; jmp %g1; nop
#endif
/*
@@ -113,4 +121,4 @@
ENTRY(x); mov (_CAT(SYS_,y))|SYSCALL_G2RFLAG,%g1; add %o7,8,%g2; \
t ST_SYSCALL
- .globl cerror
+ .globl CERROR
diff -r b3bda9a0ce06 -r f19d299cfe45 lib/libc/arch/sparc/sys/brk.S
--- a/lib/libc/arch/sparc/sys/brk.S Wed Mar 31 18:01:31 1999 +0000
+++ b/lib/libc/arch/sparc/sys/brk.S Wed Mar 31 18:14:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brk.S,v 1.5 1999/01/14 22:48:22 kleink Exp $ */
+/* $NetBSD: brk.S,v 1.6 1999/03/31 18:14:27 kleink Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -44,13 +44,13 @@
#if 0
.asciz "@(#)brk.s 8.1 (Berkeley) 6/4/93"
#else
- RCSID("$NetBSD: brk.S,v 1.5 1999/01/14 22:48:22 kleink Exp $")
+ RCSID("$NetBSD: brk.S,v 1.6 1999/03/31 18:14:27 kleink Exp $")
#endif
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
- .globl curbrk
+ .globl CURBRK
.globl _C_LABEL(__minbrk)
.data
@@ -71,7 +71,7 @@
mov SYS_break, %g1
t ST_SYSCALL
bcc,a 1f
- ld [%o5 + curbrk], %o4
+ ld [%o5 + CURBRK], %o4
ERROR()
1:
retl ! success, return 0 & record new break
@@ -88,9 +88,9 @@
mov SYS_break, %g1
t ST_SYSCALL
bcc,a 1f
- sethi %hi(curbrk), %g1
+ sethi %hi(CURBRK), %g1
ERROR()
1:
retl ! success, return 0 & record new break
- st %o2, [%g1 + %lo(curbrk)]
+ st %o2, [%g1 + %lo(CURBRK)]
#endif
diff -r b3bda9a0ce06 -r f19d299cfe45 lib/libc/arch/sparc/sys/cerror.S
--- a/lib/libc/arch/sparc/sys/cerror.S Wed Mar 31 18:01:31 1999 +0000
+++ b/lib/libc/arch/sparc/sys/cerror.S Wed Mar 31 18:14:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cerror.S,v 1.6 1998/07/01 02:16:28 tv Exp $ */
+/* $NetBSD: cerror.S,v 1.7 1999/03/31 18:14:27 kleink Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -44,14 +44,14 @@
#if 0
.asciz "@(#)cerror.s 8.1 (Berkeley) 6/4/93"
#else
- RCSID("$NetBSD: cerror.S,v 1.6 1998/07/01 02:16:28 tv Exp $")
+ RCSID("$NetBSD: cerror.S,v 1.7 1999/03/31 18:14:27 kleink Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
#include "SYS.h"
#ifdef _REENTRANT
-FUNC(cerror)
+FUNC(CERROR)
save %sp, -96, %sp
call _C_LABEL(__errno)
nop
@@ -62,14 +62,14 @@
#else
.globl _C_LABEL(errno)
#ifdef PIC
-FUNC(cerror)
+FUNC(CERROR)
ld [%g1 + _C_LABEL(errno)], %g1
st %o0, [%g1]
mov -1, %o0
retl
mov -1, %o1
#else
-FUNC(cerror)
+FUNC(CERROR)
sethi %hi(_C_LABEL(errno)), %g1
st %o0, [%g1 + %lo(_C_LABEL(errno))]
mov -1, %o0
diff -r b3bda9a0ce06 -r f19d299cfe45 lib/libc/arch/sparc/sys/sbrk.S
--- a/lib/libc/arch/sparc/sys/sbrk.S Wed Mar 31 18:01:31 1999 +0000
+++ b/lib/libc/arch/sparc/sys/sbrk.S Wed Mar 31 18:14:27 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbrk.S,v 1.4 1998/07/01 02:16:28 tv Exp $ */
+/* $NetBSD: sbrk.S,v 1.5 1999/03/31 18:14:27 kleink Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -44,23 +44,23 @@
#if 0
.asciz "@(#)sbrk.s 8.1 (Berkeley) 6/4/93"
#else
- RCSID("$NetBSD: sbrk.S,v 1.4 1998/07/01 02:16:28 tv Exp $")
+ RCSID("$NetBSD: sbrk.S,v 1.5 1999/03/31 18:14:27 kleink Exp $")
#endif
#endif /* SYSLIBC_SCCS and not lint */
#include "SYS.h"
.globl _C_LABEL(end)
- .globl curbrk
+ .globl CURBRK
.data
-curbrk: .long _C_LABEL(end)
+CURBRK: .long _C_LABEL(end)
.text
ENTRY(sbrk)
#ifdef PIC
PIC_PROLOGUE(%o5,%o4)
- ld [%o5 + curbrk], %o2
+ ld [%o5 + CURBRK], %o2
ld [%o2], %o3 ! %o3 = old break
add %o3, %o0, %o4 ! %o4 = new break
mov %o4, %o0 ! copy for syscall
@@ -73,8 +73,8 @@
retl ! and update curbrk
st %o4, [%o2]
#else
- sethi %hi(curbrk), %o2
- ld [%o2 + %lo(curbrk)], %o3 ! %o3 = old break
+ sethi %hi(CURBRK), %o2
+ ld [%o2 + %lo(CURBRK)], %o3 ! %o3 = old break
add %o3, %o0, %o4 ! %o4 = new break
mov %o4, %o0 ! copy for syscall
mov SYS_break, %g1
@@ -84,5 +84,5 @@
ERROR()
1:
retl ! and update curbrk
- st %o4, [%o2 + %lo(curbrk)]
+ st %o4, [%o2 + %lo(CURBRK)]
#endif
Home |
Main Index |
Thread Index |
Old Index