From 34fe484bd1ebda2a0a3be6925defcca214148624 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 5 Jan 2013 11:20:57 +0000 Subject: Switch m88k ports to ELF. --- lib/libc/arch/m88k/SYS.h | 10 +-- lib/libc/arch/m88k/gen/_setjmp.S | 112 +++++++++++++-------------- lib/libc/arch/m88k/gen/fabs.S | 18 ++--- lib/libc/arch/m88k/gen/flt_rounds.c | 4 +- lib/libc/arch/m88k/gen/fpgetmask.c | 4 +- lib/libc/arch/m88k/gen/fpgetround.c | 4 +- lib/libc/arch/m88k/gen/fpgetsticky.c | 4 +- lib/libc/arch/m88k/gen/fpsetmask.c | 6 +- lib/libc/arch/m88k/gen/fpsetround.c | 6 +- lib/libc/arch/m88k/gen/fpsetsticky.c | 6 +- lib/libc/arch/m88k/gen/setjmp.S | 132 ++++++++++++++++---------------- lib/libc/arch/m88k/gen/sigsetjmp.S | 140 +++++++++++++++++----------------- lib/libc/arch/m88k/net/htonl.S | 4 +- lib/libc/arch/m88k/net/htons.S | 6 +- lib/libc/arch/m88k/net/ntohl.S | 4 +- lib/libc/arch/m88k/net/ntohs.S | 6 +- lib/libc/arch/m88k/sys/Ovfork.S | 10 +-- lib/libc/arch/m88k/sys/brk.S | 30 ++++---- lib/libc/arch/m88k/sys/cerror.S | 16 ++-- lib/libc/arch/m88k/sys/exect.S | 6 +- lib/libc/arch/m88k/sys/fork.S | 10 +-- lib/libc/arch/m88k/sys/sbrk.S | 24 +++--- lib/libc/arch/m88k/sys/sigpending.S | 14 ++-- lib/libc/arch/m88k/sys/sigprocmask.S | 20 ++--- lib/libc/arch/m88k/sys/sigreturn.S | 4 +- lib/libc/arch/m88k/sys/sigsuspend.S | 12 +-- lib/libc/arch/m88k/sys/syscall.S | 8 +- lib/libc/arch/m88k/sys/tfork_thread.S | 18 ++--- 28 files changed, 319 insertions(+), 319 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/arch/m88k/SYS.h b/lib/libc/arch/m88k/SYS.h index 14cd26e5ab7..446c4c37d6f 100644 --- a/lib/libc/arch/m88k/SYS.h +++ b/lib/libc/arch/m88k/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.12 2007/10/24 20:19:09 miod Exp $*/ +/* $OpenBSD: SYS.h,v 1.13 2013/01/05 11:20:55 miod Exp $*/ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -48,8 +48,8 @@ #endif #define __DO_SYSCALL(x) \ - or r13,r0,__SYSCALLNAME(SYS_,x); \ - tb0 0, r0, 128 + or %r13, %r0, __SYSCALLNAME(SYS_,x); \ + tb0 0, %r0, 128 #define __SYSCALL__NOERROR(p,x,y) \ __ENTRY(p,x); \ @@ -62,11 +62,11 @@ #define __PSEUDO_NOERROR(p,x,y) \ __SYSCALL__NOERROR(p,x,y); \ - jmp r1 + jmp %r1 #define __PSEUDO(p,x,y) \ __SYSCALL(p,x,y); \ - jmp r1 + jmp %r1 /* * System calls entry points are really named _thread_sys_{syscall}, diff --git a/lib/libc/arch/m88k/gen/_setjmp.S b/lib/libc/arch/m88k/gen/_setjmp.S index 4e74b39fcb3..ffa1c78846e 100644 --- a/lib/libc/arch/m88k/gen/_setjmp.S +++ b/lib/libc/arch/m88k/gen/_setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: _setjmp.S,v 1.9 2012/08/12 17:14:39 miod Exp $ */ +/* $OpenBSD: _setjmp.S,v 1.10 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 2002 Steve Murphree, Jr. * All rights reserved. @@ -55,68 +55,68 @@ int _setjmp(jmp_buf env); */ ENTRY(_setjmp) - st r1, r2,0 /* save registers to the environment buffer */ - st r14,r2,8 - st r15,r2,12 - st r16,r2,16 - st r17,r2,20 - st r18,r2,24 - st r19,r2,28 - st r20,r2,32 - st r21,r2,36 - st r22,r2,40 - st r23,r2,44 - st r24,r2,48 - st r25,r2,52 - st r26,r2,56 - st r27,r2,60 - st r28,r2,64 - st r29,r2,68 - st r30,r2,72 - st r31,r2,76 - or r4,r0,U_SETJMP_SIG /* setjmp type to _setjmp */ - st r4,r2,80 - jmp.n r1 - or r2,r0,0 /* return 0 */ + st %r1, %r2,0 /* save registers to the environment buffer */ + st %r14,%r2,8 + st %r15,%r2,12 + st %r16,%r2,16 + st %r17,%r2,20 + st %r18,%r2,24 + st %r19,%r2,28 + st %r20,%r2,32 + st %r21,%r2,36 + st %r22,%r2,40 + st %r23,%r2,44 + st %r24,%r2,48 + st %r25,%r2,52 + st %r26,%r2,56 + st %r27,%r2,60 + st %r28,%r2,64 + st %r29,%r2,68 + st %r30,%r2,72 + st %r31,%r2,76 + or %r4,%r0,U_SETJMP_SIG /* setjmp type to _setjmp */ + st %r4,%r2,80 + jmp.n %r1 + or %r2,%r0,0 /* return 0 */ /* void _longjmp(jmp_buf env, int val); */ ENTRY(_longjmp) - bcnd eq0,r2,2f /* check for bad environment buffer address. */ - ld r4,r2,80 /* check setjmp type. */ - cmp r4,r4,U_SETJMP_SIG /* should be U_SETJMP_SIG */ - bb1 ne,r4,2f /* if != U_SETJMP_SIG, abort. */ + bcnd eq0,%r2,2f /* check for bad environment buffer address. */ + ld %r4,%r2,80 /* check setjmp type. */ + cmp %r4,%r4,U_SETJMP_SIG /* should be U_SETJMP_SIG */ + bb1 ne,%r4,2f /* if != U_SETJMP_SIG, abort. */ - ld r14,r2,8 /* restore registers from the environment buffer */ - ld r15,r2,12 - ld r16,r2,16 - ld r17,r2,20 - ld r18,r2,24 - ld r19,r2,28 - ld r20,r2,32 - ld r21,r2,36 - ld r22,r2,40 - ld r23,r2,44 - ld r24,r2,48 - ld r25,r2,52 - ld r26,r2,56 - ld r27,r2,60 - ld r28,r2,64 - ld r29,r2,68 - ld r30,r2,72 - ld r31,r2,76 - ld r1,r2,0 /* restore r1 */ - bcnd.n ne0,r3,1f - or r2,r3,r0 - or r2,r0,1 /* never return zero! */ -1: jmp r1 + ld %r14,%r2,8 /* restore registers from the environment buffer */ + ld %r15,%r2,12 + ld %r16,%r2,16 + ld %r17,%r2,20 + ld %r18,%r2,24 + ld %r19,%r2,28 + ld %r20,%r2,32 + ld %r21,%r2,36 + ld %r22,%r2,40 + ld %r23,%r2,44 + ld %r24,%r2,48 + ld %r25,%r2,52 + ld %r26,%r2,56 + ld %r27,%r2,60 + ld %r28,%r2,64 + ld %r29,%r2,68 + ld %r30,%r2,72 + ld %r31,%r2,76 + ld %r1,%r2,0 /* restore r1 */ + bcnd.n ne0,%r3,1f + or %r2,%r3,%r0 + or %r2,%r0,1 /* never return zero! */ +1: jmp %r1 -2: subu r31,r31,16 /* get a temporary stack */ - st r1,r31,0 /* save r1 on stack (return address) */ +2: subu %r31,%r31,16 /* get a temporary stack */ + st %r1,%r31,0 /* save r1 on stack (return address) */ bsr _C_LABEL(longjmperror) bsr _C_LABEL(abort) /* NO RETURN */ - ld r1,r31,0 /* restore r1 from stack */ - jmp.n r1 /* this should not happen but we are prepared */ - addu r31,r31,16 /* restore the stack */ + ld %r1,%r31,0 /* restore r1 from stack */ + jmp.n %r1 /* this should not happen but we are prepared */ + addu %r31,%r31,16 /* restore the stack */ diff --git a/lib/libc/arch/m88k/gen/fabs.S b/lib/libc/arch/m88k/gen/fabs.S index 68fe00a9392..df9183adcbe 100644 --- a/lib/libc/arch/m88k/gen/fabs.S +++ b/lib/libc/arch/m88k/gen/fabs.S @@ -1,4 +1,4 @@ -/* $OpenBSD: fabs.S,v 1.9 2011/07/08 22:28:33 martynas Exp $ */ +/* $OpenBSD: fabs.S,v 1.10 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -36,11 +36,11 @@ */ ENTRY(fabs) - subu r31,r31,16 - st.d r2,r31,0 - ld.bu r4,r31,0 - mask r4,r4,0x7f /* set sign bit to 0 */ - st.b r4,r31,0 - ld.d r2,r31,0 - jmp.n r1 - addu r31,r31,16 + subu %r31,%r31,16 + st.d %r2,%r31,0 + ld.bu %r4,%r31,0 + mask %r4,%r4,0x7f /* set sign bit to 0 */ + st.b %r4,%r31,0 + ld.d %r2,%r31,0 + jmp.n %r1 + addu %r31,%r31,16 diff --git a/lib/libc/arch/m88k/gen/flt_rounds.c b/lib/libc/arch/m88k/gen/flt_rounds.c index 3f5e3231e04..c7dd499f27a 100644 --- a/lib/libc/arch/m88k/gen/flt_rounds.c +++ b/lib/libc/arch/m88k/gen/flt_rounds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flt_rounds.c,v 1.4 2012/06/25 17:01:11 deraadt Exp $ */ +/* $OpenBSD: flt_rounds.c,v 1.5 2013/01/05 11:20:55 miod Exp $ */ /* * Written by J.T. Conklin, Apr 10, 1995 @@ -24,6 +24,6 @@ __flt_rounds() { int x; - __asm__("fldcr %0,fcr63" : "=r" (x)); + __asm__("fldcr %0, %%fcr63" : "=r" (x)); return map[(x >> 14) & 0x03]; } diff --git a/lib/libc/arch/m88k/gen/fpgetmask.c b/lib/libc/arch/m88k/gen/fpgetmask.c index 5dc62b456e3..700831361b5 100644 --- a/lib/libc/arch/m88k/gen/fpgetmask.c +++ b/lib/libc/arch/m88k/gen/fpgetmask.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpgetmask.c,v 1.3 2005/08/07 16:40:14 espie Exp $ */ +/* $OpenBSD: fpgetmask.c,v 1.4 2013/01/05 11:20:55 miod Exp $ */ /* * Written by J.T. Conklin, Apr 10, 1995 @@ -13,6 +13,6 @@ fpgetmask() { int x; - __asm__ volatile ("fldcr %0,fcr63" : "=r" (x)); + __asm__ volatile ("fldcr %0, %%fcr63" : "=r" (x)); return (x & 0x1f); } diff --git a/lib/libc/arch/m88k/gen/fpgetround.c b/lib/libc/arch/m88k/gen/fpgetround.c index 4a95df6b7d3..ca59bb78ac7 100644 --- a/lib/libc/arch/m88k/gen/fpgetround.c +++ b/lib/libc/arch/m88k/gen/fpgetround.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpgetround.c,v 1.3 2005/08/07 16:40:14 espie Exp $ */ +/* $OpenBSD: fpgetround.c,v 1.4 2013/01/05 11:20:55 miod Exp $ */ /* * Written by J.T. Conklin, Apr 10, 1995 @@ -13,6 +13,6 @@ fpgetround() { int x; - __asm__ volatile ("fldcr %0, fcr63" : "=r" (x)); + __asm__ volatile ("fldcr %0, %%fcr63" : "=r" (x)); return (x >> 14) & 0x03; } diff --git a/lib/libc/arch/m88k/gen/fpgetsticky.c b/lib/libc/arch/m88k/gen/fpgetsticky.c index 05258e4b8e0..ae92201c48b 100644 --- a/lib/libc/arch/m88k/gen/fpgetsticky.c +++ b/lib/libc/arch/m88k/gen/fpgetsticky.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpgetsticky.c,v 1.3 2005/08/07 16:40:14 espie Exp $ */ +/* $OpenBSD: fpgetsticky.c,v 1.4 2013/01/05 11:20:55 miod Exp $ */ /* * Written by J.T. Conklin, Apr 10, 1995 @@ -13,6 +13,6 @@ fpgetsticky() { int x; - __asm__ volatile("fldcr %0,fcr62" : "=r" (x)); + __asm__ volatile("fldcr %0, %%fcr62" : "=r" (x)); return x & 0x1f; } diff --git a/lib/libc/arch/m88k/gen/fpsetmask.c b/lib/libc/arch/m88k/gen/fpsetmask.c index 03b7164052e..0f054ae4928 100644 --- a/lib/libc/arch/m88k/gen/fpsetmask.c +++ b/lib/libc/arch/m88k/gen/fpsetmask.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpsetmask.c,v 1.3 2005/08/07 16:40:14 espie Exp $ */ +/* $OpenBSD: fpsetmask.c,v 1.4 2013/01/05 11:20:55 miod Exp $ */ /* * Written by J.T. Conklin, Apr 10, 1995 @@ -15,13 +15,13 @@ fpsetmask(mask) fp_except old; fp_except new; - __asm__ volatile("fldcr %0,fcr63" : "=r" (old)); + __asm__ volatile("fldcr %0, %%fcr63" : "=r" (old)); new = old; new &= ~0x1f; /* clear bottom 5 bits and */ new |= (mask & 0x1f); /* set them to mask */ - __asm__ volatile("fstcr %0,fcr63" : : "r" (new)); + __asm__ volatile("fstcr %0, %%fcr63" : : "r" (new)); return (old & 0x1f); } diff --git a/lib/libc/arch/m88k/gen/fpsetround.c b/lib/libc/arch/m88k/gen/fpsetround.c index 7acbf0c57a8..c9401c999e6 100644 --- a/lib/libc/arch/m88k/gen/fpsetround.c +++ b/lib/libc/arch/m88k/gen/fpsetround.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpsetround.c,v 1.3 2005/08/07 16:40:14 espie Exp $ */ +/* $OpenBSD: fpsetround.c,v 1.4 2013/01/05 11:20:55 miod Exp $ */ /* * Written by J.T. Conklin, Apr 10, 1995 @@ -15,13 +15,13 @@ fpsetround(rnd_dir) fp_rnd old; fp_rnd new; - __asm__ volatile("fldcr %0,fcr63" : "=r" (old)); + __asm__ volatile("fldcr %0, %%fcr63" : "=r" (old)); new = old; new &= ~(0x03 << 14); /* clear old value */ new |= ((rnd_dir & 0x03) << 14);/* and set new one */ - __asm__ volatile("fstcr %0,fcr63" : : "r" (new)); + __asm__ volatile("fstcr %0, %%fcr63" : : "r" (new)); return (old >> 14) & 0x03; } diff --git a/lib/libc/arch/m88k/gen/fpsetsticky.c b/lib/libc/arch/m88k/gen/fpsetsticky.c index c225d569905..ccce67e209a 100644 --- a/lib/libc/arch/m88k/gen/fpsetsticky.c +++ b/lib/libc/arch/m88k/gen/fpsetsticky.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpsetsticky.c,v 1.3 2005/08/07 16:40:14 espie Exp $ */ +/* $OpenBSD: fpsetsticky.c,v 1.4 2013/01/05 11:20:55 miod Exp $ */ /* * Written by J.T. Conklin, Apr 10, 1995 @@ -15,13 +15,13 @@ fpsetsticky(sticky) fp_except old; fp_except new; - __asm__ volatile("fldcr %0,fcr62" : "=r" (old)); + __asm__ volatile("fldcr %0, %%fcr62" : "=r" (old)); new = old; new &= ~(0x1f); new |= (sticky & 0x1f); - __asm__ volatile("fstcr %0,fcr62" : : "r" (new)); + __asm__ volatile("fstcr %0, %%fcr62" : : "r" (new)); return (old & 0x1f); } diff --git a/lib/libc/arch/m88k/gen/setjmp.S b/lib/libc/arch/m88k/gen/setjmp.S index e5f145f57de..541cb8b5f4a 100644 --- a/lib/libc/arch/m88k/gen/setjmp.S +++ b/lib/libc/arch/m88k/gen/setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: setjmp.S,v 1.10 2012/08/12 17:14:39 miod Exp $ */ +/* $OpenBSD: setjmp.S,v 1.11 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 2002 Steve Murphree, Jr. * All rights reserved. @@ -54,80 +54,80 @@ int setjmp(jmp_buf env); */ ENTRY(setjmp) - st r1, r2,0 /* save registers to the environment buffer */ - st r14,r2,8 - st r15,r2,12 - st r16,r2,16 - st r17,r2,20 - st r18,r2,24 - st r19,r2,28 - st r20,r2,32 - st r21,r2,36 - st r22,r2,40 - st r23,r2,44 - st r24,r2,48 - st r25,r2,52 - st r26,r2,56 - st r27,r2,60 - st r28,r2,64 - st r29,r2,68 - st r30,r2,72 - st r31,r2,76 - or r4,r0,SETJMP_SIG /* r4 now contains setjmp type */ - st r4,r2,80 /* setjmp type to _setjmp */ - or r14,r2,0 /* store address of env in r14 */ + st %r1, %r2,0 /* save registers to the environment buffer */ + st %r14,%r2,8 + st %r15,%r2,12 + st %r16,%r2,16 + st %r17,%r2,20 + st %r18,%r2,24 + st %r19,%r2,28 + st %r20,%r2,32 + st %r21,%r2,36 + st %r22,%r2,40 + st %r23,%r2,44 + st %r24,%r2,48 + st %r25,%r2,52 + st %r26,%r2,56 + st %r27,%r2,60 + st %r28,%r2,64 + st %r29,%r2,68 + st %r30,%r2,72 + st %r31,%r2,76 + or %r4,%r0,SETJMP_SIG /* r4 now contains setjmp type */ + st %r4,%r2,80 /* setjmp type to _setjmp */ + or %r14,%r2,0 /* store address of env in r14 */ bsr.n _C_LABEL(sigblock) /* r2 = sigblock(0) */ - or r2,r0,0 - st r2,r14,4 /* save signal set in offset 4 of env */ - ld r1,r14,0 - ld r14,r14,8 - jmp.n r1 /* return 0 */ - or r2,r0,0 + or %r2,%r0,0 + st %r2,%r14,4 /* save signal set in offset 4 of env */ + ld %r1,%r14,0 + ld %r14,%r14,8 + jmp.n %r1 /* return 0 */ + or %r2,%r0,0 /* void longjmp(jmp_buf env, int retval); */ ENTRY(longjmp) - bcnd eq0,r2,2f /* check for bad environment buffer address. */ - ld r4,r2,80 /* check setjmp type. */ - cmp r4,r4,SETJMP_SIG /* should be SETJMP_SIG */ - bb1 ne,r4,2f /* if != SETJMP_SIG, abort. */ + bcnd eq0,%r2,2f /* check for bad environment buffer address. */ + ld %r4,%r2,80 /* check setjmp type. */ + cmp %r4,%r4,SETJMP_SIG /* should be SETJMP_SIG */ + bb1 ne,%r4,2f /* if != SETJMP_SIG, abort. */ - ld r14,r2,8 /* restore registers from the environment buffer */ - ld r15,r2,12 - ld r16,r2,16 - ld r17,r2,20 - ld r18,r2,24 - ld r19,r2,28 - ld r20,r2,32 - ld r21,r2,36 - ld r22,r2,40 - ld r23,r2,44 - ld r24,r2,48 - ld r25,r2,52 - ld r26,r2,56 - ld r27,r2,60 - ld r28,r2,64 - ld r29,r2,68 - ld r30,r2,72 - ld r31,r2,76 + ld %r14,%r2,8 /* restore registers from the environment buffer */ + ld %r15,%r2,12 + ld %r16,%r2,16 + ld %r17,%r2,20 + ld %r18,%r2,24 + ld %r19,%r2,28 + ld %r20,%r2,32 + ld %r21,%r2,36 + ld %r22,%r2,40 + ld %r23,%r2,44 + ld %r24,%r2,48 + ld %r25,%r2,52 + ld %r26,%r2,56 + ld %r27,%r2,60 + ld %r28,%r2,64 + ld %r29,%r2,68 + ld %r30,%r2,72 + ld %r31,%r2,76 - subu r31,r31,16 /* get a temporary stack */ - st.d r2,r31,0 /* save r2 and r3 on stack (env + return val) */ + subu %r31,%r31,16 /* get a temporary stack */ + st.d %r2,%r31,0 /* save r2 and r3 on stack (env + return val) */ bsr.n _C_LABEL(sigsetmask) /* restore the signal set */ - ld r2,r2,4 - ld.d r2,r31,0 /* restore r2 and r3 */ - addu r31,r31,16 - ld r1,r2,0 /* restore r1 */ - bcnd.n ne0,r3,1f - or r2,r3,r0 - or r2,r0,1 /* never return zero! */ -1: jmp r1 + ld %r2,%r2,4 + ld.d %r2,%r31,0 /* restore r2 and r3 */ + addu %r31,%r31,16 + ld %r1,%r2,0 /* restore r1 */ + bcnd.n ne0,%r3,1f + or %r2,%r3,%r0 + or %r2,%r0,1 /* never return zero! */ +1: jmp %r1 -2: subu r31,r31,16 /* get a temporary stack */ - st r1,r31,0 /* save r1 on stack (return address) */ +2: subu %r31,%r31,16 /* get a temporary stack */ + st %r1,%r31,0 /* save r1 on stack (return address) */ bsr _C_LABEL(longjmperror) bsr _C_LABEL(abort) /* NO RETURN */ - ld r1,r31,0 /* restore r1 from stack */ - jmp.n r1 /* this should not happen but we are prepared */ - addu r31,r31,16 /* restore the stack */ + ld %r1,%r31,0 /* restore r1 from stack */ + jmp.n %r1 /* this should not happen but we are prepared */ + addu %r31,%r31,16 /* restore the stack */ diff --git a/lib/libc/arch/m88k/gen/sigsetjmp.S b/lib/libc/arch/m88k/gen/sigsetjmp.S index 019e149a905..d9bdf79324c 100644 --- a/lib/libc/arch/m88k/gen/sigsetjmp.S +++ b/lib/libc/arch/m88k/gen/sigsetjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsetjmp.S,v 1.11 2012/08/12 17:14:39 miod Exp $ */ +/* $OpenBSD: sigsetjmp.S,v 1.12 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 2002 Steve Murphree, Jr. * All rights reserved. @@ -56,87 +56,87 @@ int sigsetjmp(sigjmp_buf env, int savemask); */ ENTRY(sigsetjmp) - st r1, r2,0 /* save registers to the environment buffer */ - st r14,r2,8 - st r15,r2,12 - st r16,r2,16 - st r17,r2,20 - st r18,r2,24 - st r19,r2,28 - st r20,r2,32 - st r21,r2,36 - st r22,r2,40 - st r23,r2,44 - st r24,r2,48 - st r25,r2,52 - st r26,r2,56 - st r27,r2,60 - st r28,r2,64 - st r29,r2,68 - st r30,r2,72 - st r31,r2,76 - or r4,r0,SIGSETJMP_SIG /* r4 now contains setjmp type */ - st r4,r2,80 /* setjmp type to _setjmp */ - bcnd.n eq0,r3,1f /* skip signal stuff if savemask == 0 */ - st r3,r2,84 /* save `savemask' value */ - or r14,r2,0 /* store address of env in r14 */ + st %r1, %r2,0 /* save registers to the environment buffer */ + st %r14,%r2,8 + st %r15,%r2,12 + st %r16,%r2,16 + st %r17,%r2,20 + st %r18,%r2,24 + st %r19,%r2,28 + st %r20,%r2,32 + st %r21,%r2,36 + st %r22,%r2,40 + st %r23,%r2,44 + st %r24,%r2,48 + st %r25,%r2,52 + st %r26,%r2,56 + st %r27,%r2,60 + st %r28,%r2,64 + st %r29,%r2,68 + st %r30,%r2,72 + st %r31,%r2,76 + or %r4,%r0,SIGSETJMP_SIG /* r4 now contains setjmp type */ + st %r4,%r2,80 /* setjmp type to _setjmp */ + bcnd.n eq0,%r3,1f /* skip signal stuff if savemask == 0 */ + st %r3,%r2,84 /* save `savemask' value */ + or %r14,%r2,0 /* store address of env in r14 */ bsr.n _C_LABEL(sigblock) /* r2 = sigblock(0) */ - or r2,r0,r0 - st r2,r14,4 /* save signal set in offset 4 of env */ - ld r1,r14,0 - ld r14,r14,8 + or %r2,%r0,%r0 + st %r2,%r14,4 /* save signal set in offset 4 of env */ + ld %r1,%r14,0 + ld %r14,%r14,8 1: - jmp.n r1 /* return 0 */ - or r2,r0,0 + jmp.n %r1 /* return 0 */ + or %r2,%r0,0 /* void siglongjmp(sigjmp_buf env, int val); */ ENTRY(siglongjmp) - bcnd eq0,r2,2f /* check for bad environment buffer address. */ - ld r4,r2,80 /* check setjmp type. */ - cmp r4,r4,SIGSETJMP_SIG /* should be SIGSETJMP_SIG */ - bb1 ne,r4,2f /* if != SIGSETJMP_SIG, abort. */ + bcnd eq0,%r2,2f /* check for bad environment buffer address. */ + ld %r4,%r2,80 /* check setjmp type. */ + cmp %r4,%r4,SIGSETJMP_SIG /* should be SIGSETJMP_SIG */ + bb1 ne,%r4,2f /* if != SIGSETJMP_SIG, abort. */ - ld r14,r2,8 /* restore registers from the environment buffer */ - ld r15,r2,12 - ld r16,r2,16 - ld r17,r2,20 - ld r18,r2,24 - ld r19,r2,28 - ld r20,r2,32 - ld r21,r2,36 - ld r22,r2,40 - ld r23,r2,44 - ld r24,r2,48 - ld r25,r2,52 - ld r26,r2,56 - ld r27,r2,60 - ld r28,r2,64 - ld r29,r2,68 - ld r30,r2,72 - ld r4,r2,84 /* get `savemask' value */ - bcnd.n eq0,r4,1f - ld r31,r2,76 + ld %r14,%r2,8 /* restore registers from the environment buffer */ + ld %r15,%r2,12 + ld %r16,%r2,16 + ld %r17,%r2,20 + ld %r18,%r2,24 + ld %r19,%r2,28 + ld %r20,%r2,32 + ld %r21,%r2,36 + ld %r22,%r2,40 + ld %r23,%r2,44 + ld %r24,%r2,48 + ld %r25,%r2,52 + ld %r26,%r2,56 + ld %r27,%r2,60 + ld %r28,%r2,64 + ld %r29,%r2,68 + ld %r30,%r2,72 + ld %r4,%r2,84 /* get `savemask' value */ + bcnd.n eq0,%r4,1f + ld %r31,%r2,76 - subu r31,r31,16 /* get a temporary stack */ - st.d r2,r31,0 /* save r2 and r3 on stack (env + return val) */ + subu %r31,%r31,16 /* get a temporary stack */ + st.d %r2,%r31,0 /* save r2 and r3 on stack (env + return val) */ bsr.n _C_LABEL(sigsetmask) /* restore the signal set */ - ld r2,r2,4 - ld.d r2,r31,0 /* restore r2 and r3 from stack */ - addu r31,r31,16 + ld %r2,%r2,4 + ld.d %r2,%r31,0 /* restore r2 and r3 from stack */ + addu %r31,%r31,16 1: - bcnd.n ne0,r3,1f - ld r1,r2,0 /* restore r1 */ - or r3,r0,1 /* never return zero! */ + bcnd.n ne0,%r3,1f + ld %r1,%r2,0 /* restore r1 */ + or %r3,%r0,1 /* never return zero! */ 1: - jmp.n r1 - or r2,r3,r0 + jmp.n %r1 + or %r2,%r3,%r0 -2: subu r31,r31,16 /* get a temporary stack */ - st r1,r31,0 /* save r1 on stack (return address) */ +2: subu %r31,%r31,16 /* get a temporary stack */ + st %r1,%r31,0 /* save r1 on stack (return address) */ bsr _C_LABEL(longjmperror) bsr _C_LABEL(abort) /* NO RETURN */ - ld r1,r31,0 /* restore r1 from stack */ - jmp.n r1 /* this should not happen but we are prepared */ - addu r31,r31,16 /* restore the stack */ + ld %r1,%r31,0 /* restore r1 from stack */ + jmp.n %r1 /* this should not happen but we are prepared */ + addu %r31,%r31,16 /* restore the stack */ diff --git a/lib/libc/arch/m88k/net/htonl.S b/lib/libc/arch/m88k/net/htonl.S index 75673242c25..a2d2d68f2b2 100644 --- a/lib/libc/arch/m88k/net/htonl.S +++ b/lib/libc/arch/m88k/net/htonl.S @@ -1,4 +1,4 @@ -/* $OpenBSD: htonl.S,v 1.5 2009/10/28 06:49:55 deraadt Exp $ */ +/* $OpenBSD: htonl.S,v 1.6 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,4 +38,4 @@ /* netorder = htonl(hostorder) */ ENTRY(htonl) - jmp r1 + jmp %r1 diff --git a/lib/libc/arch/m88k/net/htons.S b/lib/libc/arch/m88k/net/htons.S index 4a7b73d3c87..065f9023f29 100644 --- a/lib/libc/arch/m88k/net/htons.S +++ b/lib/libc/arch/m88k/net/htons.S @@ -1,4 +1,4 @@ -/* $OpenBSD: htons.S,v 1.5 2009/10/28 06:49:55 deraadt Exp $ */ +/* $OpenBSD: htons.S,v 1.6 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,5 +38,5 @@ /* hostorder = htons(netorder) */ ENTRY(htons) - jmp.n r1 - clr r2,r2,16<16> /* clear the top 16 bits */ + jmp.n %r1 + clr %r2,%r2,16<16> /* clear the top 16 bits */ diff --git a/lib/libc/arch/m88k/net/ntohl.S b/lib/libc/arch/m88k/net/ntohl.S index fdce914ea88..565f4b2742a 100644 --- a/lib/libc/arch/m88k/net/ntohl.S +++ b/lib/libc/arch/m88k/net/ntohl.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ntohl.S,v 1.5 2009/10/28 06:49:55 deraadt Exp $ */ +/* $OpenBSD: ntohl.S,v 1.6 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,4 +38,4 @@ /* hostorder = ntohl(netorder) */ ENTRY(ntohl) - jmp r1 + jmp %r1 diff --git a/lib/libc/arch/m88k/net/ntohs.S b/lib/libc/arch/m88k/net/ntohs.S index f95ed704cc3..ba86f9ce228 100644 --- a/lib/libc/arch/m88k/net/ntohs.S +++ b/lib/libc/arch/m88k/net/ntohs.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ntohs.S,v 1.5 2009/10/28 06:49:55 deraadt Exp $ */ +/* $OpenBSD: ntohs.S,v 1.6 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,5 +38,5 @@ /* hostorder = ntohs(netorder) */ ENTRY(ntohs) - jmp.n r1 - clr r2,r2,16<16> /* clear the top 16 bits */ + jmp.n %r1 + clr %r2,%r2,16<16> /* clear the top 16 bits */ diff --git a/lib/libc/arch/m88k/sys/Ovfork.S b/lib/libc/arch/m88k/sys/Ovfork.S index d6e907e33b9..c51f626640f 100644 --- a/lib/libc/arch/m88k/sys/Ovfork.S +++ b/lib/libc/arch/m88k/sys/Ovfork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: Ovfork.S,v 1.7 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: Ovfork.S,v 1.8 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,8 +38,8 @@ /* r2 = pid. r3 = 0 in parent, 1 in child */ SYSCALL(vfork) - bcnd eq0,r3,parent - or r2,r0,0 - or r3,r0,0 + bcnd eq0,%r3,parent + or %r2,%r0,0 + or %r3,%r0,0 parent: - jmp r1 /* pid = vfork() */ + jmp %r1 /* pid = vfork() */ diff --git a/lib/libc/arch/m88k/sys/brk.S b/lib/libc/arch/m88k/sys/brk.S index dc4d353f2c8..59c55b18b88 100644 --- a/lib/libc/arch/m88k/sys/brk.S +++ b/lib/libc/arch/m88k/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.8 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: brk.S,v 1.9 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -40,22 +40,22 @@ .data .align 8 -ASGLOBAL(minbrk) +ASGLOBAL(__minbrk) .long _end ENTRY(brk) - or.u r5,r0,hi16(minbrk) - ld r5,r5,lo16(minbrk) - cmp r3,r5,r2 - bb1 ls,r3,1f /* r2 should be > minbrk; can't go below end */ - or r2,r5,0 /* otherwise, set r2 to minbrk */ + or.u %r5,%r0,%hi16(__minbrk) + ld %r5,%r5,%lo16(__minbrk) + cmp %r3,%r5,%r2 + bb1 ls,%r3,1f /* r2 should be > minbrk; can't go below end */ + or %r2,%r5,0 /* otherwise, set r2 to minbrk */ 1: - or r4,r2,0 - or r13,r0,__SYSCALLNAME(SYS_,break) - tb0 0,r0,128 + or %r4,%r2,0 + or %r13,%r0,__SYSCALLNAME(SYS_,break) + tb0 0,%r0,128 br __cerror - or.u r5,r0,hi16(__curbrk) - st r4,r5,lo16(__curbrk) - or r2,r0,0 /* clear r2/r3 to indicate success */ - jmp.n r1 - or r3,r0,0 + or.u %r5,%r0,%hi16(__curbrk) + st %r4,%r5,%lo16(__curbrk) + or %r2,%r0,0 /* clear r2/r3 to indicate success */ + jmp.n %r1 + or %r3,%r0,0 diff --git a/lib/libc/arch/m88k/sys/cerror.S b/lib/libc/arch/m88k/sys/cerror.S index 4594b4ed259..eefe97e5100 100644 --- a/lib/libc/arch/m88k/sys/cerror.S +++ b/lib/libc/arch/m88k/sys/cerror.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cerror.S,v 1.9 2011/04/09 15:45:17 deraadt Exp $ */ +/* $OpenBSD: cerror.S,v 1.10 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,12 +35,12 @@ #include "SYS.h" -WEAK_ALIAS(_cerror,__cerror) +WEAK_ALIAS(__cerror,___cerror) - .globl _errno + .globl _C_LABEL(errno) ENTRY(__cerror) - or.u r4,r0,hi16(_errno) - st r2,r4,lo16(_errno) - sub r2,r0,0x1 - jmp.n r1 - sub r3,r0,0x1 + or.u %r4,%r0,%hi16(_C_LABEL(errno)) + st %r2,%r4,%lo16(_C_LABEL(errno)) + sub %r2,%r0,0x1 + jmp.n %r1 + sub %r3,%r0,0x1 diff --git a/lib/libc/arch/m88k/sys/exect.S b/lib/libc/arch/m88k/sys/exect.S index 5824bb4bb15..9c1ae2310e6 100644 --- a/lib/libc/arch/m88k/sys/exect.S +++ b/lib/libc/arch/m88k/sys/exect.S @@ -1,4 +1,4 @@ -/* $OpenBSD: exect.S,v 1.6 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: exect.S,v 1.7 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,6 +36,6 @@ #include "SYS.h" ENTRY(exect) - or r13,r0,SYS_execve - tb0 0,r0,128 /* exect(file, argv, env) */ + or %r13,%r0,SYS_execve + tb0 0,%r0,128 /* exect(file, argv, env) */ br __cerror diff --git a/lib/libc/arch/m88k/sys/fork.S b/lib/libc/arch/m88k/sys/fork.S index 201ac4f0bd8..79252bae23a 100644 --- a/lib/libc/arch/m88k/sys/fork.S +++ b/lib/libc/arch/m88k/sys/fork.S @@ -1,4 +1,4 @@ -/* $OpenBSD: fork.S,v 1.5 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: fork.S,v 1.6 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -38,8 +38,8 @@ /* r2 = pid. r3 = 0 in parent, 1 in child */ SYSCALL(fork) - bcnd eq0,r3,parent - or r2,r0,0 - or r3,r0,0 + bcnd eq0,%r3,parent + or %r2,%r0,0 + or %r3,%r0,0 parent: - jmp r1 /* pid = fork() */ + jmp %r1 /* pid = fork() */ diff --git a/lib/libc/arch/m88k/sys/sbrk.S b/lib/libc/arch/m88k/sys/sbrk.S index 180123f0172..2dd6fd9cb27 100644 --- a/lib/libc/arch/m88k/sys/sbrk.S +++ b/lib/libc/arch/m88k/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.8 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: sbrk.S,v 1.9 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -45,18 +45,18 @@ __curbrk: .text ENTRY(sbrk) - or.u r5,r0,hi16(__curbrk) - ld r5,r5,lo16(__curbrk) - add r2,r2,r5 - or r4,r2,0 - or r13,r0,SYS_break - tb0 0,r0,128 + or.u %r5,%r0,%hi16(__curbrk) + ld %r5,%r5,%lo16(__curbrk) + add %r2,%r2,%r5 + or %r4,%r2,0 + or %r13,%r0,SYS_break + tb0 0,%r0,128 br __cerror /* Save old __curbrk */ - or.u r5,r0,hi16(__curbrk) - ld r2,r5,lo16(__curbrk) + or.u %r5,%r0,%hi16(__curbrk) + ld %r2,%r5,%lo16(__curbrk) /* Update __curbrk */ - st r4,r5,lo16(__curbrk) + st %r4,%r5,%lo16(__curbrk) /* and return old __curbrk */ - jmp.n r1 - or r3,r0,0 + jmp.n %r1 + or %r3,%r0,0 diff --git a/lib/libc/arch/m88k/sys/sigpending.S b/lib/libc/arch/m88k/sys/sigpending.S index e3fb1f94397..e2746e39ada 100644 --- a/lib/libc/arch/m88k/sys/sigpending.S +++ b/lib/libc/arch/m88k/sys/sigpending.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigpending.S,v 1.6 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: sigpending.S,v 1.7 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,10 +36,10 @@ #include "SYS.h" ENTRY(sigpending) - or r4,r2,0 /* save r2 */ - or r13,r0,SYS_sigpending - tb0 0,r0,128 + or %r4,%r2,0 /* save r2 */ + or %r13,%r0,SYS_sigpending + tb0 0,%r0,128 br __cerror - st r2,r4,0 - jmp.n r1 - or r2,r0,0 + st %r2,%r4,0 + jmp.n %r1 + or %r2,%r0,0 diff --git a/lib/libc/arch/m88k/sys/sigprocmask.S b/lib/libc/arch/m88k/sys/sigprocmask.S index a077ba9e6b9..136bdd505bc 100644 --- a/lib/libc/arch/m88k/sys/sigprocmask.S +++ b/lib/libc/arch/m88k/sys/sigprocmask.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigprocmask.S,v 1.7 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: sigprocmask.S,v 1.8 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,17 +36,17 @@ #include "SYS.h" SYSENTRY(sigprocmask) - bcnd ne0,r3,1f /* if new sigset pointer is null */ - or r2,r0,1 /* how = SIG_BLOCK and do it */ + bcnd ne0,%r3,1f /* if new sigset pointer is null */ + or %r2,%r0,1 /* how = SIG_BLOCK and do it */ br 2f 1: - ld r3,r3,0 /* else load set from *set and do it */ + ld %r3,%r3,0 /* else load set from *set and do it */ 2: - or r13,r0,SYS_sigprocmask - tb0 0,r0,128 + or %r13,%r0,SYS_sigprocmask + tb0 0,%r0,128 br __cerror - bcnd eq0,r4,3f /* if old mask not requested, done */ - st r2,r4,0 /* otherwise, set it */ + bcnd eq0,%r4,3f /* if old mask not requested, done */ + st %r2,%r4,0 /* otherwise, set it */ 3: - jmp.n r1 - or r2,r0,0 + jmp.n %r1 + or %r2,%r0,0 diff --git a/lib/libc/arch/m88k/sys/sigreturn.S b/lib/libc/arch/m88k/sys/sigreturn.S index 5886102d4d9..9919b5221fe 100644 --- a/lib/libc/arch/m88k/sys/sigreturn.S +++ b/lib/libc/arch/m88k/sys/sigreturn.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigreturn.S,v 1.7 2012/12/26 19:22:48 miod Exp $ */ +/* $OpenBSD: sigreturn.S,v 1.8 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -40,4 +40,4 @@ */ SYSCALL(sigreturn) - jmp r1 + jmp %r1 diff --git a/lib/libc/arch/m88k/sys/sigsuspend.S b/lib/libc/arch/m88k/sys/sigsuspend.S index 0b0054fdb17..22ba6ef9d43 100644 --- a/lib/libc/arch/m88k/sys/sigsuspend.S +++ b/lib/libc/arch/m88k/sys/sigsuspend.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsuspend.S,v 1.8 2005/08/07 16:40:15 espie Exp $ */ +/* $OpenBSD: sigsuspend.S,v 1.9 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -43,9 +43,9 @@ */ SYSENTRY(sigsuspend) - ld r2,r2,0 /* dereference the pointer mask */ - or r13,r0,SYS_sigsuspend - tb0 0,r0,128 + ld %r2,%r2,0 /* dereference the pointer mask */ + or %r13,%r0,SYS_sigsuspend + tb0 0,%r0,128 br __cerror - jmp.n r1 - or r2,r0,0 + jmp.n %r1 + or %r2,%r0,0 diff --git a/lib/libc/arch/m88k/sys/syscall.S b/lib/libc/arch/m88k/sys/syscall.S index 477ba89cb01..f2da5052cb8 100644 --- a/lib/libc/arch/m88k/sys/syscall.S +++ b/lib/libc/arch/m88k/sys/syscall.S @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.S,v 1.10 2007/10/24 20:19:11 miod Exp $ */ +/* $OpenBSD: syscall.S,v 1.11 2013/01/05 11:20:55 miod Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -36,7 +36,7 @@ #include "SYS.h" SYSENTRY(syscall) - or r13,r0,0 - tb0 0,r0,128 + or %r13,%r0,0 + tb0 0,%r0,128 br __cerror - jmp r1 + jmp %r1 diff --git a/lib/libc/arch/m88k/sys/tfork_thread.S b/lib/libc/arch/m88k/sys/tfork_thread.S index df901bba981..c59175da276 100644 --- a/lib/libc/arch/m88k/sys/tfork_thread.S +++ b/lib/libc/arch/m88k/sys/tfork_thread.S @@ -1,4 +1,4 @@ -/* $OpenBSD: tfork_thread.S,v 1.2 2012/06/21 00:56:59 guenther Exp $ */ +/* $OpenBSD: tfork_thread.S,v 1.3 2013/01/05 11:20:55 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -31,23 +31,23 @@ * int __tfork_thread(const struct __tfork *param, size_t psize, void (*func)(void *), void *arg); */ ENTRY(__tfork_thread) - or r13, r0, __SYSCALLNAME(SYS_,__tfork) - tb0 0, r0, 128 /* corrupts r2 and r3 in the child */ + or %r13, %r0, __SYSCALLNAME(SYS_,__tfork) + tb0 0, %r0, 128 /* corrupts r2 and r3 in the child */ br __cerror - bcnd eq0, r2, 1f + bcnd eq0, %r2, 1f /* * In parent process: just return. */ - jmp r1 + jmp %r1 1: /* * In child process: invoke function, then exit. */ - jsr.n r4 /* func */ - or r2, r5, r0 /* arg */ + jsr.n %r4 /* func */ + or %r2, %r5, %r0 /* arg */ - or r13, r0, __SYSCALLNAME(SYS_,__threxit) - tb0 0, r0, 128 + or %r13, %r0, __SYSCALLNAME(SYS_,__threxit) + tb0 0, %r0, 128 -- cgit v1.2.3