1/* 2 * linux/arch/arm26/lib/copypage.S 3 * 4 * Copyright (C) 1995-1999 Russell King 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License version 2 as 8 * published by the Free Software Foundation. 9 * 10 * ASM optimised string functions 11 */ 12#include <linux/linkage.h> 13#include <asm/assembler.h> 14#include <asm/asm-offsets.h> 15 16 .text 17 .align 5 18ENTRY(__copy_user_page) 19 stmfd sp!, {r4, lr} @ 2 20 mov r2, #PAGE_SZ/64 @ 1 21 ldmia r1!, {r3, r4, ip, lr} @ 4+1 221: stmia r0!, {r3, r4, ip, lr} @ 4 23 ldmia r1!, {r3, r4, ip, lr} @ 4+1 24 stmia r0!, {r3, r4, ip, lr} @ 4 25 ldmia r1!, {r3, r4, ip, lr} @ 4+1 26 stmia r0!, {r3, r4, ip, lr} @ 4 27 ldmia r1!, {r3, r4, ip, lr} @ 4 28 subs r2, r2, #1 @ 1 29 stmia r0!, {r3, r4, ip, lr} @ 4 30 ldmneia r1!, {r3, r4, ip, lr} @ 4 31 bne 1b @ 1 32 LOADREGS(fd, sp!, {r4, pc}) @ 3 33 34 .align 5 35ENTRY(__clear_user_page) 36 str lr, [sp, #-4]! 37 mov r1, #PAGE_SZ/64 @ 1 38 mov r2, #0 @ 1 39 mov r3, #0 @ 1 40 mov ip, #0 @ 1 41 mov lr, #0 @ 1 421: stmia r0!, {r2, r3, ip, lr} @ 4 43 stmia r0!, {r2, r3, ip, lr} @ 4 44 stmia r0!, {r2, r3, ip, lr} @ 4 45 stmia r0!, {r2, r3, ip, lr} @ 4 46 subs r1, r1, #1 @ 1 47 bne 1b @ 1 48 ldr pc, [sp], #4 49 50 .section ".init.text", #alloc, #execinstr 51