2 * linux/arch/arm/lib/io-readsw-armv4.S
4 * Copyright (C) 1995-2000 Russell King
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.
10 #include <linux/linkage.h>
11 #include <asm/assembler.h>
12 #include <asm/hardware.h>
15 adr r0, .insw_bad_align_msg
19 .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
22 .insw_align: tst r1, #1
23 bne .insw_bad_alignment
29 RETINSTR(moveq, pc, lr)
32 teq r2, #0 @ do we have to check for the zero len?
37 stmfd sp!, {r4, r5, lr}
42 .insw_8_lp: ldrh r3, [r0]
44 orr r3, r3, r4, lsl #16
48 orr r4, r4, r5, lsl #16
52 orr r5, r5, ip, lsl #16
56 orr ip, ip, lr, lsl #16
58 stmia r1!, {r3 - r5, ip}
64 LOADREGS(eqfd, sp!, {r4, r5, pc})
66 .no_insw_8: tst r2, #4
71 orr r3, r3, r4, lsl #16
75 orr r4, r4, ip, lsl #16
79 .no_insw_4: tst r2, #2
84 orr r3, r3, ip, lsl #16
88 .no_insw_2: tst r2, #1
92 LOADREGS(fd, sp!, {r4, r5, pc})