patch-2.1.29 linux/arch/sparc64/lib/blockops.S
Next file: linux/arch/sparc64/lib/memset.S
Previous file: linux/arch/sparc64/kernel/ttable.S
Back to the patch index
Back to the overall index
- Lines: 96
- Date:
Wed Mar 5 17:04:31 1997
- Orig file:
v2.1.28/linux/arch/sparc64/lib/blockops.S
- Orig date:
Mon Dec 30 01:59:59 1996
diff -u --recursive --new-file v2.1.28/linux/arch/sparc64/lib/blockops.S linux/arch/sparc64/lib/blockops.S
@@ -1,4 +1,4 @@
-/* $Id: blockops.S,v 1.1 1996/12/22 07:42:15 davem Exp $
+/* $Id: blockops.S,v 1.3 1997/02/25 20:00:10 jj Exp $
* arch/sparc64/lib/blockops.S: UltraSparc block zero optimized routines.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -6,16 +6,15 @@
#include <asm/asi.h>
- /* Zero out 64 bytes of memory at (buf + offset). */
+/* FIXME: Write this. */
+#define BZERO_TEST
+
+ /* Zero out 256 bytes of memory at (buf + offset). */
#define BLAST_BLOCK(buf, offset) \
- stx %g0, [buf + offset + 0x38]; \
- stx %g0, [buf + offset + 0x30]; \
- stx %g0, [buf + offset + 0x28]; \
- stx %g0, [buf + offset + 0x20]; \
- stx %g0, [buf + offset + 0x18]; \
- stx %g0, [buf + offset + 0x10]; \
- stx %g0, [buf + offset + 0x08]; \
- stx %g0, [buf + offset + 0x00];
+ stda %f48, [buf + offset + 0x00] %asi; \
+ stda %f48, [buf + offset + 0x40] %asi; \
+ stda %f48, [buf + offset + 0x80] %asi; \
+ stda %f48, [buf + offset + 0xc0] %asi; \
/* Copy 32 bytes of memory at (src + offset) to
* (dst + offset).
@@ -33,41 +32,45 @@
.text
.align 4
- .globl C_LABEL(bzero_2page), C_LABEL(bzero_1page)
-C_LABEL(bzero_2page):
+ .globl bzero_2page, bzero_1page
+bzero_2page:
/* %o0 = buf */
- or %o0, %g0, %o1
- or %g0, 0x40, %g2
+ mov %o0, %o1
+ wr %g0, ASI_BLK_P, %asi
+ mov 0x10, %g2
+ BZERO_TEST
1:
- BLAST_BLOCK(%o0, 0x00)
- BLAST_BLOCK(%o0, 0x40)
- BLAST_BLOCK(%o0, 0x80)
- BLAST_BLOCK(%o0, 0xc0)
+ BLAST_BLOCK(%o0, 0x000)
+ BLAST_BLOCK(%o0, 0x100)
+ BLAST_BLOCK(%o0, 0x200)
+ BLAST_BLOCK(%o0, 0x300)
subcc %g2, 1, %g2
bne,pt %icc, 1b
- add %o0, 0x100, %o0
+ add %o0, 0x400, %o0
retl
mov %o1, %o0
-C_LABEL(bzero_1page):
+bzero_1page:
/* %o0 = buf */
- or %o0, %g0, %o1
- or %g0, 0x20, %g2
+ mov %o0, %o1
+ wr %g0, ASI_BLK_P, %asi
+ mov 0x08, %g2
+ BZERO_TEST
1:
- BLAST_BLOCK(%o0, 0x00)
- BLAST_BLOCK(%o0, 0x40)
- BLAST_BLOCK(%o0, 0x80)
- BLAST_BLOCK(%o0, 0xc0)
+ BLAST_BLOCK(%o0, 0x000)
+ BLAST_BLOCK(%o0, 0x100)
+ BLAST_BLOCK(%o0, 0x200)
+ BLAST_BLOCK(%o0, 0x300)
subcc %g2, 1, %g2
bne,pt %icc, 1b
- add %o0, 0x100, %o0
+ add %o0, 0x400, %o0
retl
mov %o1, %o0
- .globl C_LABEL(__copy_1page)
-C_LABEL(__copy_1page):
+ .globl __copy_1page
+__copy_1page:
/* %o0 = dst, %o1 = src */
or %g0, 0x10, %g1
1:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov