Module Name:    src
Committed By:   skrll
Date:           Thu Apr  5 19:42:14 UTC 2012

Modified Files:
        src/sys/arch/hp700/hp700: locore.S
        src/sys/arch/hppa/hppa: trap.S

Log Message:
Use CR_ control regsiter definition for consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/hp700/hp700/locore.S
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/hppa/hppa/trap.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hp700/hp700/locore.S
diff -u src/sys/arch/hp700/hp700/locore.S:1.58 src/sys/arch/hp700/hp700/locore.S:1.59
--- src/sys/arch/hp700/hp700/locore.S:1.58	Tue Jan  3 06:11:21 2012
+++ src/sys/arch/hp700/hp700/locore.S	Thu Apr  5 19:42:13 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.58 2012/01/03 06:11:21 skrll Exp $	*/
+/*	$NetBSD: locore.S,v 1.59 2012/04/05 19:42:13 skrll Exp $	*/
 /*	$OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $	*/
 
 /*
@@ -79,9 +79,6 @@
 /* Some aliases for the macros in assym.h. */
 #define	TRAPFRAME_SIZEOF	trapframe_SIZEOF
 
-#define	ccr	cr10
-#define	rctr	cr0
-
 /*
  * Very crude debugging macros that write to com1.
  */
@@ -244,7 +241,7 @@ L$start_zero_tf:
 	/*
 	 * disable all coprocessors
 	 */
-	mtctl	%r0, %ccr
+	mtctl	%r0, CR_CCR
 
 #ifdef MULTIPROCESSOR
 
@@ -446,7 +443,7 @@ LEAF_ENTRY_NOPROFILE(hw_cpu_spinup_tramp
 	/*
 	 * disable all coprocessors
 	 */
-	mtctl   %r0, %ccr
+	mtctl   %r0, CR_CCR
 
 	/*
 	 * to keep the spl() routines consistent we need to put the correct
@@ -1054,13 +1051,13 @@ ALTENTRY(hppa_fpu_nop1)
 	 * states.
 	 */
 	GET_CURCPU(%t1)
-	mfctl	%ccr, %r1
+	mfctl	CR_CCR, %r1
 	mfctl	CR_FPPADDR, %t2
 	ldw	CI_FPU_STATE(%t1), %t1
 	depi	0, 25, 2, %r1		; disables the FPU
 	comb,<>,n %t1, %t2, 0		; nullify if LWPs different
 	depi	3, 25, 2, %r1		; enables the FPU
-	mtctl	%r1, %ccr
+	mtctl	%r1, CR_CCR
 
 switch_return:
 	copy	%arg0, %ret0

Index: src/sys/arch/hppa/hppa/trap.S
diff -u src/sys/arch/hppa/hppa/trap.S:1.63 src/sys/arch/hppa/hppa/trap.S:1.64
--- src/sys/arch/hppa/hppa/trap.S:1.63	Sun Feb 26 08:28:57 2012
+++ src/sys/arch/hppa/hppa/trap.S	Thu Apr  5 19:42:14 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.S,v 1.63 2012/02/26 08:28:57 skrll Exp $	*/
+/*	$NetBSD: trap.S,v 1.64 2012/04/05 19:42:14 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -513,7 +513,7 @@ syscall_return:
 	mtctl	%t2, CR_FPPADDR
 
 	ldw	TF_CR0(%sr3, %t3), %t1
-	mtctl	%t1, %rctr
+	mtctl	%t1, CR_RCTR
 
 	GET_CURCPU_SPACE(%sr3, %t3)
 
@@ -939,7 +939,7 @@ ALTENTRY(hppa_fpu_nop0)
 	 * We have a hardware FPU.  If it is enabled,  branch to emulate the
 	 * instruction.
 	 */
-	mfctl	%ccr, %arg0
+	mfctl	CR_CCR, %arg0
 	extru,= %arg0, 25, 2, %r1
 	b,n	L$emulate_fpu
 
@@ -1055,10 +1055,10 @@ ALTENTRY(hppa_fpu_swap)
 	 * 
 	 * Also, branch if there's no FPU state to swap out.
 	 */
-	mfctl	%ccr, %r1
+	mfctl	CR_CCR, %r1
 	depi	3, 25, 2, %r1
 	comb,=	%r0, %arg0, L$fpu_swap_in
-	mtctl	%r1, %ccr
+	mtctl	%r1,CR_CCR 
 
 	/*
 	 * Swap out the current FPU state.
@@ -1186,10 +1186,10 @@ L$fpu_swap_done:
 L$fpu_no_swap_in:
 
 	/* We didn't swap any FPU state in, so disable the FPU. */
-	mfctl	%ccr, %r1
+	mfctl	CR_CCR, %r1
 	depi	0, 25, 2, %r1
 	b	L$fpu_swap_done
-	mtctl	%r1, %ccr
+	mtctl	%r1, CR_CCR 
 EXIT(hppa_fpu_swapout)
 
 	/* Construct the virtual address tag. */
@@ -2053,7 +2053,7 @@ L$trap_have_stack:
 	stw	%r1, CI_TRAPSAVE + TF_FLAGS(%t3)
 
 	/* gotta get it before R is up */
-	mfctl	%rctr, %t1
+	mfctl	CR_RCTR, %t1
 
 	copy	%sp, %t3
 	ldo	HPPA_FRAME_SIZE+TRAPFRAME_SIZEOF(%sp), %sp
@@ -2073,7 +2073,7 @@ trapnowvirt:
 	 * %sp is loaded w/ the right VA (we did not need it being physical)
 	 */
 
-	mfctl	%ccr, %t2
+	mfctl	CR_CCR, %t2
 	stw	%t1, TF_CR0(%sr3, %t3)
 	stw	%t2, TF_CR10(%sr3, %t3)
 

Reply via email to