Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc Use a constant in the text segment to avoid the .li...
details: https://anonhg.NetBSD.org/src/rev/a08b9c4ac47d
branches: trunk
changeset: 326240:a08b9c4ac47d
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 23 03:08:50 2014 +0000
description:
Use a constant in the text segment to avoid the .lit8 out of range relocation
error.
diffstat:
lib/libc/arch/alpha/gen/__setjmp14.S | 6 ++++--
lib/libc/compat/arch/alpha/gen/compat__setjmp.S | 10 +++++++---
lib/libc/compat/arch/alpha/gen/compat_setjmp.S | 6 ++++--
3 files changed, 15 insertions(+), 7 deletions(-)
diffs (86 lines):
diff -r 32a1fee03981 -r a08b9c4ac47d lib/libc/arch/alpha/gen/__setjmp14.S
--- a/lib/libc/arch/alpha/gen/__setjmp14.S Thu Jan 23 00:00:16 2014 +0000
+++ b/lib/libc/arch/alpha/gen/__setjmp14.S Thu Jan 23 03:08:50 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __setjmp14.S,v 1.6 2013/03/12 19:38:20 martin Exp $ */
+/* $NetBSD: __setjmp14.S,v 1.7 2014/01/23 03:08:50 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -84,7 +84,7 @@
mov s0, a0
ldq s0, (SC_REGS+_REG_S0)(a0)
- ldiq t0, 0xacedbade /* sigcontext magic number */
+ ldq t0, magic /* sigcontext magic number */
stq t0, (SC_REGS+_REG_UNIQUE)(a0) /* magic in sc_regs[31] */
/* Too bad we can't check if we actually used FP */
ldiq t0, 1
@@ -118,4 +118,6 @@
botch:
CALL(abort)
RET /* "can't" get here... */
+magic:
+ .quad 0xacedbade /* sigcontext magic number */
END(__setjmp14)
diff -r 32a1fee03981 -r a08b9c4ac47d lib/libc/compat/arch/alpha/gen/compat__setjmp.S
--- a/lib/libc/compat/arch/alpha/gen/compat__setjmp.S Thu Jan 23 00:00:16 2014 +0000
+++ b/lib/libc/compat/arch/alpha/gen/compat__setjmp.S Thu Jan 23 03:08:50 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat__setjmp.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */
+/* $NetBSD: compat__setjmp.S,v 1.2 2014/01/23 03:08:50 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -54,7 +54,8 @@
stq s6, ((15 + 4) * 8)(a0)
stq ra, ((26 + 4) * 8)(a0)
stq sp, ((30 + 4) * 8)(a0)
- ldiq t0, 0xacedbadd /* sigcontext magic number */
+ /* work around assembler issue */
+ ldq t0, magic /* sigcontext magic number */
stq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */
/* Too bad we can't check if we actually used FP */
ldiq t0, 1
@@ -83,12 +84,15 @@
mov zero, v0 /* return zero */
RET
+magic:
+ .quad 0xacedbadd
END(_setjmp)
LEAF(_longjmp, 2)
LDGP(pv)
ldq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */
- ldiq t1, 0xacedbadd
+ /* work around assembler issue */
+ ldq t0, magic /* sigcontext magic number */
cmpeq t0, t1, t0
beq t0, botch /* If the magic was bad, punt */
diff -r 32a1fee03981 -r a08b9c4ac47d lib/libc/compat/arch/alpha/gen/compat_setjmp.S
--- a/lib/libc/compat/arch/alpha/gen/compat_setjmp.S Thu Jan 23 00:00:16 2014 +0000
+++ b/lib/libc/compat/arch/alpha/gen/compat_setjmp.S Thu Jan 23 03:08:50 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_setjmp.S,v 1.1 2005/09/16 18:21:19 drochner Exp $ */
+/* $NetBSD: compat_setjmp.S,v 1.2 2014/01/23 03:08:50 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -81,7 +81,7 @@
mov s0, a0
ldq s0, (( 9 + 4) * 8)(a0)
- ldiq t0, 0xacedbade /* sigcontext magic number */
+ ldq t0, magic /* sigcontext magic number */
stq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */
/* Too bad we can't check if we actually used FP */
ldiq t0, 1
@@ -121,4 +121,6 @@
CALL(longjmperror)
CALL(abort)
RET /* "can't" get here... */
+magic:
+ .quad 0xacedbade /* sigcontext magic number */
END(longjmp)
Home |
Main Index |
Thread Index |
Old Index