2 * linux/arch/arm/lib/io-readsw-armv3.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>
14 adr r0, .Linsw_bad_align_msg
18 .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
21 .Linsw_align: tst r1, #1
22 bne .Linsw_bad_alignment
33 teq r2, #0 @ do we have to check for the zero len?
38 .Linsw_aligned: mov ip, #0xff
39 orr ip, ip, ip, lsl #8
40 stmfd sp!, {r4, r5, r6, lr}
45 .Linsw_8_lp: ldr r3, [r0]
48 orr r3, r3, r4, lsl #16
53 orr r4, r4, r5, lsl #16
58 orr r5, r5, r6, lsl #16
63 orr r6, r6, lr, lsl #16
71 ldmeqfd sp!, {r4, r5, r6, pc}
73 .Lno_insw_8: tst r2, #4
79 orr r3, r3, r4, lsl #16
84 orr r4, r4, r5, lsl #16
88 .Lno_insw_4: tst r2, #2
94 orr r3, r3, r4, lsl #16
98 .Lno_insw_2: tst r2, #1
104 ldmfd sp!, {r4, r5, r6, pc}