annotate armv4l/jrevdct_arm.S @ 4956:ea7519d7649f libavcodec

Factorize usum
author ramiro
date Wed, 09 May 2007 23:08:01 +0000
parents bfabfdf9ce55
children 316762ae96a7
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 :
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
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 */
fefaa96def6e arm specific code
glantau
parents:
diff changeset
27 #define FIX_0_298631336 2446
fefaa96def6e arm specific code
glantau
parents:
diff changeset
28 #define FIX_0_541196100 4433
fefaa96def6e arm specific code
glantau
parents:
diff changeset
29 #define FIX_0_765366865 6270
fefaa96def6e arm specific code
glantau
parents:
diff changeset
30 #define FIX_1_175875602 9633
fefaa96def6e arm specific code
glantau
parents:
diff changeset
31 #define FIX_1_501321110 12299
fefaa96def6e arm specific code
glantau
parents:
diff changeset
32 #define FIX_2_053119869 16819
fefaa96def6e arm specific code
glantau
parents:
diff changeset
33 #define FIX_3_072711026 25172
fefaa96def6e arm specific code
glantau
parents:
diff changeset
34 #define FIX_M_0_390180644 -3196
fefaa96def6e arm specific code
glantau
parents:
diff changeset
35 #define FIX_M_0_899976223 -7373
fefaa96def6e arm specific code
glantau
parents:
diff changeset
36 #define FIX_M_1_847759065 -15137
fefaa96def6e arm specific code
glantau
parents:
diff changeset
37 #define FIX_M_1_961570560 -16069
fefaa96def6e arm specific code
glantau
parents:
diff changeset
38 #define FIX_M_2_562915447 -20995
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
39 #define FIX_0xFFFF 0xFFFF
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
40
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
41 #define FIX_0_298631336_ID 0
fefaa96def6e arm specific code
glantau
parents:
diff changeset
42 #define FIX_0_541196100_ID 4
fefaa96def6e arm specific code
glantau
parents:
diff changeset
43 #define FIX_0_765366865_ID 8
fefaa96def6e arm specific code
glantau
parents:
diff changeset
44 #define FIX_1_175875602_ID 12
fefaa96def6e arm specific code
glantau
parents:
diff changeset
45 #define FIX_1_501321110_ID 16
fefaa96def6e arm specific code
glantau
parents:
diff changeset
46 #define FIX_2_053119869_ID 20
fefaa96def6e arm specific code
glantau
parents:
diff changeset
47 #define FIX_3_072711026_ID 24
fefaa96def6e arm specific code
glantau
parents:
diff changeset
48 #define FIX_M_0_390180644_ID 28
fefaa96def6e arm specific code
glantau
parents:
diff changeset
49 #define FIX_M_0_899976223_ID 32
fefaa96def6e arm specific code
glantau
parents:
diff changeset
50 #define FIX_M_1_847759065_ID 36
fefaa96def6e arm specific code
glantau
parents:
diff changeset
51 #define FIX_M_1_961570560_ID 40
fefaa96def6e arm specific code
glantau
parents:
diff changeset
52 #define FIX_M_2_562915447_ID 44
fefaa96def6e arm specific code
glantau
parents:
diff changeset
53 #define FIX_0xFFFF_ID 48
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
54 .text
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
55 .align
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
56
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
57 .global j_rev_dct_ARM
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
58 j_rev_dct_ARM:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
59 stmdb sp!, { r4 - r12, lr } @ all callee saved regs
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
60
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
61 sub sp, sp, #4 @ reserve some space on the stack
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
62 str r0, [ sp ] @ save the DCT pointer to the stack
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
63
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
64 mov lr, r0 @ lr = pointer to the current row
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
65 mov r12, #8 @ r12 = row-counter
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
66 add r11, pc, #(const_array-.-8) @ r11 = base pointer to the constants array
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
67 row_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
68 ldrsh r0, [lr, # 0] @ r0 = 'd0'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
69 ldrsh r1, [lr, # 8] @ r1 = 'd1'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
70
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
71 @ Optimization for row that have all items except the first set to 0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
72 @ (this works as the DCTELEMS are always 4-byte aligned)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
73 ldr r5, [lr, # 0]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
74 ldr r2, [lr, # 4]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
75 ldr r3, [lr, # 8]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
76 ldr r4, [lr, #12]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
77 orr r3, r3, r4
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
78 orr r3, r3, r2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
79 orrs r5, r3, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
80 beq end_of_row_loop @ nothing to be done as ALL of them are '0'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
81 orrs r2, r3, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
82 beq empty_row
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
83
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
84 ldrsh r2, [lr, # 2] @ r2 = 'd2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
85 ldrsh r4, [lr, # 4] @ r4 = 'd4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
86 ldrsh r6, [lr, # 6] @ r6 = 'd6'
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
87
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
88 ldr r3, [r11, #FIX_0_541196100_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
89 add r7, r2, r6
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
90 ldr r5, [r11, #FIX_M_1_847759065_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
91 mul r7, r3, r7 @ r7 = z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
92 ldr r3, [r11, #FIX_0_765366865_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
93 mla r6, r5, r6, r7 @ r6 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
94 add r5, r0, r4 @ r5 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
95 mla r2, r3, r2, r7 @ r2 = tmp3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
96 sub r3, r0, r4 @ r3 = tmp1
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
97
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
98 add r0, r2, r5, lsl #13 @ r0 = tmp10
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
99 rsb r2, r2, r5, lsl #13 @ r2 = tmp13
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
100 add r4, r6, r3, lsl #13 @ r4 = tmp11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
101 rsb r3, r6, r3, lsl #13 @ r3 = tmp12
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
102
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
103 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
104
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
105 ldrsh r3, [lr, #10] @ r3 = 'd3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
106 ldrsh r5, [lr, #12] @ r5 = 'd5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
107 ldrsh r7, [lr, #14] @ r7 = 'd7'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
108
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
109 add r0, r3, r5 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
110 add r2, r1, r7 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
111 add r4, r3, r7 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
112 add r6, r1, r5 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
113 ldr r9, [r11, #FIX_1_175875602_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
114 add r8, r4, r6 @ r8 = z3 + z4
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
115 ldr r10, [r11, #FIX_M_0_899976223_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
116 mul r8, r9, r8 @ r8 = 'z5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
117 ldr r9, [r11, #FIX_M_2_562915447_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
118 mul r2, r10, r2 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
119 ldr r10, [r11, #FIX_M_1_961570560_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
120 mul r0, r9, r0 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
121 ldr r9, [r11, #FIX_M_0_390180644_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
122 mla r4, r10, r4, r8 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
123 ldr r10, [r11, #FIX_0_298631336_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
124 mla r6, r9, r6, r8 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
125 ldr r9, [r11, #FIX_2_053119869_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
126 mla r7, r10, r7, r2 @ r7 = tmp0 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
127 ldr r10, [r11, #FIX_3_072711026_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
128 mla r5, r9, r5, r0 @ r5 = tmp1 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
129 ldr r9, [r11, #FIX_1_501321110_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
130 mla r3, r10, r3, r0 @ r3 = tmp2 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
131 add r7, r7, r4 @ r7 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
132 mla r1, r9, r1, r2 @ r1 = tmp3 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
133 add r5, r5, r6 @ r5 = tmp1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
134 add r3, r3, r4 @ r3 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
135 add r1, r1, r6 @ r1 = tmp3
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
136
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
137 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
138 @ r1 = tmp3 / r3 = tmp2 / r5 = tmp1 / r7 = tmp0
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
139
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
140 @ Compute DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
141 add r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
142 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
143 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
144 strh r8, [lr, # 0]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
145
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
146 @ Compute DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
147 sub r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
148 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
149 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
150 strh r8, [lr, #14]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
151
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
152 @ Compute DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
153 add r8, r6, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
154 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
155 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
156 strh r8, [lr, # 2]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
157
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
158 @ Compute DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
159 sub r8, r6, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
160 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
161 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
162 strh r8, [lr, #12]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
163
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
164 @ Compute DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
165 add r8, r4, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
166 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
167 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
168 strh r8, [lr, # 4]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
169
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
170 @ Compute DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
171 sub r8, r4, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
172 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
173 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
174 strh r8, [lr, #10]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
175
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
176 @ Compute DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
177 add r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
178 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
179 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
180 strh r8, [lr, # 6]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
181
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
182 @ Compute DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
183 sub r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
184 add r8, r8, #(1<<10)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
185 mov r8, r8, asr #11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
186 strh r8, [lr, # 8]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
187
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
188 @ End of row loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
189 add lr, lr, #16
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
190 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
191 bne row_loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
192 beq start_column_loop
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
193
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
194 empty_row:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
195 ldr r1, [r11, #FIX_0xFFFF_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
196 mov r0, r0, lsl #2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
197 and r0, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
198 add r0, r0, r0, lsl #16
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
199 str r0, [lr, # 0]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
200 str r0, [lr, # 4]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
201 str r0, [lr, # 8]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
202 str r0, [lr, #12]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
203
fefaa96def6e arm specific code
glantau
parents:
diff changeset
204 end_of_row_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
205 @ End of loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
206 add lr, lr, #16
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
207 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
208 bne row_loop
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
209
fefaa96def6e arm specific code
glantau
parents:
diff changeset
210 start_column_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
211 @ Start of column loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
212 ldr lr, [ sp ]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
213 mov r12, #8
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
214 column_loop:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
215 ldrsh r0, [lr, #( 0*8)] @ r0 = 'd0'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
216 ldrsh r2, [lr, #( 4*8)] @ r2 = 'd2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
217 ldrsh r4, [lr, #( 8*8)] @ r4 = 'd4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
218 ldrsh r6, [lr, #(12*8)] @ r6 = 'd6'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
219
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
220 ldr r3, [r11, #FIX_0_541196100_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
221 add r1, r2, r6
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
222 ldr r5, [r11, #FIX_M_1_847759065_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
223 mul r1, r3, r1 @ r1 = z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
224 ldr r3, [r11, #FIX_0_765366865_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
225 mla r6, r5, r6, r1 @ r6 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
226 add r5, r0, r4 @ r5 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
227 mla r2, r3, r2, r1 @ r2 = tmp3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
228 sub r3, r0, r4 @ r3 = tmp1
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
229
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
230 add r0, r2, r5, lsl #13 @ r0 = tmp10
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
231 rsb r2, r2, r5, lsl #13 @ r2 = tmp13
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
232 add r4, r6, r3, lsl #13 @ r4 = tmp11
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
233 rsb r6, r6, r3, lsl #13 @ r6 = tmp12
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
234
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
235 ldrsh r1, [lr, #( 2*8)] @ r1 = 'd1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
236 ldrsh r3, [lr, #( 6*8)] @ r3 = 'd3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
237 ldrsh r5, [lr, #(10*8)] @ r5 = 'd5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
238 ldrsh r7, [lr, #(14*8)] @ r7 = 'd7'
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
239
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
240 @ 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
241 orr r9, r1, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
242 orr r10, r5, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
243 orrs r10, r9, r10
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
244 beq empty_odd_column
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
245
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
246 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
247
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
248 add r0, r3, r5 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
249 add r2, r1, r7 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
250 add r4, r3, r7 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
251 add r6, r1, r5 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
252 ldr r9, [r11, #FIX_1_175875602_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
253 add r8, r4, r6
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
254 ldr r10, [r11, #FIX_M_0_899976223_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
255 mul r8, r9, r8 @ r8 = 'z5'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
256 ldr r9, [r11, #FIX_M_2_562915447_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
257 mul r2, r10, r2 @ r2 = 'z1'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
258 ldr r10, [r11, #FIX_M_1_961570560_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
259 mul r0, r9, r0 @ r0 = 'z2'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
260 ldr r9, [r11, #FIX_M_0_390180644_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
261 mla r4, r10, r4, r8 @ r4 = 'z3'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
262 ldr r10, [r11, #FIX_0_298631336_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
263 mla r6, r9, r6, r8 @ r6 = 'z4'
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
264 ldr r9, [r11, #FIX_2_053119869_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
265 mla r7, r10, r7, r2 @ r7 = tmp0 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
266 ldr r10, [r11, #FIX_3_072711026_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
267 mla r5, r9, r5, r0 @ r5 = tmp1 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
268 ldr r9, [r11, #FIX_1_501321110_ID]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
269 mla r3, r10, r3, r0 @ r3 = tmp2 + z2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
270 add r7, r7, r4 @ r7 = tmp0
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
271 mla r1, r9, r1, r2 @ r1 = tmp3 + z1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
272 add r5, r5, r6 @ r5 = tmp1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
273 add r3, r3, r4 @ r3 = tmp2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
274 add r1, r1, r6 @ r1 = tmp3
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
275
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
276 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
277 @ r1 = tmp3 / r3 = tmp2 / r5 = tmp1 / r7 = tmp0
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
278
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
279 @ Compute DESCALE(tmp10 + tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
280 add r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
281 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
282 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
283 strh r8, [lr, #( 0*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
284
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
285 @ Compute DESCALE(tmp10 - tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
286 sub r8, r0, r1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
287 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
288 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
289 strh r8, [lr, #(14*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
290
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
291 @ Compute DESCALE(tmp11 + tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
292 add r8, r4, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
293 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
294 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
295 strh r8, [lr, #( 2*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
296
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
297 @ Compute DESCALE(tmp11 - tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
298 sub r8, r4, r3
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
299 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
300 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
301 strh r8, [lr, #(12*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
302
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
303 @ Compute DESCALE(tmp12 + tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
304 add r8, r6, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
305 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
306 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
307 strh r8, [lr, #( 4*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
308
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
309 @ Compute DESCALE(tmp12 - tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
310 sub r8, r6, r5
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
311 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
312 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
313 strh r8, [lr, #(10*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
314
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
315 @ Compute DESCALE(tmp13 + tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
316 add r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
317 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
318 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
319 strh r8, [lr, #( 6*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
320
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
321 @ Compute DESCALE(tmp13 - tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
322 sub r8, r2, r7
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
323 add r8, r8, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
324 mov r8, r8, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
325 strh r8, [lr, #( 8*8)]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
326
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
327 @ End of row loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
328 add lr, lr, #2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
329 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
330 bne column_loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
331 beq the_end
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
332
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
333 empty_odd_column:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
334 @ Compute DESCALE(tmp10 + tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
335 @ Compute DESCALE(tmp10 - tmp3, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
336 add r0, r0, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
337 mov r0, r0, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
338 strh r0, [lr, #( 0*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
339 strh r0, [lr, #(14*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
340
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
341 @ Compute DESCALE(tmp11 + tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
342 @ Compute DESCALE(tmp11 - tmp2, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
343 add r4, r4, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
344 mov r4, r4, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
345 strh r4, [lr, #( 2*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
346 strh r4, [lr, #(12*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
347
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
348 @ Compute DESCALE(tmp12 + tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
349 @ Compute DESCALE(tmp12 - tmp1, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
350 add r6, r6, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
351 mov r6, r6, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
352 strh r6, [lr, #( 4*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
353 strh r6, [lr, #(10*8)]
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
354
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
355 @ Compute DESCALE(tmp13 + tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
356 @ Compute DESCALE(tmp13 - tmp0, CONST_BITS+PASS1_BITS+3)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
357 add r2, r2, #(1<<17)
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
358 mov r2, r2, asr #18
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
359 strh r2, [lr, #( 6*8)]
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
360 strh r2, [lr, #( 8*8)]
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
361
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
362 @ End of row loop
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
363 add lr, lr, #2
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
364 subs r12, r12, #1
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
365 bne column_loop
2967
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
366
ef2149182f1c COSMETICS: Remove all trailing whitespace.
diego
parents: 61
diff changeset
367 the_end:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
368 @ The end....
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
369 add sp, sp, #4
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
370 ldmia sp!, { r4 - r12, pc } @ restore callee saved regs and return
61
fefaa96def6e arm specific code
glantau
parents:
diff changeset
371
fefaa96def6e arm specific code
glantau
parents:
diff changeset
372 const_array:
2979
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
373 .align
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
374 .word FIX_0_298631336
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
375 .word FIX_0_541196100
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
376 .word FIX_0_765366865
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
377 .word FIX_1_175875602
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
378 .word FIX_1_501321110
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
379 .word FIX_2_053119869
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
380 .word FIX_3_072711026
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
381 .word FIX_M_0_390180644
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
382 .word FIX_M_0_899976223
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
383 .word FIX_M_1_847759065
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
384 .word FIX_M_1_961570560
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
385 .word FIX_M_2_562915447
bfabfdf9ce55 COSMETICS: tabs --> spaces, some prettyprinting
diego
parents: 2967
diff changeset
386 .word FIX_0xFFFF