annotate arm/jrevdct_arm.S @ 11982:669bf7f6c986 libavcodec

Change type of zz_table to uint8_t to match the scantables it points to.
author reimar
date Sun, 27 Jun 2010 19:27:08 +0000
parents a6ff6fb10ff5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
1 /*
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
2 C-like prototype :
10374
a6ff6fb10ff5 ARM: make function names all-lowercase
mru
parents: 10363
diff changeset
3 void j_rev_dct_arm(DCTBLOCK data)
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
4
fefaa96def6e arm specific code
glantau
parents:
diff changeset
5 With DCTBLOCK being a pointer to an array of 64 'signed shorts'
fefaa96def6e arm specific code
glantau
parents:
diff changeset
6
fefaa96def6e arm specific code
glantau
parents:
diff changeset
7 Copyright (c) 2001 Lionel Ulmer (lionel.ulmer@free.fr / bbrox@bbrox.org)
fefaa96def6e arm specific code
glantau
parents:
diff changeset
8
fefaa96def6e arm specific code
glantau
parents:
diff changeset
9 Permission is hereby granted, free of charge, to any person obtaining a copy
fefaa96def6e arm specific code
glantau
parents:
diff changeset
10 of this software and associated documentation files (the "Software"), to deal
fefaa96def6e arm specific code
glantau
parents:
diff changeset
11 in the Software without restriction, including without limitation the rights
fefaa96def6e arm specific code
glantau
parents:
diff changeset
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
fefaa96def6e arm specific code
glantau
parents:
diff changeset
13 copies of the Software, and to permit persons to whom the Software is
fefaa96def6e arm specific code
glantau
parents:
diff changeset
14 furnished to do so, subject to the following conditions:
fefaa96def6e arm specific code
glantau
parents:
diff changeset
15
fefaa96def6e arm specific code
glantau
parents:
diff changeset
16 The above copyright notice and this permission notice shall be included in
fefaa96def6e arm specific code
glantau
parents:
diff changeset
17 all copies or substantial portions of the Software.
fefaa96def6e arm specific code
glantau
parents:
diff changeset
18
fefaa96def6e arm specific code
glantau
parents:
diff changeset
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
fefaa96def6e arm specific code
glantau
parents:
diff changeset
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
fefaa96def6e arm specific code
glantau
parents:
diff changeset
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
fefaa96def6e arm specific code
glantau
parents:
diff changeset
22 COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
fefaa96def6e arm specific code
glantau
parents:
diff changeset
23 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
fefaa96def6e arm specific code
glantau
parents:
diff changeset
24 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
25
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
26 */
8069
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 2979
diff changeset
27
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 2979
diff changeset
28 #include "asm.S"
316762ae96a7 ARM: use new macros for assembler function labels
mru
parents: 2979
diff changeset
29
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
30 #define FIX_0_298631336 2446
fefaa96def6e arm specific code
glantau
parents:
diff changeset
31 #define FIX_0_541196100 4433
fefaa96def6e arm specific code
glantau
parents:
diff changeset
32 #define FIX_0_765366865 6270
fefaa96def6e arm specific code
glantau
parents:
diff changeset
33 #define FIX_1_175875602 9633
fefaa96def6e arm specific code
glantau
parents:
diff changeset
34 #define FIX_1_501321110 12299
fefaa96def6e arm specific code
glantau
parents:
diff changeset
35 #define FIX_2_053119869 16819
fefaa96def6e arm specific code
glantau
parents:
diff changeset
36 #define FIX_3_072711026 25172
fefaa96def6e arm specific code
glantau
parents:
diff changeset
37 #define FIX_M_0_390180644 -3196
fefaa96def6e arm specific code
glantau
parents:
diff changeset
38 #define FIX_M_0_899976223 -7373
fefaa96def6e arm specific code
glantau
parents:
diff changeset
39 #define FIX_M_1_847759065 -15137
fefaa96def6e arm specific code
glantau
parents:
diff changeset
40 #define FIX_M_1_961570560 -16069
fefaa96def6e arm specific code
glantau
parents:
diff changeset
41 #define FIX_M_2_562915447 -20995
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
42 #define FIX_0xFFFF 0xFFFF
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
43
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
44 #define FIX_0_298631336_ID 0
fefaa96def6e arm specific code
glantau
parents:
diff changeset
45 #define FIX_0_541196100_ID 4
fefaa96def6e arm specific code
glantau
parents:
diff changeset
46 #define FIX_0_765366865_ID 8
fefaa96def6e arm specific code
glantau
parents:
diff changeset
47 #define FIX_1_175875602_ID 12
fefaa96def6e arm specific code
glantau
parents:
diff changeset
48 #define FIX_1_501321110_ID 16
fefaa96def6e arm specific code
glantau
parents:
diff changeset
49 #define FIX_2_053119869_ID 20
fefaa96def6e arm specific code
glantau
parents:
diff changeset
50 #define FIX_3_072711026_ID 24
fefaa96def6e arm specific code
glantau
parents:
diff changeset
51 #define FIX_M_0_390180644_ID 28
fefaa96def6e arm specific code
glantau
parents:
diff changeset
52 #define FIX_M_0_899976223_ID 32
fefaa96def6e arm specific code
glantau
parents:
diff changeset
53 #define FIX_M_1_847759065_ID 36
fefaa96def6e arm specific code
glantau
parents:
diff changeset
54 #define FIX_M_1_961570560_ID 40
fefaa96def6e arm specific code
glantau
parents:
diff changeset
55 #define FIX_M_2_562915447_ID 44
fefaa96def6e arm specific code
glantau
parents:
diff changeset
56 #define FIX_0xFFFF_ID 48
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
57 .text
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
58 .align
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
59
10374
a6ff6fb10ff5 ARM: make function names all-lowercase
mru
parents: 10363
diff changeset
60 function ff_j_rev_dct_arm, export=1
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
61 stmdb sp!, { r4 - r12, lr } @ all callee saved regs
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
62
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
63 sub sp, sp, #4 @ reserve some space on the stack
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
64 str r0, [ sp ] @ save the DCT pointer to the stack
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
65
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
66 mov lr, r0 @ lr = pointer to the current row
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
67 mov r12, #8 @ r12 = row-counter
10350
989ea69f6a4e ARM: use plain labels for pc-relative addressing
mru
parents: 8359
diff changeset
68 adr r11, const_array @ r11 = base pointer to the constants array
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
69 row_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
70 ldrsh r0, [lr, # 0] @ r0 = 'd0'
8130
c45366b01126 ARM: fix j_rev_dct_ARM
mru
parents: 8069
diff changeset
71 ldrsh r2, [lr, # 2] @ r2 = 'd2'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
72
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
73 @ Optimization for row that have all items except the first set to 0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
74 @ (this works as the DCTELEMS are always 4-byte aligned)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
75 ldr r5, [lr, # 0]
8130
c45366b01126 ARM: fix j_rev_dct_ARM
mru
parents: 8069
diff changeset
76 ldr r6, [lr, # 4]
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
77 ldr r3, [lr, # 8]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
78 ldr r4, [lr, #12]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
79 orr r3, r3, r4
8130
c45366b01126 ARM: fix j_rev_dct_ARM
mru
parents: 8069
diff changeset
80 orr r3, r3, r6
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
81 orrs r5, r3, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
82 beq end_of_row_loop @ nothing to be done as ALL of them are '0'
8130
c45366b01126 ARM: fix j_rev_dct_ARM
mru
parents: 8069
diff changeset
83 orrs r3, r3, r2
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
84 beq empty_row
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
85
8130
c45366b01126 ARM: fix j_rev_dct_ARM
mru
parents: 8069
diff changeset
86 ldrsh r1, [lr, # 8] @ r1 = 'd1'
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
87 ldrsh r4, [lr, # 4] @ r4 = 'd4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
88 ldrsh r6, [lr, # 6] @ r6 = 'd6'
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
89
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
90 ldr r3, [r11, #FIX_0_541196100_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
91 add r7, r2, r6
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
92 ldr r5, [r11, #FIX_M_1_847759065_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
93 mul r7, r3, r7 @ r7 = z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
94 ldr r3, [r11, #FIX_0_765366865_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
95 mla r6, r5, r6, r7 @ r6 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
96 add r5, r0, r4 @ r5 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
97 mla r2, r3, r2, r7 @ r2 = tmp3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
98 sub r3, r0, r4 @ r3 = tmp1
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
99
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
100 add r0, r2, r5, lsl #13 @ r0 = tmp10
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
101 rsb r2, r2, r5, lsl #13 @ r2 = tmp13
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
102 add r4, r6, r3, lsl #13 @ r4 = tmp11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
103 rsb r3, r6, r3, lsl #13 @ r3 = tmp12
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
104
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
105 stmdb sp!, { r0, r2, r3, r4 } @ save on the stack tmp10, tmp13, tmp12, tmp11
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
106
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
107 ldrsh r3, [lr, #10] @ r3 = 'd3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
108 ldrsh r5, [lr, #12] @ r5 = 'd5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
109 ldrsh r7, [lr, #14] @ r7 = 'd7'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
110
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
111 add r0, r3, r5 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
112 add r2, r1, r7 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
113 add r4, r3, r7 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
114 add r6, r1, r5 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
115 ldr r9, [r11, #FIX_1_175875602_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
116 add r8, r4, r6 @ r8 = z3 + z4
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
117 ldr r10, [r11, #FIX_M_0_899976223_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
118 mul r8, r9, r8 @ r8 = 'z5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
119 ldr r9, [r11, #FIX_M_2_562915447_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
120 mul r2, r10, r2 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
121 ldr r10, [r11, #FIX_M_1_961570560_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
122 mul r0, r9, r0 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
123 ldr r9, [r11, #FIX_M_0_390180644_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
124 mla r4, r10, r4, r8 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
125 ldr r10, [r11, #FIX_0_298631336_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
126 mla r6, r9, r6, r8 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
127 ldr r9, [r11, #FIX_2_053119869_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
128 mla r7, r10, r7, r2 @ r7 = tmp0 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
129 ldr r10, [r11, #FIX_3_072711026_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
130 mla r5, r9, r5, r0 @ r5 = tmp1 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
131 ldr r9, [r11, #FIX_1_501321110_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
132 mla r3, r10, r3, r0 @ r3 = tmp2 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
133 add r7, r7, r4 @ r7 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
134 mla r1, r9, r1, r2 @ r1 = tmp3 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
135 add r5, r5, r6 @ r5 = tmp1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
136 add r3, r3, r4 @ r3 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
137 add r1, r1, r6 @ r1 = tmp3
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
138
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
139 ldmia sp!, { r0, r2, r4, r6 } @ r0 = tmp10 / r2 = tmp13 / r4 = tmp12 / r6 = tmp11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
140 @ r1 = tmp3 / r3 = tmp2 / r5 = tmp1 / r7 = tmp0
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
141
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
142 @ Compute DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
143 add r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
144 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
145 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
146 strh r8, [lr, # 0]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
147
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
148 @ Compute DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
149 sub r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
150 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
151 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
152 strh r8, [lr, #14]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
153
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
154 @ Compute DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
155 add r8, r6, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
156 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
157 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
158 strh r8, [lr, # 2]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
159
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
160 @ Compute DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
161 sub r8, r6, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
162 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
163 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
164 strh r8, [lr, #12]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
165
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
166 @ Compute DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
167 add r8, r4, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
168 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
169 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
170 strh r8, [lr, # 4]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
171
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
172 @ Compute DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
173 sub r8, r4, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
174 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
175 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
176 strh r8, [lr, #10]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
177
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
178 @ Compute DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
179 add r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
180 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
181 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
182 strh r8, [lr, # 6]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
183
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
184 @ Compute DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
185 sub r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
186 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
187 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
188 strh r8, [lr, # 8]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
189
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
190 @ End of row loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
191 add lr, lr, #16
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
192 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
193 bne row_loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
194 beq start_column_loop
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
195
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
196 empty_row:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
197 ldr r1, [r11, #FIX_0xFFFF_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
198 mov r0, r0, lsl #2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
199 and r0, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
200 add r0, r0, r0, lsl #16
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
201 str r0, [lr, # 0]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
202 str r0, [lr, # 4]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
203 str r0, [lr, # 8]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
204 str r0, [lr, #12]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
205
fefaa96def6e arm specific code
glantau
parents:
diff changeset
206 end_of_row_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
207 @ End of loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
208 add lr, lr, #16
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
209 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
210 bne row_loop
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
211
fefaa96def6e arm specific code
glantau
parents:
diff changeset
212 start_column_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
213 @ Start of column loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
214 ldr lr, [ sp ]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
215 mov r12, #8
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
216 column_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
217 ldrsh r0, [lr, #( 0*8)] @ r0 = 'd0'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
218 ldrsh r2, [lr, #( 4*8)] @ r2 = 'd2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
219 ldrsh r4, [lr, #( 8*8)] @ r4 = 'd4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
220 ldrsh r6, [lr, #(12*8)] @ r6 = 'd6'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
221
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
222 ldr r3, [r11, #FIX_0_541196100_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
223 add r1, r2, r6
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
224 ldr r5, [r11, #FIX_M_1_847759065_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
225 mul r1, r3, r1 @ r1 = z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
226 ldr r3, [r11, #FIX_0_765366865_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
227 mla r6, r5, r6, r1 @ r6 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
228 add r5, r0, r4 @ r5 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
229 mla r2, r3, r2, r1 @ r2 = tmp3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
230 sub r3, r0, r4 @ r3 = tmp1
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
231
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
232 add r0, r2, r5, lsl #13 @ r0 = tmp10
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
233 rsb r2, r2, r5, lsl #13 @ r2 = tmp13
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
234 add r4, r6, r3, lsl #13 @ r4 = tmp11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
235 rsb r6, r6, r3, lsl #13 @ r6 = tmp12
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
236
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
237 ldrsh r1, [lr, #( 2*8)] @ r1 = 'd1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
238 ldrsh r3, [lr, #( 6*8)] @ r3 = 'd3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
239 ldrsh r5, [lr, #(10*8)] @ r5 = 'd5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
240 ldrsh r7, [lr, #(14*8)] @ r7 = 'd7'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
241
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
242 @ Check for empty odd column (happens about 20 to 25 % of the time according to my stats)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
243 orr r9, r1, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
244 orr r10, r5, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
245 orrs r10, r9, r10
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
246 beq empty_odd_column
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
247
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
248 stmdb sp!, { r0, r2, r4, r6 } @ save on the stack tmp10, tmp13, tmp12, tmp11
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
249
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
250 add r0, r3, r5 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
251 add r2, r1, r7 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
252 add r4, r3, r7 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
253 add r6, r1, r5 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
254 ldr r9, [r11, #FIX_1_175875602_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
255 add r8, r4, r6
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
256 ldr r10, [r11, #FIX_M_0_899976223_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
257 mul r8, r9, r8 @ r8 = 'z5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
258 ldr r9, [r11, #FIX_M_2_562915447_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
259 mul r2, r10, r2 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
260 ldr r10, [r11, #FIX_M_1_961570560_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
261 mul r0, r9, r0 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
262 ldr r9, [r11, #FIX_M_0_390180644_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
263 mla r4, r10, r4, r8 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
264 ldr r10, [r11, #FIX_0_298631336_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
265 mla r6, r9, r6, r8 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
266 ldr r9, [r11, #FIX_2_053119869_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
267 mla r7, r10, r7, r2 @ r7 = tmp0 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
268 ldr r10, [r11, #FIX_3_072711026_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
269 mla r5, r9, r5, r0 @ r5 = tmp1 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
270 ldr r9, [r11, #FIX_1_501321110_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
271 mla r3, r10, r3, r0 @ r3 = tmp2 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
272 add r7, r7, r4 @ r7 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
273 mla r1, r9, r1, r2 @ r1 = tmp3 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
274 add r5, r5, r6 @ r5 = tmp1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
275 add r3, r3, r4 @ r3 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
276 add r1, r1, r6 @ r1 = tmp3
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
277
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
278 ldmia sp!, { r0, r2, r4, r6 } @ r0 = tmp10 / r2 = tmp13 / r4 = tmp11 / r6 = tmp12
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
279 @ r1 = tmp3 / r3 = tmp2 / r5 = tmp1 / r7 = tmp0
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
280
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
281 @ Compute DESCALE(tmp10 + tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
282 add r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
283 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
284 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
285 strh r8, [lr, #( 0*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
286
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
287 @ Compute DESCALE(tmp10 - tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
288 sub r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
289 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
290 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
291 strh r8, [lr, #(14*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
292
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
293 @ Compute DESCALE(tmp11 + tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
294 add r8, r4, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
295 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
296 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
297 strh r8, [lr, #( 2*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
298
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
299 @ Compute DESCALE(tmp11 - tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
300 sub r8, r4, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
301 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
302 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
303 strh r8, [lr, #(12*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
304
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
305 @ Compute DESCALE(tmp12 + tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
306 add r8, r6, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
307 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
308 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
309 strh r8, [lr, #( 4*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
310
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
311 @ Compute DESCALE(tmp12 - tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
312 sub r8, r6, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
313 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
314 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
315 strh r8, [lr, #(10*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
316
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
317 @ Compute DESCALE(tmp13 + tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
318 add r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
319 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
320 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
321 strh r8, [lr, #( 6*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
322
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
323 @ Compute DESCALE(tmp13 - tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
324 sub r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
325 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
326 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
327 strh r8, [lr, #( 8*8)]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
328
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
329 @ End of row loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
330 add lr, lr, #2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
331 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
332 bne column_loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
333 beq the_end
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
334
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
335 empty_odd_column:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
336 @ Compute DESCALE(tmp10 + tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
337 @ Compute DESCALE(tmp10 - tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
338 add r0, r0, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
339 mov r0, r0, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
340 strh r0, [lr, #( 0*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
341 strh r0, [lr, #(14*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
342
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
343 @ Compute DESCALE(tmp11 + tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
344 @ Compute DESCALE(tmp11 - tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
345 add r4, r4, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
346 mov r4, r4, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
347 strh r4, [lr, #( 2*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
348 strh r4, [lr, #(12*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
349
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
350 @ Compute DESCALE(tmp12 + tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
351 @ Compute DESCALE(tmp12 - tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
352 add r6, r6, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
353 mov r6, r6, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
354 strh r6, [lr, #( 4*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
355 strh r6, [lr, #(10*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
356
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
357 @ Compute DESCALE(tmp13 + tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
358 @ Compute DESCALE(tmp13 - tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
359 add r2, r2, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
360 mov r2, r2, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
361 strh r2, [lr, #( 6*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
362 strh r2, [lr, #( 8*8)]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
363
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
364 @ End of row loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
365 add lr, lr, #2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
366 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
367 bne column_loop
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
368
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
369 the_end:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
370 @ The end....
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
371 add sp, sp, #4
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
372 ldmia sp!, { r4 - r12, pc } @ restore callee saved regs and return
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
373
fefaa96def6e arm specific code
glantau
parents:
diff changeset
374 const_array:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
375 .align
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
376 .word FIX_0_298631336
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
377 .word FIX_0_541196100
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
378 .word FIX_0_765366865
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
379 .word FIX_1_175875602
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
380 .word FIX_1_501321110
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
381 .word FIX_2_053119869
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
382 .word FIX_3_072711026
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
383 .word FIX_M_0_390180644
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
384 .word FIX_M_0_899976223
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
385 .word FIX_M_1_847759065
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
386 .word FIX_M_1_961570560
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
387 .word FIX_M_2_562915447
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
388 .word FIX_0xFFFF