Bug 1943761 - Add class alignment to the mozsearch analysis file. r=asuth
[gecko.git] / other-licenses / 7zstub / src / Asm / arm / 7zCrcOpt.asm
blobf008d658c37234911c452ad756a3b1f8a80a6c3f
1 CODE32
3 EXPORT |CrcUpdateT4@16|
5 AREA |.text|, CODE, ARM
7 MACRO
8 CRC32_STEP_1
10 ldrb r4, [r1], #1
11 subs r2, r2, #1
12 eor r4, r4, r0
13 and r4, r4, #0xFF
14 ldr r4, [r3, +r4, lsl #2]
15 eor r0, r4, r0, lsr #8
17 MEND
20 MACRO
21 CRC32_STEP_4 $STREAM_WORD
23 eor r7, r7, r8
24 eor r7, r7, r9
25 eor r0, r0, r7
26 eor r0, r0, $STREAM_WORD
27 ldr $STREAM_WORD, [r1], #4
29 and r7, r0, #0xFF
30 and r8, r0, #0xFF00
31 and r9, r0, #0xFF0000
32 and r0, r0, #0xFF000000
34 ldr r7, [r6, +r7, lsl #2]
35 ldr r8, [r5, +r8, lsr #6]
36 ldr r9, [r4, +r9, lsr #14]
37 ldr r0, [r3, +r0, lsr #22]
39 MEND
42 |CrcUpdateT4@16| PROC
44 stmdb sp!, {r4-r11, lr}
45 cmp r2, #0
46 beq |$fin|
48 |$v1|
49 tst r1, #7
50 beq |$v2|
51 CRC32_STEP_1
52 bne |$v1|
54 |$v2|
55 cmp r2, #16
56 blo |$v3|
58 ldr r10, [r1], #4
59 ldr r11, [r1], #4
61 add r4, r3, #0x400
62 add r5, r3, #0x800
63 add r6, r3, #0xC00
65 mov r7, #0
66 mov r8, #0
67 mov r9, #0
69 sub r2, r2, #16
71 |$loop|
72 ; pld [r1, #0x40]
74 CRC32_STEP_4 r10
75 CRC32_STEP_4 r11
77 subs r2, r2, #8
78 bhs |$loop|
80 sub r1, r1, #8
81 add r2, r2, #16
83 eor r7, r7, r8
84 eor r7, r7, r9
85 eor r0, r0, r7
87 |$v3|
88 cmp r2, #0
89 beq |$fin|
91 |$v4|
92 CRC32_STEP_1
93 bne |$v4|
95 |$fin|
96 ldmia sp!, {r4-r11, pc}
98 |CrcUpdateT4@16| ENDP