Switch arch/sh3/gen to the new compat code layout.

This commit is contained in:
uwe 2005-09-15 22:44:58 +00:00
parent d23b4c02bd
commit 4890707a48
8 changed files with 136 additions and 125 deletions

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.17 2005/04/15 22:39:11 kleink Exp $
# $NetBSD: Makefile.inc,v 1.18 2005/09/15 22:44:58 uwe Exp $
SRCS+= _setjmp.S setjmp.S sigsetjmp.S __setjmp14.S __sigsetjmp14.S
SRCS+= setjmp.S sigsetjmp.S
SRCS+= makecontext.c resumecontext.c swapcontext.S

View File

@ -1,4 +1,4 @@
/* $NetBSD: setjmp.S,v 1.6 2003/08/07 16:42:19 agc Exp $ */
/* $NetBSD: setjmp.S,v 1.7 2005/09/15 22:44:58 uwe Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: setjmp.S,v 1.6 2003/08/07 16:42:19 agc Exp $")
RCSID("$NetBSD: setjmp.S,v 1.7 2005/09/15 22:44:58 uwe Exp $")
#endif
/*
@ -49,24 +49,28 @@
* The previous signal state is restored.
*/
ENTRY(setjmp)
ENTRY(__setjmp14)
sts.l pr, @-r15
mov.l r4, @-r15
mov #0, r4
mov.l Lsigblock, r0
mov r4, r6
mov #1, r4 /* SIG_BLOCK */
mov #0, r5
add #4*10, r6 /* &sigmask */
#ifdef PIC
mov.l L__sigprocmask14r1, r0
bsrf r0
nop
1:
L__sigprocmask14o1:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
mov.l @r15+, r4
lds.l @r15+, pr
add #4*11, r4
mov.l r0, @-r4 /* sigmask */
add #4*10, r4
mov #1, r0
mov.l r0, @-r4 /* savemask */
mov.l r15, @-r4
@ -81,26 +85,21 @@ ENTRY(setjmp)
rts
xor r0, r0
.align 2
Lsigblock:
#ifdef PIC
.long _C_LABEL(sigblock)-1b
#else
.long _C_LABEL(sigblock)
#endif
ENTRY(longjmp)
ENTRY(__longjmp14)
mov.l r4, @-r15
mov.l r5, @-r15
mov r4, r0
add #4*10, r0
mov.l @r0, r4
mov.l Lsigsetmask, r0
mov r4, r5
mov #3, r4 /* SIG_SETMASK */
add #4*10, r5 /* &sigmask */
mov #0, r6
#ifdef PIC
mov.l L__sigprocmask14r2, r0
bsrf r0
nop
1:
L__sigprocmask14o2:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
@ -125,9 +124,12 @@ ENTRY(longjmp)
nop
.align 2
Lsigsetmask:
#ifdef PIC
.long _C_LABEL(sigsetmask)-1b
L__sigprocmask14r1:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o1
L__sigprocmask14r2:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o2
#else
.long _C_LABEL(sigsetmask)
L__sigprocmask14:
.long _C_LABEL(__sigprocmask14)
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: sigsetjmp.S,v 1.6 2003/08/07 16:42:19 agc Exp $ */
/* $NetBSD: sigsetjmp.S,v 1.7 2005/09/15 22:44:58 uwe Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -31,42 +31,44 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"
* from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90
*/
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: sigsetjmp.S,v 1.6 2003/08/07 16:42:19 agc Exp $")
RCSID("$NetBSD: sigsetjmp.S,v 1.7 2005/09/15 22:44:58 uwe Exp $")
#endif
ENTRY(sigsetjmp)
mov r4, r0
add #4*9, r0 ! &savemask
mov.l r5, @r0
ENTRY(__sigsetjmp14)
tst r5, r5
bt 1f
sts.l pr, @-r15
mov.l r4, @-r15
mov #0, r4
mov.l Lsigblock, r0
mov.l r5, @-r15
mov r4, r6
mov #1, r4 /* SIG_BLOCK */
mov #0, r5
add #4*10, r6 /* &sigmask */
#ifdef PIC
mov.l L__sigprocmask14r1, r0
bsrf r0
nop
2:
L__sigprocmask14o1:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
mov.l @r15+, r5
mov.l @r15+, r4
lds.l @r15+, pr
mov r4, r1
add #4*10, r1
mov.l r0, @r1
1:
add #4*9, r4
add #4*10, r4
mov.l r5, @-r4
mov.l r15, @-r4
mov.l r14, @-r4
mov.l r13, @-r4
@ -79,15 +81,7 @@ ENTRY(sigsetjmp)
rts
xor r0, r0
.align 2
Lsigblock:
#ifdef PIC
.long _C_LABEL(sigblock)-2b
#else
.long _C_LABEL(sigblock)
#endif
ENTRY(siglongjmp)
ENTRY(__siglongjmp14)
mov r4, r0
add #4*9, r0
mov.l @r0, r0
@ -96,15 +90,17 @@ ENTRY(siglongjmp)
mov.l r4, @-r15
mov.l r5, @-r15
mov r4, r0
add #4*10, r0
mov.l @r0, r4
mov.l Lsigsetmask, r0
mov r4, r5
mov #3, r4 /* SIG_SETMASK */
add #4*10, r5 /* &sigmask */
mov #0, r6
#ifdef PIC
mov.l L__sigprocmask14r2, r0
bsrf r0
nop
2:
L__sigprocmask14o2:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
@ -112,7 +108,6 @@ ENTRY(siglongjmp)
mov.l @r15+, r4
1:
mov r5, r0
lds.l @r4+, pr
mov.l @r4+, r8
mov.l @r4+, r9
@ -122,6 +117,8 @@ ENTRY(siglongjmp)
mov.l @r4+, r13
mov.l @r4+, r14
mov.l @r4+, r15
mov r5, r0
tst r0, r0
bf .L0
add #1, r0
@ -130,9 +127,12 @@ ENTRY(siglongjmp)
nop
.align 2
Lsigsetmask :
#ifdef PIC
.long _C_LABEL(sigsetmask)-2b
L__sigprocmask14r1:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o1
L__sigprocmask14r2:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o2
#else
.long _C_LABEL(sigsetmask)
L__sigprocmask14:
.long _C_LABEL(__sigprocmask14)
#endif

View File

@ -1,3 +1,4 @@
# $NetBSD: Makefile.inc,v 1.1 2005/09/15 21:39:16 uwe Exp $
# $NetBSD: Makefile.inc,v 1.2 2005/09/15 22:44:58 uwe Exp $
.include "${.CURDIR}/compat/arch/sh3/gen/Makefile.inc"
.include "${.CURDIR}/compat/arch/sh3/sys/Makefile.inc"

View File

@ -0,0 +1,10 @@
# $NetBSD: Makefile.inc,v 1.1 2005/09/15 22:44:58 uwe Exp $
# objects built from assembler sources (need lint stubs)
SRCS+= compat_setjmp.S compat__setjmp.S compat_sigsetjmp.S
SRCS.compat.sh3.gen=Lint__setjmp.c
LSRCS+= ${SRCS.compat.sh3.gen}
DPSRCS+= ${SRCS.compat.sh3.gen}
CLEANFILES+= ${SRCS.compat.sh3.gen}

View File

@ -1,4 +1,4 @@
/* $NetBSD: _setjmp.S,v 1.2 2003/08/07 16:42:19 agc Exp $ */
/* $NetBSD: compat__setjmp.S,v 1.1 2005/09/15 22:44:58 uwe Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: _setjmp.S,v 1.2 2003/08/07 16:42:19 agc Exp $")
RCSID("$NetBSD: compat__setjmp.S,v 1.1 2005/09/15 22:44:58 uwe Exp $")
#endif
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: __setjmp14.S,v 1.6 2003/08/07 16:42:19 agc Exp $ */
/* $NetBSD: compat_setjmp.S,v 1.1 2005/09/15 22:44:58 uwe Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -36,7 +36,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: __setjmp14.S,v 1.6 2003/08/07 16:42:19 agc Exp $")
RCSID("$NetBSD: compat_setjmp.S,v 1.1 2005/09/15 22:44:58 uwe Exp $")
#endif
/*
@ -49,28 +49,24 @@
* The previous signal state is restored.
*/
ENTRY(__setjmp14)
ENTRY(setjmp)
sts.l pr, @-r15
mov.l r4, @-r15
mov r4, r6
mov #1, r4 /* SIG_BLOCK */
mov #0, r5
add #4*10, r6 /* &sigmask */
mov #0, r4
mov.l Lsigblock, r0
#ifdef PIC
mov.l L__sigprocmask14r1, r0
bsrf r0
nop
L__sigprocmask14o1:
1:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
mov.l @r15+, r4
lds.l @r15+, pr
add #4*10, r4
add #4*11, r4
mov.l r0, @-r4 /* sigmask */
mov #1, r0
mov.l r0, @-r4 /* savemask */
mov.l r15, @-r4
@ -85,21 +81,26 @@ L__sigprocmask14o1:
rts
xor r0, r0
ENTRY(__longjmp14)
.align 2
Lsigblock:
#ifdef PIC
.long _C_LABEL(sigblock)-1b
#else
.long _C_LABEL(sigblock)
#endif
ENTRY(longjmp)
mov.l r4, @-r15
mov.l r5, @-r15
mov r4, r5
mov #3, r4 /* SIG_SETMASK */
add #4*10, r5 /* &sigmask */
mov #0, r6
mov r4, r0
add #4*10, r0
mov.l @r0, r4
mov.l Lsigsetmask, r0
#ifdef PIC
mov.l L__sigprocmask14r2, r0
bsrf r0
nop
L__sigprocmask14o2:
1:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
@ -124,12 +125,9 @@ L__sigprocmask14o2:
nop
.align 2
Lsigsetmask:
#ifdef PIC
L__sigprocmask14r1:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o1
L__sigprocmask14r2:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o2
.long _C_LABEL(sigsetmask)-1b
#else
L__sigprocmask14:
.long _C_LABEL(__sigprocmask14)
.long _C_LABEL(sigsetmask)
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: __sigsetjmp14.S,v 1.6 2003/08/07 16:42:19 agc Exp $ */
/* $NetBSD: compat_sigsetjmp.S,v 1.1 2005/09/15 22:44:58 uwe Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -31,44 +31,42 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90
* from: @(#)setjmp.s 5.1 (Berkeley) 4/23/90"
*/
#include <machine/asm.h>
#if defined(LIBC_SCCS)
RCSID("$NetBSD: __sigsetjmp14.S,v 1.6 2003/08/07 16:42:19 agc Exp $")
RCSID("$NetBSD: compat_sigsetjmp.S,v 1.1 2005/09/15 22:44:58 uwe Exp $")
#endif
ENTRY(__sigsetjmp14)
ENTRY(sigsetjmp)
mov r4, r0
add #4*9, r0 ! &savemask
mov.l r5, @r0
tst r5, r5
bt 1f
sts.l pr, @-r15
mov.l r4, @-r15
mov.l r5, @-r15
mov r4, r6
mov #1, r4 /* SIG_BLOCK */
mov #0, r5
add #4*10, r6 /* &sigmask */
mov #0, r4
mov.l Lsigblock, r0
#ifdef PIC
mov.l L__sigprocmask14r1, r0
bsrf r0
nop
L__sigprocmask14o1:
2:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
mov.l @r15+, r5
mov.l @r15+, r4
lds.l @r15+, pr
mov r4, r1
add #4*10, r1
mov.l r0, @r1
1:
add #4*10, r4
mov.l r5, @-r4
add #4*9, r4
mov.l r15, @-r4
mov.l r14, @-r4
mov.l r13, @-r4
@ -81,7 +79,15 @@ L__sigprocmask14o1:
rts
xor r0, r0
ENTRY(__siglongjmp14)
.align 2
Lsigblock:
#ifdef PIC
.long _C_LABEL(sigblock)-2b
#else
.long _C_LABEL(sigblock)
#endif
ENTRY(siglongjmp)
mov r4, r0
add #4*9, r0
mov.l @r0, r0
@ -90,17 +96,15 @@ ENTRY(__siglongjmp14)
mov.l r4, @-r15
mov.l r5, @-r15
mov r4, r5
mov #3, r4 /* SIG_SETMASK */
add #4*10, r5 /* &sigmask */
mov #0, r6
mov r4, r0
add #4*10, r0
mov.l @r0, r4
mov.l Lsigsetmask, r0
#ifdef PIC
mov.l L__sigprocmask14r2, r0
bsrf r0
nop
L__sigprocmask14o2:
2:
#else
mov.l L__sigprocmask14, r0
jsr @r0
nop
#endif
@ -108,6 +112,7 @@ L__sigprocmask14o2:
mov.l @r15+, r4
1:
mov r5, r0
lds.l @r4+, pr
mov.l @r4+, r8
mov.l @r4+, r9
@ -117,8 +122,6 @@ L__sigprocmask14o2:
mov.l @r4+, r13
mov.l @r4+, r14
mov.l @r4+, r15
mov r5, r0
tst r0, r0
bf .L0
add #1, r0
@ -127,12 +130,9 @@ L__sigprocmask14o2:
nop
.align 2
Lsigsetmask :
#ifdef PIC
L__sigprocmask14r1:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o1
L__sigprocmask14r2:
.long _C_LABEL(__sigprocmask14)-L__sigprocmask14o2
.long _C_LABEL(sigsetmask)-2b
#else
L__sigprocmask14:
.long _C_LABEL(__sigprocmask14)
.long _C_LABEL(sigsetmask)
#endif