Make longjmp work with dynamic linking. From Matt Thomas.

Fixes PR#7671.
This commit is contained in:
ragge 1999-06-28 17:28:56 +00:00
parent 4fe4dae943
commit f4d411a4a4
2 changed files with 5 additions and 5 deletions

View File

@ -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 @@ md_make_jmpslot(sp, offset, index)
*/
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) */

View File

@ -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>
@ -92,8 +92,8 @@ _binder_entry:
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 */