1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm/lib/io-writesw-armv3.S
5 * Copyright (C) 1995-2000 Russell King
7 #include <linux/linkage.h>
8 #include <asm/assembler.h>
10 .Loutsw_bad_alignment:
11 adr r0, .Loutsw_bad_align_msg
14 .Loutsw_bad_align_msg:
15 .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
18 .Loutsw_align: tst r1, #1
19 bne .Loutsw_bad_alignment
25 orr r3, r3, r3, lsl #16
31 teq r2, #0 @ do we have to check for the zero len?
36 stmfd sp!, {r4, r5, r6, lr}
41 .Loutsw_8_lp: ldmia r1!, {r3, r4, r5, r6}
44 orr ip, ip, ip, lsr #16
48 orr ip, ip, ip, lsl #16
52 orr ip, ip, ip, lsr #16
56 orr ip, ip, ip, lsl #16
60 orr ip, ip, ip, lsr #16
64 orr ip, ip, ip, lsl #16
68 orr ip, ip, ip, lsr #16
72 orr ip, ip, ip, lsl #16
79 ldmfdeq sp!, {r4, r5, r6, pc}
81 .Lno_outsw_8: tst r2, #4
87 orr ip, ip, ip, lsr #16
91 orr ip, ip, ip, lsl #16
95 orr ip, ip, ip, lsr #16
99 orr ip, ip, ip, lsl #16
102 .Lno_outsw_4: tst r2, #2
108 orr ip, ip, ip, lsr #16
112 orr ip, ip, ip, lsl #16
115 .Lno_outsw_2: tst r2, #1
119 movne ip, r3, lsl #16
120 orrne ip, ip, ip, lsr #16
123 ldmfd sp!, {r4, r5, r6, pc}