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 Restructure exception_return() a bit in...
details: https://anonhg.NetBSD.org/src/rev/acefa8113946
branches: trunk
changeset: 748730:acefa8113946
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Nov 03 16:08:00 2009 +0000
description:
Restructure exception_return() a bit in preparation for some upcoming
changes.
diffstat:
sys/arch/alpha/alpha/locore.s | 37 ++++++++++++++++++-------------------
1 files changed, 18 insertions(+), 19 deletions(-)
diffs (88 lines):
diff -r 1eda3a95d942 -r acefa8113946 sys/arch/alpha/alpha/locore.s
--- a/sys/arch/alpha/alpha/locore.s Tue Nov 03 13:14:50 2009 +0000
+++ b/sys/arch/alpha/alpha/locore.s Tue Nov 03 16:08:00 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.114 2009/06/01 20:58:16 martin Exp $ */
+/* $NetBSD: locore.s,v 1.115 2009/11/03 16:08:00 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.114 2009/06/01 20:58:16 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.s,v 1.115 2009/11/03 16:08:00 thorpej Exp $");
#include "assym.h"
@@ -255,37 +255,36 @@
ldq s1, (FRAME_PS * 8)(sp) /* get the saved PS */
and s1, ALPHA_PSL_IPL_MASK, t0 /* look at the saved IPL */
- bne t0, 4f /* != 0: can't do AST or SIR */
+ bne t0, 5f /* != 0: can't do AST or SIR */
/* see if we can do an SIR */
2: ldq t1, ssir /* SIR pending? */
- bne t1, 5f /* yes */
+ bne t1, 6f /* yes */
/* no */
- /* check for AST */
-3: and s1, ALPHA_PSL_USERMODE, t0 /* are we returning to user? */
- beq t0, 4f /* no: just return */
+ and s1, ALPHA_PSL_USERMODE, t0 /* are we returning to user? */
+ beq t0, 5f /* no: just return */
/* yes */
/* GET_CPUINFO clobbers v0, t0, t8...t11. */
GET_CPUINFO
- ldq t1, CPU_INFO_CURLWP(v0)
- ldl t3, L_MD_ASTPENDING(t1) /* AST pending? */
- bne t3, 6f /* yes */
- /* no: return & deal with FP */
+ mov v0, s3 /* squirrel away our CPU info */
- /*
- * We are going back to usermode. Enable the FPU based on whether
- * the current proc is fpcurlwp.
- */
- ldq t2, CPU_INFO_FPCURLWP(v0)
+ /* check for AST */
+3: ldq t1, CPU_INFO_CURLWP(s3)
+ ldl t3, L_MD_ASTPENDING(t1) /* AST pending? */
+ bne t3, 7f /* yes */
+ /* no: headed back to user space */
+
+ /* Enable the FPU based on whether the current proc is fpcurlwp. */
+4: ldq t2, CPU_INFO_FPCURLWP(s3)
cmpeq t1, t2, t1
mov zero, a0
cmovne t1, 1, a0
call_pal PAL_OSF1_wrfen
/* restore the registers, and return */
-4: bsr ra, exception_restore_regs /* jmp/CALL trashes pv/t12 */
+5: bsr ra, exception_restore_regs /* jmp/CALL trashes pv/t12 */
ldq ra,(FRAME_RA*8)(sp)
.set noat
ldq at_reg,(FRAME_AT*8)(sp)
@@ -296,7 +295,7 @@
/* NOTREACHED */
/* We've got a SIR */
-5: ldiq a0, ALPHA_PSL_IPL_SOFT
+6: ldiq a0, ALPHA_PSL_IPL_SOFT
call_pal PAL_OSF1_swpipl
mov v0, s2 /* remember old IPL */
CALL(softintr_dispatch)
@@ -307,7 +306,7 @@
br 2b
/* We've got an AST */
-6: stl zero, L_MD_ASTPENDING(t1) /* no AST pending */
+7: stl zero, L_MD_ASTPENDING(t1) /* no AST pending */
ldiq a0, ALPHA_PSL_IPL_0 /* drop IPL to zero */
call_pal PAL_OSF1_swpipl
Home |
Main Index |
Thread Index |
Old Index