Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Pull in the bzero() changes from li...
details: https://anonhg.NetBSD.org/src/rev/932eab367b03
branches: trunk
changeset: 495241:932eab367b03
user: mycroft <mycroft%NetBSD.org@localhost>
date: Mon Jul 24 15:57:07 2000 +0000
description:
Pull in the bzero() changes from libc for real, with a couple of kernel-
specific hacks:
* Make the bias handling depend on STKB, so it switches correctly for 32-bit
kernels.
* Use the 32-bit stw/ld for 32-bit kernels.
* Add a few `-STKB's that were missed in the previous change.
diffstat:
sys/arch/sparc64/sparc64/locore.s | 46 ++++++++++++--------------------------
1 files changed, 15 insertions(+), 31 deletions(-)
diffs (98 lines):
diff -r 85cb4081b4d1 -r 932eab367b03 sys/arch/sparc64/sparc64/locore.s
--- a/sys/arch/sparc64/sparc64/locore.s Mon Jul 24 15:36:49 2000 +0000
+++ b/sys/arch/sparc64/sparc64/locore.s Mon Jul 24 15:57:07 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.86 2000/07/24 14:55:56 pk Exp $ */
+/* $NetBSD: locore.s,v 1.87 2000/07/24 15:57:07 mycroft Exp $ */
/*
* Copyright (c) 1996-1999 Eduardo Horvath
* Copyright (c) 1996 Paul Kranenburg
@@ -8526,7 +8526,7 @@
set EINTSTACK-STKB, %l4 ! Are we on intr stack?
cmp %sp, %l4
bgu,pt %xcc, 1f
- set INTSTACK, %l4
+ set INTSTACK-STKB, %l4
cmp %sp, %l4
blu %xcc, 1f
0:
@@ -8825,7 +8825,7 @@
set EINTSTACK-STKB, %l4 ! Are we on intr stack?
cmp %sp, %l4
bgu,pt %xcc, 1f
- set INTSTACK, %l4
+ set INTSTACK-STKB, %l4
cmp %sp, %l4
blu %xcc, 1f
0:
@@ -9767,20 +9767,17 @@
save %sp, -(CC64FSZ+FS_SIZE+BLOCK_SIZE), %sp ! Allocate an fpstate
sethi %hi(FPPROC), %l1
LDPTR [%l1 + %lo(FPPROC)], %l2 ! Load fpproc
- btst 1, %sp
- add %sp, (CC64FSZ+BLOCK_SIZE-1), %l0 ! Calculate pointer to fpstate
- add %l0, BIAS, %l3
- movnz %xcc, %l3, %l0
+ add %sp, (CC64FSZ+STKB+BLOCK_SIZE-1), %l0 ! Calculate pointer to fpstate
brz,pt %l2, 1f ! fpproc == NULL?
andn %l0, BLOCK_ALIGN, %l0 ! And make it block aligned
LDPTR [%l2 + P_FPSTATE], %l3
brz,pn %l3, 1f ! Make sure we have an fpstate
mov %l3, %o0
call _C_LABEL(savefpstate) ! Save the old fpstate
- set EINTSTACK-STKB, %l4 ! Are we on intr stack?
+ set EINTSTACK-STKB, %l4 ! Are we on intr stack?
cmp %sp, %l4
bgu,pt %xcc, 1f
- set INTSTACK, %l4
+ set INTSTACK-STKB, %l4
cmp %sp, %l4
blu %xcc, 1f
0:
@@ -9812,22 +9809,17 @@
dec 8, %i1
2:
- brz,pt %i2, 4f ! Do we have a pattern to load?
- fzero %f0 ! Set up FPU
-
- btst 1, %fp
- bnz,pt %icc, 3f ! 64-bit stack?
- nop
- stw %i2, [%sp + 0x8] ! Flush this puppy to RAM
+#ifdef _LP64
+ stx %i2, [%sp + BIAS + 0x50] ! Flush this puppy to RAM
membar #StoreLoad
- ld [%sp + 0x8], %f0
- ba,pt %icc, 4f
- fmovsa %icc, %f0, %f1
-3:
- stx %i2, [%sp + BIAS + 0x8] ! Flush this puppy to RAM
+ ldd [%sp + BIAS + 0x50], %f0
+#else
+ stw %i2, [%sp + 0x28] ! Flush this puppy to RAM
membar #StoreLoad
- ldd [%sp + BIAS + 0x8], %f0
-4:
+ ld [%sp + 0x28], %f0
+ fmovsa %icc, %f0, %f1
+#endif
+
fmovda %icc, %f0, %f2 ! Duplicate the pattern
fmovda %icc, %f0, %f4
fmovda %icc, %f0, %f6
@@ -9835,14 +9827,6 @@
fmovda %icc, %f0, %f10
fmovda %icc, %f0, %f12
fmovda %icc, %f0, %f14
- fmovda %icc, %f0, %f16 ! And second bank
- fmovda %icc, %f0, %f18
- fmovda %icc, %f0, %f20
- fmovda %icc, %f0, %f22
- fmovda %icc, %f0, %f24
- fmovda %icc, %f0, %f26
- fmovda %icc, %f0, %f28
- fmovda %icc, %f0, %f30
!! Remember: we were 8 bytes too far
dec 56, %i1 ! Go one iteration too far
Home |
Main Index |
Thread Index |
Old Index