From ad999cc7a513b905c10af0687b5014cde2b4bf9a Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Fri, 6 May 2005 18:55:03 +0000 Subject: Use *ENTRY() macros for function prologues, rather than providing the register save mask as a number. ok hugh@ --- sys/arch/vax/vax/random.s | 9 ++++----- sys/arch/vax/vax/subr.s | 7 +++---- sys/arch/vax/vax/udiv.s | 8 ++++---- sys/arch/vax/vax/unimpl_emul.s | 11 +++-------- sys/arch/vax/vax/urem.s | 8 ++++---- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/sys/arch/vax/vax/random.s b/sys/arch/vax/vax/random.s index 865c9cd79ba..65ca3fc0ddf 100644 --- a/sys/arch/vax/vax/random.s +++ b/sys/arch/vax/vax/random.s @@ -1,4 +1,4 @@ -/* $OpenBSD: random.s,v 1.3 1997/01/15 23:25:21 maja Exp $ */ +/* $OpenBSD: random.s,v 1.4 2005/05/06 18:55:02 miod Exp $ */ /* $NetBSD: random.s,v 1.2 1994/10/26 08:03:24 cgd Exp $ */ /* @@ -47,14 +47,13 @@ * The result is in (0,2^31), e.g., it's always positive. */ +#include + .data .globl __randseed __randseed: .long 1 - .text - .globl _random -_random: - .word 0x0 +ENTRY(random, 0) movl $16807,r0 movl __randseed,r1 # r2=16807*loword(__randseed) diff --git a/sys/arch/vax/vax/subr.s b/sys/arch/vax/vax/subr.s index bc7bb9c9e63..d06e031e9d6 100644 --- a/sys/arch/vax/vax/subr.s +++ b/sys/arch/vax/vax/subr.s @@ -1,4 +1,4 @@ -/* $OpenBSD: subr.s,v 1.21 2004/07/07 23:10:46 deraadt Exp $ */ +/* $OpenBSD: subr.s,v 1.22 2005/05/06 18:55:02 miod Exp $ */ /* $NetBSD: subr.s,v 1.32 1999/03/25 00:41:48 mrg Exp $ */ /* @@ -222,8 +222,7 @@ ENTRY(bcmp, R2); /* * DDB is the only routine that uses setjmp/longjmp. */ - .globl _setjmp, _longjmp -_setjmp:.word 0 +ENTRY(setjmp, 0) movl 4(ap), r0 movl 8(fp), (r0) movl 12(fp), 4(r0) @@ -232,7 +231,7 @@ _setjmp:.word 0 clrl r0 ret -_longjmp:.word 0 +ENTRY(longjmp, 0) movl 4(ap), r1 movl 8(ap), r0 movl (r1), ap diff --git a/sys/arch/vax/vax/udiv.s b/sys/arch/vax/vax/udiv.s index f281c33e289..cbc084754a0 100644 --- a/sys/arch/vax/vax/udiv.s +++ b/sys/arch/vax/vax/udiv.s @@ -1,4 +1,4 @@ -/* $OpenBSD: udiv.s,v 1.3 2003/06/02 23:27:59 millert Exp $ */ +/* $OpenBSD: udiv.s,v 1.4 2005/05/06 18:55:02 miod Exp $ */ /* $NetBSD: udiv.s,v 1.2 1994/10/26 08:03:34 cgd Exp $ */ /*- @@ -35,6 +35,8 @@ * @(#)udiv.s 5.6 (Berkeley) 4/15/91 */ +#include + /* * Unsigned division, PCC flavor. * udiv() takes an ordinary dividend/divisor pair; @@ -45,9 +47,7 @@ #define DIVIDEND 4(ap) #define DIVISOR 8(ap) - .globl udiv - .align 2 -udiv: .word 0x0 +ASENTRY(udiv, 0) movl DIVISOR,r2 jlss Leasy # big divisor: settle by comparison movl DIVIDEND,r0 diff --git a/sys/arch/vax/vax/unimpl_emul.s b/sys/arch/vax/vax/unimpl_emul.s index 92eedf56fdf..869376953a4 100644 --- a/sys/arch/vax/vax/unimpl_emul.s +++ b/sys/arch/vax/vax/unimpl_emul.s @@ -1,4 +1,4 @@ -/* $OpenBSD: unimpl_emul.s,v 1.7 2005/05/06 00:57:39 miod Exp $ */ +/* $OpenBSD: unimpl_emul.s,v 1.8 2005/05/06 18:55:02 miod Exp $ */ /* $NetBSD: unimpl_emul.s,v 1.2 2000/08/14 11:16:52 ragge Exp $ */ /* @@ -773,9 +773,7 @@ zeroexit: * returns number of bits, unless there aren't any; * in that case it will return $0xffffffff */ -bitcnt: - .word 0xffe /* r1-r12 */ - +ASENTRY(bitcnt, R1|R2|R3|R4|R5|R6|R7|R8|R9|R10|R11) /* * Our goal is to factor a common power of 2 out of each of the * two factors involved in the multiplication. Once we have that, @@ -824,9 +822,7 @@ bitcnt: * The fourth argument to fltext_De is the eight extra bits for use * in EMOD*, et al. If these bits are not in use, specify 0. */ -fltext_De: - .word 0x831 # r0 r1 r2 r3 r4 ap (no return) - +ASENTRY(fltext_De, R0|R1|R2) movl 0x4(ap), r0 # r0 - addr of source movl 0x8(ap), r1 # r1 - addr of fraction destination @@ -850,4 +846,3 @@ fltext_De: movl 0xc(ap), r2 # r2 - addr of exponent destination extzv $0x7, $0x8, (r0), (r2) # get exponent out ret - diff --git a/sys/arch/vax/vax/urem.s b/sys/arch/vax/vax/urem.s index ea50b50c76a..18b05b9e08d 100644 --- a/sys/arch/vax/vax/urem.s +++ b/sys/arch/vax/vax/urem.s @@ -1,4 +1,4 @@ -/* $OpenBSD: urem.s,v 1.3 2003/06/02 23:27:59 millert Exp $ */ +/* $OpenBSD: urem.s,v 1.4 2005/05/06 18:55:02 miod Exp $ */ /* $NetBSD: urem.s,v 1.2 1994/10/26 08:03:37 cgd Exp $ */ /*- @@ -35,6 +35,8 @@ * @(#)urem.s 5.6 (Berkeley) 4/15/91 */ +#include + /* * Unsigned modulus, PCC flavor. * urem() takes an ordinary dividend/divisor pair; @@ -42,10 +44,8 @@ #define DIVIDEND 4(ap) #define DIVISOR 8(ap) - .globl urem - .align 2 -urem: .word 0x0 +ASENTRY(urem, 0) movl 8(ap),r2 jlss Leasy # big divisor: settle by comparison movl 4(ap),r0 -- cgit v1.2.3