2 * linux/arch/arm26/lib/io-readsb.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>
14 .insb_align: rsb ip, ip, #4
28 teq r2, #0 @ do we have to check for the zero len?
33 .insb_aligned: stmfd sp!, {r4 - r6, lr}
38 .insb_16_lp: ldrb r3, [r0]
40 orr r3, r3, r4, lsl #8
42 orr r3, r3, r4, lsl #16
44 orr r3, r3, r4, lsl #24
47 orr r4, r4, r5, lsl #8
49 orr r4, r4, r5, lsl #16
51 orr r4, r4, r5, lsl #24
54 orr r5, r5, r6, lsl #8
56 orr r5, r5, r6, lsl #16
58 orr r5, r5, r6, lsl #24
61 orr r6, r6, ip, lsl #8
63 orr r6, r6, ip, lsl #16
65 orr r6, r6, ip, lsl #24
72 LOADREGS(eqfd, sp!, {r4 - r6, pc})
74 .insb_no_16: tst r2, #8
79 orr r3, r3, r4, lsl #8
81 orr r3, r3, r4, lsl #16
83 orr r3, r3, r4, lsl #24
86 orr r4, r4, r5, lsl #8
88 orr r4, r4, r5, lsl #16
90 orr r4, r4, r5, lsl #24
93 .insb_no_8: tst r2, #4
98 orr r3, r3, r4, lsl #8
100 orr r3, r3, r4, lsl #16
102 orr r3, r3, r4, lsl #24
105 .insb_no_4: ands r2, r2, #3
106 LOADREGS(eqfd, sp!, {r4 - r6, pc})
116 LOADREGS(fd, sp!, {r4 - r6, pc})