1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * linux/arch/arm/lib/io-writesw-armv4.S
5 * Copyright (C) 1995-2000 Russell King
7 #include <linux/linkage.h>
8 #include <asm/assembler.h>
22 .Loutsw_align: movs ip, r1, lsl #31
35 stmfd sp!, {r4, r5, lr}
40 .Loutsw_8_lp: ldmia r1!, {r3, r4, r5, ip}
48 .Lno_outsw_8: tst r2, #4
55 .Lno_outsw_4: movs r2, r2, lsl #31
61 .Lno_outsw_2: ldrhne r3, [r1]
64 ldmfd sp!, {r4, r5, pc}
67 #define pull_hbyte0 lsl #8
68 #define push_hbyte1 lsr #24
70 #define pull_hbyte0 lsr #24
71 #define push_hbyte1 lsl #8
75 ARM( ldr r3, [r1, -r3]! )
76 THUMB( rsb r3, r3, #0 )
77 THUMB( ldr r3, [r1, r3] )
86 2: mov ip, r3, pull_hbyte0
89 orr ip, ip, r3, push_hbyte1
94 3: movne ip, r3, lsr #8
97 ENDPROC(__raw_writesw)