1 /* $NetBSD: bcopy_page.S,v 1.7 2003/10/13 21:03:13 scw Exp $ */
4 * Copyright (c) 1995 Scott Stevens
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by Scott Stevens.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * RiscBSD kernel project
36 * page optimised bcopy and bzero routines
41 #include <machine/asm.h>
43 __FBSDID("$FreeBSD$");
49 * armv5e version of bcopy_page
56 ldr r2, [r0], #0x04 /* 0x00 */
57 ldr r3, [r0], #0x04 /* 0x04 */
58 1: pld [r0, #0x18] /* Prefetch 0x20 */
59 ldr r4, [r0], #0x04 /* 0x08 */
60 ldr r5, [r0], #0x04 /* 0x0c */
62 ldr r2, [r0], #0x04 /* 0x10 */
63 ldr r3, [r0], #0x04 /* 0x14 */
65 ldr r4, [r0], #0x04 /* 0x18 */
66 ldr r5, [r0], #0x04 /* 0x1c */
68 ldr r2, [r0], #0x04 /* 0x20 */
69 ldr r3, [r0], #0x04 /* 0x24 */
70 pld [r0, #0x18] /* Prefetch 0x40 */
72 ldr r4, [r0], #0x04 /* 0x28 */
73 ldr r5, [r0], #0x04 /* 0x2c */
75 ldr r2, [r0], #0x04 /* 0x30 */
76 ldr r3, [r0], #0x04 /* 0x34 */
78 ldr r4, [r0], #0x04 /* 0x38 */
79 ldr r5, [r0], #0x04 /* 0x3c */
81 ldr r2, [r0], #0x04 /* 0x40 */
82 ldr r3, [r0], #0x04 /* 0x44 */
83 pld [r0, #0x18] /* Prefetch 0x60 */
85 ldr r4, [r0], #0x04 /* 0x48 */
86 ldr r5, [r0], #0x04 /* 0x4c */
88 ldr r2, [r0], #0x04 /* 0x50 */
89 ldr r3, [r0], #0x04 /* 0x54 */
91 ldr r4, [r0], #0x04 /* 0x58 */
92 ldr r5, [r0], #0x04 /* 0x5c */
94 ldr r2, [r0], #0x04 /* 0x60 */
95 ldr r3, [r0], #0x04 /* 0x64 */
96 pld [r0, #0x18] /* Prefetch 0x80 */
98 ldr r4, [r0], #0x04 /* 0x68 */
99 ldr r5, [r0], #0x04 /* 0x6c */
101 ldr r2, [r0], #0x04 /* 0x70 */
102 ldr r3, [r0], #0x04 /* 0x74 */
104 ldr r4, [r0], #0x04 /* 0x78 */
105 ldr r5, [r0], #0x04 /* 0x7c */
108 ldrgt r2, [r0], #0x04 /* 0x80 */
109 ldrgt r3, [r0], #0x04 /* 0x84 */
117 * armv5e version of bzero_page
123 1: strd r2, [r0], #8 /* 32 */
127 strd r2, [r0], #8 /* 64 */
131 strd r2, [r0], #8 /* 96 */
135 strd r2, [r0], #8 /* 128 */