summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-12-26 17:41:00 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-12-26 17:41:00 +0000
commit68dad5365bbc066bf73dbca739d16321037c1a33 (patch)
treed2433392b787b657e29d3a5dd0eda1e701ebb344 /sys/arch
parent261c9342b820b0b018ad695a0e999660e009436d (diff)
Use the TSTATE_xxx constants instead of (PSTATE_xxx << TSTATE_PSTATE_SHIFT)
for readability; ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/sparc64/trap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/sparc64/sparc64/trap.c b/sys/arch/sparc64/sparc64/trap.c
index 58fb0ec341d..3874bcd71b6 100644
--- a/sys/arch/sparc64/sparc64/trap.c
+++ b/sys/arch/sparc64/sparc64/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.58 2007/11/18 21:16:44 kettenis Exp $ */
+/* $OpenBSD: trap.c,v 1.59 2007/12/26 17:40:59 miod Exp $ */
/* $NetBSD: trap.c,v 1.73 2001/08/09 01:03:01 eeh Exp $ */
/*
@@ -362,9 +362,9 @@ static __inline void share_fpu(p, tf)
struct proc *p;
struct trapframe64 *tf;
{
- if (!(tf->tf_tstate & (PSTATE_PRIV<<TSTATE_PSTATE_SHIFT)) &&
- (tf->tf_tstate & (PSTATE_PEF<<TSTATE_PSTATE_SHIFT)) && fpproc != p)
- tf->tf_tstate &= ~(PSTATE_PEF<<TSTATE_PSTATE_SHIFT);
+ if (!(tf->tf_tstate & TSTATE_PRIV) &&
+ (tf->tf_tstate & TSTATE_PEF) && fpproc != p)
+ tf->tf_tstate &= ~TSTATE_PEF;
}
/*
@@ -1187,7 +1187,7 @@ text_access_error(tf, type, pc, sfsr, afva, afsr)
/* Now munch on protections... */
access_type = VM_PROT_EXECUTE;
- if (tstate & (PSTATE_PRIV<<TSTATE_PSTATE_SHIFT)) {
+ if (tstate & TSTATE_PRIV) {
extern int trap_trace_dis;
trap_trace_dis = 1; /* Disable traptrace for printf */
(void) splhigh();