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>
12 #include <asm/hardware.h>
15 adr r0, .Linsw_bad_align_msg
19 .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
22 .Linsw_align: tst r1, #1
23 bne .Linsw_bad_alignment
34 teq r2, #0 @ do we have to check for the zero len?
39 .Linsw_aligned: mov ip, #0xff
40 orr ip, ip, ip, lsl #8
41 stmfd sp!, {r4, r5, r6, lr}
46 .Linsw_8_lp: ldr r3, [r0]
49 orr r3, r3, r4, lsl #16
54 orr r4, r4, r5, lsl #16
59 orr r5, r5, r6, lsl #16
64 orr r6, r6, lr, lsl #16
72 ldmeqfd sp!, {r4, r5, r6, pc}
74 .Lno_insw_8: tst r2, #4
80 orr r3, r3, r4, lsl #16
85 orr r4, r4, r5, lsl #16
89 .Lno_insw_4: tst r2, #2
95 orr r3, r3, r4, lsl #16
99 .Lno_insw_2: tst r2, #1
105 ldmfd sp!, {r4, r5, r6, pc}