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>
13 .macro pack, rd, hw1, hw2
15 orr \rd, \hw1, \hw2, lsl #16
17 orr \rd, \hw2, \hw1, lsl #16
22 adr r0, .insw_bad_align_msg
26 .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
29 .insw_align: tst r1, #1
30 bne .insw_bad_alignment
36 RETINSTR(moveq, pc, lr)
39 teq r2, #0 @ do we have to check for the zero len?
44 stmfd sp!, {r4, r5, lr}
49 .insw_8_lp: ldrh r3, [r0]
65 stmia r1!, {r3 - r5, ip}
71 LOADREGS(eqfd, sp!, {r4, r5, pc})
73 .no_insw_8: tst r2, #4
86 .no_insw_4: tst r2, #2
95 .no_insw_2: tst r2, #1
99 LOADREGS(fd, sp!, {r4, r5, pc})