Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/powerpc witch from xor r, r, r to li r, 0 to s...
details: https://anonhg.NetBSD.org/src/rev/d91c610cec0f
branches: trunk
changeset: 543272:d91c610cec0f
user: matt <matt%NetBSD.org@localhost>
date: Fri Feb 21 15:14:08 2003 +0000
description:
witch from xor r,r,r to li r,0 to set a register to 0. It's clearer (and
better for G4 processors).
diffstat:
sys/arch/powerpc/powerpc/locore_subr.S | 20 ++++++++++----------
sys/arch/powerpc/powerpc/trap_subr.S | 6 +++---
2 files changed, 13 insertions(+), 13 deletions(-)
diffs (117 lines):
diff -r 6c16ffee5038 -r d91c610cec0f sys/arch/powerpc/powerpc/locore_subr.S
--- a/sys/arch/powerpc/powerpc/locore_subr.S Fri Feb 21 15:03:44 2003 +0000
+++ b/sys/arch/powerpc/powerpc/locore_subr.S Fri Feb 21 15:14:08 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_subr.S,v 1.9 2003/02/03 17:10:11 matt Exp $ */
+/* $NetBSD: locore_subr.S,v 1.10 2003/02/21 15:14:08 matt Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -193,7 +193,7 @@
addi 1,6,USPACE-16 /* 16 bytes are reserved at stack top */
1:
- xor 31,31,31
+ li 31,0
stw 31,CI_CURLWP(7) /* Zero to not accumulate cpu time */
lwz 31,CI_CURPCB(7)
@@ -201,7 +201,7 @@
stw 3,PCB_SPL(31) /* save spl */
#else
GET_CPUINFO(3)
- xor 31,31,31
+ li 31,0
stw 31,CI_CURLWP(3) /* Zero to not accumulate cpu time */
lwz 31,CI_CURPCB(3)
#endif
@@ -211,7 +211,7 @@
bl _C_LABEL(sched_unlock_idle)
#endif
- xor 3,3,3 /* spl0() */
+ li 3,0 /* spl0() */
bl _C_LABEL(lcsplx)
#if !defined(MULTIPROCESSOR)
stw 3,PCB_SPL(31) /* save spl */
@@ -261,7 +261,7 @@
switch_common:
1:
/* just did this resched thing */
- xor 3,3,3
+ li 3,0
GET_CPUINFO(4)
stw 3,CI_WANT_RESCHED(4)
stw 3,L_BACK(31) /* probably superfluous */
@@ -279,7 +279,7 @@
lwz 4,L_ADDR(31)
#if !defined(MULTIPROCESSOR) /* XXX */
- xor 3,3,3 /* if it is the same lwp, return 0 */
+ li 3,0 /* if it is the same lwp, return 0 */
cmpl 0,31,30 /* is it the same lwp? */
beq switch_return
@@ -409,7 +409,7 @@
addi 1,6,USPACE-16 /* 16 bytes are reserved at stack top */
1:
- xor 31,31,31
+ li 31,0
stw 31,CI_CURLWP(7) /* Zero to not accumulate cpu time */
lwz 31,CI_CURPCB(7)
@@ -417,7 +417,7 @@
stw 3,PCB_SPL(31) /* save spl */
#else
GET_CPUINFO(3)
- xor 31,31,31
+ li 31,0
stw 31,CI_CURLWP(3) /* Zero to not accumulate cpu time */
lwz 31,CI_CURPCB(3)
#endif
@@ -427,7 +427,7 @@
bl _C_LABEL(sched_unlock_idle)
#endif
- xor 3,3,3
+ li 3,0
bl _C_LABEL(lcsplx)
#if !defined(MULTIPROCESSOR)
stw 3,PCB_SPL(31) /* save spl */
@@ -465,7 +465,7 @@
#if defined(MULTIPROCESSOR)
bl _C_LABEL(proc_trampoline_mp)
#endif
- xor 3,3,3
+ li 3,0
bl _C_LABEL(lcsplx)
mtlr 31
mr 3,30
diff -r 6c16ffee5038 -r d91c610cec0f sys/arch/powerpc/powerpc/trap_subr.S
--- a/sys/arch/powerpc/powerpc/trap_subr.S Fri Feb 21 15:03:44 2003 +0000
+++ b/sys/arch/powerpc/powerpc/trap_subr.S Fri Feb 21 15:14:08 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap_subr.S,v 1.34 2003/02/03 17:10:11 matt Exp $ */
+/* $NetBSD: trap_subr.S,v 1.35 2003/02/21 15:14:08 matt Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -553,7 +553,7 @@
cmpi 0,_s1_,MPC601; \
bne 99f; /* skip if not 601 */ \
CPU601_KERN_LEAVE_HOOK(_pmap_,_s1_); \
- xor _s1_,_s1_,_s1_; \
+ li _s1_,0; \
mtibatl 0,_s1_; /* obliterate BATs */ \
mtibatl 1,_s1_; \
mtibatl 2,_s1_; \
@@ -1047,7 +1047,7 @@
sync
icbi 0,9 /* and instruction caches */
mr 6,3
- xor 3,3,3
+ li 3,0
stb 4,0(6)
dcbst 0,6 /* Now do appropriate flushes
to data... */
Home |
Main Index |
Thread Index |
Old Index