Source-Changes-HG archive

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

[src/trunk]: src/libexec/ld.aout_so/arch/vax Make longjmp work with dynamic l...



details:   https://anonhg.NetBSD.org/src/rev/f7b0e92bd988
branches:  trunk
changeset: 474121:f7b0e92bd988
user:      ragge <ragge%NetBSD.org@localhost>
date:      Mon Jun 28 17:28:56 1999 +0000

description:
Make longjmp work with dynamic linking. From Matt Thomas.
Fixes PR#7671.

diffstat:

 libexec/ld.aout_so/arch/vax/md.c         |  4 ++--
 libexec/ld.aout_so/arch/vax/mdprologue.S |  6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r f4238f361cf0 -r f7b0e92bd988 libexec/ld.aout_so/arch/vax/md.c
--- a/libexec/ld.aout_so/arch/vax/md.c  Mon Jun 28 15:51:26 1999 +0000
+++ b/libexec/ld.aout_so/arch/vax/md.c  Mon Jun 28 17:28:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.14 1999/03/13 17:09:51 ragge Exp $    */
+/*     $NetBSD: md.c,v 1.15 1999/06/28 17:28:56 ragge Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -209,7 +209,7 @@
         */
        u_long fudge = - (offset + 9);
 
-       sp->mask = 0x0000;                      /* no registers */
+       sp->mask = (1 << 6);                    /* Just R6 (for setjmp) */
        sp->insn[0] = 0x01;                     /* nop */
        sp->insn[1] = 0x16;                     /* jsb */
        sp->insn[2] = 0xef;                     /* L^(pc) */
diff -r f4238f361cf0 -r f7b0e92bd988 libexec/ld.aout_so/arch/vax/mdprologue.S
--- a/libexec/ld.aout_so/arch/vax/mdprologue.S  Mon Jun 28 15:51:26 1999 +0000
+++ b/libexec/ld.aout_so/arch/vax/mdprologue.S  Mon Jun 28 17:28:56 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mdprologue.S,v 1.9 1998/10/31 08:59:58 matt Exp $      */
+/*     $NetBSD: mdprologue.S,v 1.10 1999/06/28 17:28:56 ragge Exp $    */
 
 /*
  * Copyright (c) 1998 Matt Thomas <matt%3am-software.com@localhost>
@@ -92,8 +92,8 @@
        pushab  1f              /*   by issuing an */
        rei                     /*   rei. */
 1:     movl    r0, 24(sp)      /* save return address onto stack */
-       popr    $0x3f           /* restore r0 to r5 */
-       tstw    *(sp)           /* does the entry mask save any regs */
+       bicw3   6(fp),(r0),r0   /* does the entry mask save any additional regs */
+       popr    $0x3f           /* restore r0 to r5 (cond flags aren't modified) */
        bneq    2f              /* yes? do it the hard way */
        addl2   $2,(sp)         /* no? skip past the mask */
        rsb                     /*    and jump to it */



Home | Main Index | Thread Index | Old Index