notaz.gp2x.de
/
sdl_omap.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
a316597560cdf626211d3b7c23a8363fe40636d2
[sdl_omap.git]
/
arm_utils.s
1
@ vim:filetype=armasm
2
3
.global do_clut @ void *dest, void *src, unsigned short *pal, int count
4
5
do_clut:
6
stmfd sp!, {r4-r7,lr}
7
mov lr, #0xff
8
mov r3, r3, lsr #2
9
mov lr, lr, lsl #1
10
0:
11
ldr r7, [r1], #4
12
subs r3, r3, #1
13
and r4, lr, r7, lsl #1
14
and r5, lr, r7, lsr #7
15
and r6, lr, r7, lsr #15
16
and r7, lr, r7, lsr #23
17
ldrh r4, [r2, r4]
18
ldrh r5, [r2, r5]
19
ldrh r6, [r2, r6]
20
ldrh r7, [r2, r7]
21
orr r4, r4, r5, lsl #16
22
orr r6, r6, r7, lsl #16
23
stmia r0!, {r4,r6}
24
bne 0b
25
26
ldmfd sp!, {r4-r7,pc}
27