ENTRY(__raw_readsl)
teq r2,
moveq pc, lr
ands ip, r1,
bne 3f
subs r2, r2,
bmi 2f
stmfd sp!, {r4, lr}
1: ldr r3, [r0,
ldr r4, [r0,
ldr ip, [r0,
ldr lr, [r0,
subs r2, r2,
stmia r1!, {r3, r4, ip, lr}
bpl 1b
ldmfd sp!, {r4, lr}
2: movs r2, r2, lsl
ldrcs r3, [r0,
ldrcs ip, [r0,
stmcsia r1!, {r3, ip}
ldrne r3, [r0,
strne r3, [r1,
mov pc, lr
3: ldr r3, [r0]
cmp ip,
mov ip, r3, get_byte_0
strb ip, [r1],
bgt 6f
mov ip, r3, get_byte_1
strb ip, [r1],
beq 5f
mov ip, r3, get_byte_2
strb ip, [r1],
4: subs r2, r2,
mov ip, r3, pull
ldrne r3, [r0]
orrne ip, ip, r3, push
strne ip, [r1],
bne 4b
b 8f
5: subs r2, r2,
mov ip, r3, pull
ldrne r3, [r0]
orrne ip, ip, r3, push
strne ip, [r1],
bne 5b
b 7f
6: subs r2, r2,
mov ip, r3, pull
ldrne r3, [r0]
orrne ip, ip, r3, push
strne ip, [r1],
bne 6b
mov r3, ip, get_byte_2
strb r3, [r1,
7: mov r3, ip, get_byte_1
strb r3, [r1,
8: mov r3, ip, get_byte_0
strb r3, [r1,
mov pc, lr
ENDPROC(__raw_readsl)