diff options
-rw-r--r-- | sys/arch/luna88k/luna88k/locore.S | 24 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m88100_fp.S | 53 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/m88110_fp.S | 38 | ||||
-rw-r--r-- | sys/arch/m88k/m88k/process.S | 28 | ||||
-rw-r--r-- | sys/arch/mvme88k/mvme88k/locore.S | 24 |
5 files changed, 69 insertions, 98 deletions
diff --git a/sys/arch/luna88k/luna88k/locore.S b/sys/arch/luna88k/luna88k/locore.S index 084e2a0d8bd..be8404e58a2 100644 --- a/sys/arch/luna88k/luna88k/locore.S +++ b/sys/arch/luna88k/luna88k/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.4 2004/07/02 14:40:20 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.5 2004/08/09 20:52:07 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -312,9 +312,7 @@ ASLOCAL(master_start) st r0, r2, lo16(0x41000000) /* still on int stack */ - bsr.n _C_LABEL(luna88k_bootstrap) - subu r31, r31, 40 - addu r31, r31, 40 + bsr _C_LABEL(luna88k_bootstrap) /* * we now know our cpu number, so we @@ -338,10 +336,8 @@ ASLOCAL(master_start) /* make the call: main() */ or.u r2, r0, hi16(UADDR) or r2, r2,lo16(UADDR) - addu r2, r2, USIZE - 8 - subu r31, r31, 40 - bsr _C_LABEL(main) - addu r31, r31, 40 + bsr.n _C_LABEL(main) + addu r2, r2, USIZE - 8 bsr _C_LABEL(panic) /* @@ -358,10 +354,9 @@ ASLOCAL(slave_start) /* r31 <-- slavestack */ or.u r31, r0, hi16(_ASM_LABEL(slavestack_end)) or r31, r31, lo16(_ASM_LABEL(slavestack_end)) - clr r31, r31, 3<0> /* round down to 8-byte boundary */ bsr.n _C_LABEL(slave_pre_main) /* set cpu number */ - subu r31, r31, 48 /* allocate frame */ + clr r31, r31, 3<0> /* round down to 8-byte boundary */ bsr _C_LABEL(get_slave_stack) addu r31, r2, INTSTACK_SIZE @@ -375,8 +370,7 @@ ASLOCAL(slave_start) or.u r10, r0, hi16(_ASM_LABEL(inter_processor_lock)) st r0, r10, lo16(_ASM_LABEL(inter_processor_lock)) - br.n _C_LABEL(slave_main) /* does not return */ - subu r31, r31, 40 /* allocate frame */ + br _C_LABEL(slave_main) /* does not return */ GLOBAL(spin_cpu) or.u r3, r0, hi16(_C_LABEL(start_text)) @@ -494,14 +488,12 @@ GLOBAL(curpcb) * user stack in exec. */ GLOBAL(sigcode) /* r31 points to sigframe */ - ld r2, r31, 0 /* signo */ ld r3, r31, 4 /* siginfo_t* */ ld r4, r31, 8 /* sigcontext* */ ld r5, r31, 12 /* handler */ jsr.n r5 - subu r31, r31, 40 /* give some stack space */ - addu r31, r31, 40 /* restore old sp value */ - ld r2, r31, 8 /* sigcontext* */ + ld r2, r31, 0 /* signo */ + ld r2, r31, 8 /* sigcontext* */ or r13, r0, SYS_sigreturn tb0 0, r0, 128 /* syscall trap, calling sigreturn */ NOP | failure return diff --git a/sys/arch/m88k/m88k/m88100_fp.S b/sys/arch/m88k/m88k/m88100_fp.S index 4a411105464..4e52dc3e237 100644 --- a/sys/arch/m88k/m88k/m88100_fp.S +++ b/sys/arch/m88k/m88k/m88100_fp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: m88100_fp.S,v 1.3 2004/08/09 20:18:14 miod Exp $ */ +/* $OpenBSD: m88100_fp.S,v 1.4 2004/08/09 20:52:11 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1991 Carnegie Mellon University @@ -73,9 +73,9 @@ ASENTRY(m88100_Xfp_precise) or r29, r3, r0 /* r29 is now the E.F. */ - subu r31, r31, 40 - st r1, r31, 32 - st r29, r31, 36 + subu r31, r31, 16 + st r1, r31, 8 + st r29, r31, 12 ld r2, r29, EF_FPSR * 4 ld r3, r29, EF_FPCR * 4 @@ -118,16 +118,13 @@ ASENTRY(m88100_Xfp_precise) or.u r4, r4, 0xffff ASLOCAL(FPuimp) - subu r31,r31,40 /* allocate stack */ - st r1,r31,36 /* save return address */ -#if 0 - st r3,r31,32 /* save exception frame */ -#endif + subu r31,r31,16 /* allocate stack */ + st r1,r31,0 /* save return address */ or r2,r0,T_FPEPFLT /* load trap type */ - or r3, r29, r0 - bsr _C_LABEL(m88100_trap) - ld r1,r31,36 /* recover return address */ - addu r31,r31,40 /* deallocate stack */ + bsr.n _C_LABEL(m88100_trap) + or r3, r29, r0 + ld r1,r31,0 /* recover return address */ + addu r31,r31,16 /* deallocate stack */ jmp r1 /* @@ -148,9 +145,9 @@ ASLOCAL(wrapup) set r10, r10, 1<PSR_INTERRUPT_DISABLE_BIT> stcr r10, cr1 - ld r1, r31, 32 - ld r29, r31, 36 - addu r31, r31, 40 + ld r1, r31, 8 + ld r29, r31, 12 + addu r31, r31, 16 fstcr r2, FPSR /* write revised value of FPSR */ fstcr r3, FPCR /* write revised value of FPCR */ @@ -166,8 +163,8 @@ ASLOCAL(wrapup) /* unspecified register */ clr r2, r2, 27<5> /* perform equivalent of mod 32 */ ASLOCAL(writesingle) - st r6, r3 [r2] /* write low word into memory */ - jmp r1 + jmp.n r1 + st r6, r3 [r2] /* write low word into memory */ /* * Check if the numerator is zero. If the numerator is zero, then handle @@ -175,8 +172,8 @@ ASLOCAL(writesingle) */ ASLOCAL(FPdivzero) - st r1,r31,0 /* save return address */ - bb1 s1size,r9,1f /* branch if numerator double */ + bb1.n s1size,r9,1f /* branch if numerator double */ + st r1,r31,0 /* save return address */ /* single number */ clr r10,r5,1<sign> /* clear sign bit */ extu r11,r6,3<29> /* grab upper bits of lower word */ @@ -2303,9 +2300,9 @@ operation: ASENTRY(Xfp_imprecise) /* input: r3 is the exception frame */ or r29, r3, r0 /* r29 is now the E.F. */ - subu r31, r31, 40 - st r1, r31, 32 - st r29, r31, 36 + subu r31, r31, 16 + st r1, r31, 4 + st r29, r31, 8 ld r2 , r29, EF_FPSR * 4 ld r3 , r29, EF_FPCR * 4 @@ -2337,9 +2334,9 @@ fpui_wrapup: #endif set r4, r4, 1<PSR_INTERRUPT_DISABLE_BIT> stcr r4, cr1 - ld r1, r31, 32 - ld r29,r31, 36 - addu r31, r31, 40 + ld r1, r31, 4 + ld r29,r31, 8 + addu r31, r31, 16 fstcr r2, FPSR /* write revised value of FPSR */ fstcr r3, FPCR /* write revised value of FPCR */ @@ -2352,5 +2349,5 @@ fpui_wrapup: addu r2, r2, 1 clr r2, r2, 27<5> Iwritesingle: - st r11, r3 [r2] - jmp r1 + jmp.n r1 + st r11, r3 [r2] diff --git a/sys/arch/m88k/m88k/m88110_fp.S b/sys/arch/m88k/m88k/m88110_fp.S index 254a14894aa..9b296235ea1 100644 --- a/sys/arch/m88k/m88k/m88110_fp.S +++ b/sys/arch/m88k/m88k/m88110_fp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: m88110_fp.S,v 1.1 2004/04/29 14:33:27 miod Exp $ */ +/* $OpenBSD: m88110_fp.S,v 1.2 2004/08/09 20:52:11 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * All rights reserved. @@ -54,9 +54,9 @@ ASENTRY(m88110_Xfp_precise) or r29, r3, r0 /* r29 is now the E.F. */ - subu r31, r31, 40 - st r1, r31, 32 - st r29, r31, 36 + subu r31, r31, 16 + st r1, r31, 0 + st r29, r31, 4 ld r2, r29, EF_FPSR * 4 ld r3, r29, EF_FPCR * 4 @@ -78,26 +78,26 @@ ASENTRY(m88110_Xfp_precise) or.u r4, r4, 0xffff ASLOCAL(m88110_FPuimp) - subu r31,r31,40 /* allocate stack */ - st r1,r31,36 /* save return address */ - st r3,r31,32 /* save exception frame */ + subu r31,r31,16 /* allocate stack */ + st r1,r31,4 /* save return address */ + st r3,r31,0 /* save exception frame */ or r2,r0,T_FPEPFLT /* load trap type */ - or r3, r29, r0 - bsr _C_LABEL(m88110_trap) /* trap */ - ld r1,r31,36 /* recover return address */ - addu r31,r31,40 /* deallocate stack */ - jmp r1 + bsr.n _C_LABEL(m88110_trap) /* trap */ + or r3, r29, r0 + ld r1,r31,4 /* recover return address */ + jmp.n r1 + addu r31,r31,16 /* deallocate stack */ ASLOCAL(m88110_FPpriviol) - subu r31,r31,40 /* allocate stack */ - st r1,r31,36 /* save return address */ - st r3,r31,32 /* save exception frame */ + subu r31,r31,16 /* allocate stack */ + st r1,r31,4 /* save return address */ + st r3,r31,0 /* save exception frame */ or r2,r0,T_PRIVINFLT /* load trap type */ - or r3, r29, r0 - bsr _C_LABEL(m88110_trap) /* trap */ - ld r1,r31,36 /* recover return address */ + bsr.n _C_LABEL(m88110_trap) /* trap */ + or r3, r29, r0 + ld r1,r31,4 /* recover return address */ jmp.n r1 - addu r31,r31,40 /* deallocate stack */ + addu r31,r31,16 /* deallocate stack */ ENTRY(set_tcfp) or.u r2, r0, hi16(0x200000) diff --git a/sys/arch/m88k/m88k/process.S b/sys/arch/m88k/m88k/process.S index 3968ad74663..93ce7611b78 100644 --- a/sys/arch/m88k/m88k/process.S +++ b/sys/arch/m88k/m88k/process.S @@ -1,4 +1,4 @@ -/* $OpenBSD: process.S,v 1.6 2004/08/02 17:30:08 miod Exp $ */ +/* $OpenBSD: process.S,v 1.7 2004/08/09 20:52:11 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -80,13 +80,11 @@ ENTRY(switch_exit) addu r31, r30, USIZE /* now on idle_u stack */ or.u r10, r0, hi16(_C_LABEL(curpcb)) st r30, r10,lo16(_C_LABEL(curpcb)) /* curpcb = &idle_u */ - or.u r10, r0, hi16(_C_LABEL(curproc)) - st r0, r10, lo16(_C_LABEL(curproc)) /* curproc = NULL */ /* Schedule the vmspace and stack to be freed. */ + or.u r10, r0, hi16(_C_LABEL(curproc)) bsr.n _C_LABEL(exit2) - subu r31, r31, 48 /* allocate stack */ - addu r31, r31, 48 /* restore stack */ + st r0, r10, lo16(_C_LABEL(curproc)) /* curproc = NULL */ bsr _C_LABEL(cpu_switch) /* goto final switch */ /* @@ -110,9 +108,7 @@ ENTRY(cpu_switch) ld r2, r11, lo16(_C_LABEL(curproc)) bcnd eq0, r2, 1f - bsr.n _C_LABEL(pmap_deactivate) - subu r31, r31,48 - addu r31, r31,48 + bsr _C_LABEL(pmap_deactivate) or.u r11, r0, hi16(_C_LABEL(curproc)) 1: @@ -225,19 +221,15 @@ ASLOCAL(Ldoneloop) st r3, r10, lo16(_C_LABEL(curpcb)) /* curpcb = p->p_addr */ /* pmap_activate() the process' pmap */ - or r2, r0, r9 /* r2 = p */ or r14, r0, r9 /* save p in r14 */ bsr.n _C_LABEL(pmap_activate) - subu r31, r31,48 - addu r31, r31,48 + or r2, r0, r9 or r9, r0, r14 /* restore p saved in r14 */ or.u r31, r0, hi16(_ASM_LABEL(intstack_end)) or r31,r31, lo16(_ASM_LABEL(intstack_end)) - subu r31, r31,48 bsr.n _C_LABEL(load_u_area) or r2, r0, r9 - addu r31, r31,48 or.u r10, r0, hi16(_C_LABEL(curpcb)) ld r10, r10, lo16(_C_LABEL(curpcb)) @@ -265,10 +257,8 @@ ASLOCAL(Ldoneloop) ld r28,r10, PCB_R28 ld r29,r10, PCB_R29 or r14,r10, r0 /* preserve curpcb in a register... */ - subu r31,r31,32 bsr.n _C_LABEL(setipl) ld r2, r10, PCB_IPL /* restore interrupt mask */ - addu r31,r31,32 ld r1, r14, PCB_PC ld r30,r14, PCB_R30 /* restore frame pointer & stack */ ld r31,r14, PCB_SP @@ -310,13 +300,13 @@ ASLOCAL(__savectx) * We need to save r1 on the stack because we don't know if we were * called as savectx or __savectx. */ - subu r31, r31, 40 /* allocate stack for r1 and args */ - st r1, r31, 32 + subu r31, r31, 16 /* allocate stack for r1 and args */ + st r1, r31, 0 bsr.n _C_LABEL(getipl) /* get the current interrupt mask */ or r14, r0, r2 st r2, r14, PCB_IPL /* save interrupt mask */ - ld r1, r31, 32 /* recover return address */ - addu r31, r31, 40 /* put stack pointer back */ + ld r1, r31, 0 /* recover return address */ + addu r31, r31, 16 /* put stack pointer back */ /* * Save FP state. diff --git a/sys/arch/mvme88k/mvme88k/locore.S b/sys/arch/mvme88k/mvme88k/locore.S index 0a5ee7d9bb7..3c5a05886f9 100644 --- a/sys/arch/mvme88k/mvme88k/locore.S +++ b/sys/arch/mvme88k/mvme88k/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.36 2004/07/02 14:40:22 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.37 2004/08/09 20:52:11 miod Exp $ */ /* * Copyright (c) 1998 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -339,9 +339,7 @@ ASLOCAL(master_start) ldcr r2, VBR /* still on int stack */ - bsr.n _C_LABEL(mvme_bootstrap) - subu r31, r31, 40 - addu r31, r31, 40 + bsr _C_LABEL(mvme_bootstrap) /* * we now know our cpu number, so we @@ -365,10 +363,8 @@ ASLOCAL(master_start) /* make the call: main() */ or.u r2, r0, hi16(UADDR) or r2, r2,lo16(UADDR) - addu r2, r2, USIZE - 8 - subu r31, r31, 40 - bsr _C_LABEL(main) - addu r31, r31, 40 + bsr.n _C_LABEL(main) + addu r2, r2, USIZE - 8 bsr _C_LABEL(panic) /* @@ -385,10 +381,9 @@ ASLOCAL(slave_start) /* r31 <-- slavestack */ or.u r31, r0, hi16(_ASM_LABEL(slavestack_end)) or r31, r31, lo16(_ASM_LABEL(slavestack_end)) - clr r31, r31, 3<0> /* round down to 8-byte boundary */ bsr.n _C_LABEL(slave_pre_main) /* set cpu number */ - subu r31, r31, 48 /* allocate frame */ + clr r31, r31, 3<0> /* round down to 8-byte boundary */ bsr _C_LABEL(get_slave_stack) addu r31, r2, INTSTACK_SIZE @@ -402,8 +397,7 @@ ASLOCAL(slave_start) or.u r10, r0, hi16(_ASM_LABEL(inter_processor_lock)) st r0, r10, lo16(_ASM_LABEL(inter_processor_lock)) - br.n _C_LABEL(slave_main) /* does not return */ - subu r31, r31, 40 /* allocate frame */ + br _C_LABEL(slave_main) /* does not return */ GLOBAL(spin_cpu) or.u r3, r0, hi16(_C_LABEL(start_text)) @@ -490,14 +484,12 @@ GLOBAL(curpcb) * user stack in exec. */ GLOBAL(sigcode) /* r31 points to sigframe */ - ld r2, r31, 0 /* signo */ ld r3, r31, 4 /* siginfo_t* */ ld r4, r31, 8 /* sigcontext* */ ld r5, r31, 12 /* handler */ jsr.n r5 - subu r31, r31, 40 /* give some stack space */ - addu r31, r31, 40 /* restore old sp value */ - ld r2, r31, 8 /* sigcontext* */ + ld r2, r31, 0 /* signo */ + ld r2, r31, 8 /* sigcontext* */ or r13, r0, SYS_sigreturn tb0 0, r0, 128 /* syscall trap, calling sigreturn */ NOP | failure return |