Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Convert to traceback-friendly temporary...
details: https://anonhg.NetBSD.org/src/rev/64927c9dea43
branches: trunk
changeset: 473382:64927c9dea43
user: ross <ross%NetBSD.org@localhost>
date: Mon May 31 20:40:23 1999 +0000
description:
Convert to traceback-friendly temporary labels.
diffstat:
sys/arch/alpha/alpha/atomic.s | 56 ++++++++------------
sys/arch/alpha/alpha/debug.s | 16 ++---
sys/arch/alpha/alpha/locore.s | 105 +++++++++++++++++---------------------
sys/arch/alpha/alpha/multiproc.s | 12 ++--
sys/arch/alpha/alpha/transfer.s | 8 +-
5 files changed, 87 insertions(+), 110 deletions(-)
diffs (truncated from 524 to 300 lines):
diff -r 8c26bd0b42c2 -r 64927c9dea43 sys/arch/alpha/alpha/atomic.s
--- a/sys/arch/alpha/alpha/atomic.s Mon May 31 18:54:49 1999 +0000
+++ b/sys/arch/alpha/alpha/atomic.s Mon May 31 20:40:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic.s,v 1.5 1998/09/25 23:59:42 thorpej Exp $ */
+/* $NetBSD: atomic.s,v 1.6 1999/05/31 20:40:23 ross Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-__KERNEL_RCSID(4, "$NetBSD: atomic.s,v 1.5 1998/09/25 23:59:42 thorpej Exp $")
+__KERNEL_RCSID(4, "$NetBSD: atomic.s,v 1.6 1999/05/31 20:40:23 ross Exp $")
/*
* Misc. `atomic' operations.
@@ -62,20 +62,17 @@
*/
.text
LEAF(alpha_atomic_testset_l,2)
-Laatl_loop:
- ldl_l t0, 0(a0)
+1: ldl_l t0, 0(a0)
and t0, a1, t3
- bne t3, Laatl_already /* already set, return(0) */
+ bne t3, 2f /* already set, return(0) */
or t0, a1, v0
stl_c v0, 0(a0)
- beq v0, Laatl_retry
+ beq v0, 3f /* branch-prediction: "not taken" */
mb
- RET /* v0 != 0 */
-Laatl_already:
- mov zero, v0
+ RET /* v0 != 0 */
+2: mov zero, v0
RET
-Laatl_retry:
- br Laatl_loop
+3: br 1b /* forward branch to here */
END(alpha_atomic_testset_l)
/*
@@ -94,15 +91,13 @@
*/
.text
LEAF(alpha_atomic_setbits_q,2)
-Laasq_loop:
- ldq_l t0, 0(a0)
+1: ldq_l t0, 0(a0)
or t0, a1, t0
stq_c t0, 0(a0)
- beq t0, Laasq_retry
+ beq t0, 2f
mb
RET
-Laasq_retry:
- br Laasq_loop
+2: br 1b
END(alpha_atomic_setbits_q)
/*
@@ -122,15 +117,13 @@
.text
LEAF(alpha_atomic_clearbits_q,2)
ornot zero, a1, t1
-Laacq_loop:
- ldq_l t0, 0(a0)
+1: ldq_l t0, 0(a0)
and t0, t1, t0
stq_c t0, 0(a0)
- beq t0, Laacq_retry
+ beq t0, 2f
mb
RET
-Laacq_retry:
- br Laacq_loop
+2: br 1b
END(alpha_atomic_setbits_q)
/*
@@ -149,20 +142,17 @@
*/
.text
LEAF(alpha_atomic_testset_q,2)
-Laatq_loop:
- ldq_l t0, 0(a0)
+1: ldq_l t0, 0(a0)
and t0, a1, t3
- bne t3, Laatq_already /* Already set, return(0) */
+ bne t3, 2f /* Already set, return(0) */
or t0, a1, v0
stq_c v0, 0(a0)
- beq v0, Laatq_retry
+ beq v0, 3f
mb
RET /* v0 != 0 */
-Laatq_already:
- mov zero, v0
+2: mov zero, v0
RET
-Laatq_retry:
- br Laatq_loop
+3: br 1b
END(alpha_atomic_testset_q)
/*
@@ -181,13 +171,11 @@
*/
.text
LEAF(alpha_atomic_loadlatch_q,2)
-Laallq_loop:
- mov a1, t0
+1: mov a1, t0
ldq_l v0, 0(a0)
stq_c t0, 0(a0)
- beq t0, Laallq_retry
+ beq t0, 2f
mb
RET
-Laallq_retry:
- br Laallq_loop
+2: br 1b
END(alpha_atomic_loadlatch_q)
diff -r 8c26bd0b42c2 -r 64927c9dea43 sys/arch/alpha/alpha/debug.s
--- a/sys/arch/alpha/alpha/debug.s Mon May 31 18:54:49 1999 +0000
+++ b/sys/arch/alpha/alpha/debug.s Mon May 31 20:40:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: debug.s,v 1.2 1999/05/31 06:41:39 ross Exp $ */
+/* $NetBSD: debug.s,v 1.3 1999/05/31 20:40:23 ross Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -67,8 +67,8 @@
* a4 frame pointer
*/
NESTED_NOPROFILE(alpha_debug, 5, 32, ra, IM_RA|IM_S0, 0)
- br pv, Ldbg1
-Ldbg1: LDGP(pv)
+ br pv, 1f
+1: LDGP(pv)
lda t0, FRAME_SIZE*8(a4) /* what would sp have been? */
stq t0, FRAME_SP*8(a4) /* belatedly save sp for ddb view */
lda sp, -32(sp) /* set up stack frame */
@@ -89,17 +89,15 @@
*/
lda t0, debug_stack_bottom
cmpule sp, t0, t1 /* sp <= debug_stack_bottom */
- bne t1, Ldbg2 /* yes, switch now */
+ bne t1, 2f /* yes, switch now */
lda t0, debug_stack_top
cmpule t0, sp, t1 /* debug_stack_top <= sp? */
- bne t1, Ldbg3 /* yes, we're on the debug stack */
+ bne t1, 3f /* yes, we're on the debug stack */
-Ldbg2:
- lda sp, debug_stack_top /* sp <- debug_stack_top */
+2: lda sp, debug_stack_top /* sp <- debug_stack_top */
-Ldbg3:
- /* Dispatch to the debugger - arguments are already in place. */
+3: /* Dispatch to the debugger - arguments are already in place. */
CALL(ddb_trap)
/* Debugger return value in v0; switch back to our previous stack. */
diff -r 8c26bd0b42c2 -r 64927c9dea43 sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s Mon May 31 18:54:49 1999 +0000
+++ b/sys/arch/alpha/alpha/locore.s Mon May 31 20:40:23 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.62 1999/04/20 21:11:59 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.63 1999/05/31 20:40:23 ross Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.62 1999/04/20 21:11:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.63 1999/05/31 20:40:23 ross Exp $");
#ifndef EVCNT_COUNTERS
#include <machine/intrcnt.h>
@@ -180,8 +180,8 @@
* All arguments are passed to alpha_init().
*/
NESTED_NOPROFILE(locorestart,1,0,ra,0,0)
- br pv,Lstart1
-Lstart1: LDGP(pv)
+ br pv,1f
+1: LDGP(pv)
/* Switch to the boot stack. */
lda sp,bootstack
@@ -366,8 +366,8 @@
IMPORT(astpending, 8)
LEAF(exception_return, 1) /* XXX should be NESTED */
- br pv, Ler1
-Ler1: LDGP(pv)
+ br pv, 1f
+1: LDGP(pv)
#if defined(MULTIPROCESSOR)
/* XXX XXX XXX */
@@ -380,40 +380,40 @@
ldq t0, 0(t0)
ldq t1, RPB_PRIMARY_CPU_ID(t0)
cmpeq t1, v0, t0
- beq t0, Lrestoreregs /* == 0: bail out now */
+ beq t0, 4f /* == 0: bail out now */
#endif
ldq s1, (FRAME_PS * 8)(sp) /* get the saved PS */
and s1, ALPHA_PSL_IPL_MASK, t0 /* look at the saved IPL */
- bne t0, Lrestoreregs /* != 0: can't do AST or SIR */
+ bne t0, 4f /* != 0: can't do AST or SIR */
/* see if we can do an SIR */
ldq t1, ssir /* SIR pending? */
- beq t1, Lchkast /* no, try an AST*/
+ beq t1, 2f /* no, try an AST*/
/* We've got a SIR. */
CALL(do_sir) /* do the SIR; lowers IPL */
-Lchkast:
- ldiq a0, ALPHA_PSL_IPL_0 /* drop IPL to zero*/
+ /* Check for AST */
+2: ldiq a0, ALPHA_PSL_IPL_0 /* drop IPL to zero*/
call_pal PAL_OSF1_swpipl
and s1, ALPHA_PSL_USERMODE, t0 /* are we returning to user? */
- beq t0, Lrestoreregs /* no: just return */
+ beq t0, 4f /* no: just return */
ldq t2, astpending /* AST pending? */
- beq t2, Lsetfpenable /* no: return & deal with FP */
+ beq t2, 3f /* no: return & deal with FP */
/* We've got an AST. Handle it. */
mov sp, a0 /* only arg is frame */
CALL(ast)
-Lsetfpenable:
+
/*
* enable FPU based on whether the current proc is fpcurproc.
* Note: GET_*() clobbers v0, t0, t8...t11.
*/
- GET_CURPROC(t1)
+3: GET_CURPROC(t1)
ldq t1, 0(t1)
GET_FPCURPROC(t2)
ldq t2, 0(t2)
@@ -422,8 +422,7 @@
cmovne t1, 1, a0
call_pal PAL_OSF1_wrfen
-Lrestoreregs:
- /* restore the registers, and return */
+4: /* restore the registers, and return */
bsr ra, exception_restore_regs /* jmp/CALL trashes pv/t12 */
ldq ra,(FRAME_RA*8)(sp)
.set noat
@@ -743,8 +742,8 @@
*/
LEAF(savectx, 1)
- br pv, Lsavectx1
-Lsavectx1: LDGP(pv)
+ br pv, 1f
+1: LDGP(pv)
stq sp, U_PCB_HWPCB_KSP(a0) /* store sp */
stq s0, U_PCB_CONTEXT+(0 * 8)(a0) /* store s0 - s6 */
stq s1, U_PCB_CONTEXT+(1 * 8)(a0)
@@ -774,19 +773,18 @@
* profiling.
*/
LEAF(idle, 0)
- br pv, Lidle1
-Lidle1: LDGP(pv)
+ br pv, 1f
+1: LDGP(pv)
/* Note: GET_CURPROC() clobbers v0, t0, t8...t11. */
GET_CURPROC(t1)
stq zero, 0(t1) /* curproc <- NULL for stats */
mov zero, a0 /* enable all interrupts */
call_pal PAL_OSF1_swpipl
-Lidle2:
- ldl t0, whichqs /* look for non-empty queue */
- beq t0, Lidle2
+2: ldl t0, whichqs /* look for non-empty queue */
+ beq t0, 2b
ldiq a0, ALPHA_PSL_IPL_HIGH /* disable all interrupts */
call_pal PAL_OSF1_swpipl
- jmp zero, sw1 /* jump back into the fray */
Home |
Main Index |
Thread Index |
Old Index