Commit | Line | Data |
---|---|---|
8df55cb8 CM |
1 | \r |
2 | .EXTERN MY_LABEL2;\r | |
3 | .section .text;\r | |
4 | \r | |
5 | //\r | |
6 | //13 VIDEO PIXEL OPERATIONS\r | |
7 | //\r | |
8 | \r | |
9 | //Dreg = ALIGN8 ( Dreg, Dreg ) ; /* overlay 1 byte (b) */\r | |
10 | R0 = ALIGN8(R0, R0);\r | |
11 | R0 = ALIGN8(R0, R1);\r | |
12 | R0 = ALIGN8(R1, R0);\r | |
13 | R0 = ALIGN8(R1, R1);\r | |
14 | R0 = ALIGN8(R1, R2);\r | |
15 | R3 = ALIGN8(R4, R5);\r | |
16 | R6 = ALIGN8(R7, R0);\r | |
17 | R1 = ALIGN8(R2, R3);\r | |
18 | R4 = ALIGN8(R5, R6);\r | |
19 | R7 = ALIGN8(R0, R1);\r | |
20 | R2 = ALIGN8(R3, R4);\r | |
21 | R5 = ALIGN8(R6, R7);\r | |
22 | \r | |
23 | //Dreg = ALIGN16 ( Dreg, Dreg ) ; /* overlay 2 bytes (b) */\r | |
24 | R0 = ALIGN16(R0, R0);\r | |
25 | R0 = ALIGN16(R0, R1);\r | |
26 | R0 = ALIGN16(R1, R0);\r | |
27 | R0 = ALIGN16(R1, R1);\r | |
28 | R0 = ALIGN16(R1, R2);\r | |
29 | R3 = ALIGN16(R4, R5);\r | |
30 | R6 = ALIGN16(R7, R0);\r | |
31 | R1 = ALIGN16(R2, R3);\r | |
32 | R4 = ALIGN16(R5, R6);\r | |
33 | R7 = ALIGN16(R0, R1);\r | |
34 | R2 = ALIGN16(R3, R4);\r | |
35 | R5 = ALIGN16(R6, R7);\r | |
36 | \r | |
37 | //Dreg = ALIGN24 ( Dreg, Dreg ) ; /* overlay 3 bytes (b) */\r | |
38 | R0 = ALIGN24(R0, R0);\r | |
39 | R0 = ALIGN24(R0, R1);\r | |
40 | R0 = ALIGN24(R1, R0);\r | |
41 | R0 = ALIGN24(R1, R1);\r | |
42 | R0 = ALIGN24(R1, R2);\r | |
43 | R3 = ALIGN24(R4, R5);\r | |
44 | R6 = ALIGN24(R7, R0);\r | |
45 | R1 = ALIGN24(R2, R3);\r | |
46 | R4 = ALIGN24(R5, R6);\r | |
47 | R7 = ALIGN24(R0, R1);\r | |
48 | R2 = ALIGN24(R3, R4);\r | |
49 | R5 = ALIGN24(R6, R7);\r | |
50 | \r | |
51 | DISALGNEXCPT ; /* (b) */\r | |
52 | \r | |
53 | /* forward byte order operands */\r | |
54 | //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (LO) ; /* sum into low bytes (b) */\r | |
55 | //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (HI) ; /* sum into high bytes (b) */\r | |
56 | /* reverse byte order operands */\r | |
57 | //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (LO, R) ; /* sum into low bytes (b) */\r | |
58 | //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (HI, R) ; /* sum into high bytes (b) */\r | |
59 | \r | |
60 | r0 = byteop3p (r1:0, r3:2) (lo) ;\r | |
61 | r1 = byteop3p (r1:0, r3:2) (hi) ;\r | |
62 | r2 = byteop3p (r1:0, r3:2) (lo, r) ;\r | |
63 | r3 = byteop3p (r1:0, r3:2) (hi, r) ;\r | |
64 | r4 = byteop3p (r3:2, r1:0) (lo) ;\r | |
65 | r5 = byteop3p (r3:2, r1:0) (hi) ;\r | |
66 | r6 = byteop3p (r3:2, r1:0) (lo, r) ;\r | |
67 | r7 = byteop3p (r3:2, r1:0) (hi, r) ;\r | |
68 | \r | |
69 | //Dreg = A1.L + A1.H, Dreg = A0.L + A0.H ; /* (b) */\r | |
70 | \r | |
71 | R0 = A1.L + A1.H, R0= A0.L + A0.H ;\r | |
72 | R0 = A1.L + A1.H, R1= A0.L + A0.H ;\r | |
73 | R2 = A1.L + A1.H, R3= A0.L + A0.H ;\r | |
74 | R4 = A1.L + A1.H, R5= A0.L + A0.H ;\r | |
75 | R6 = A1.L + A1.H, R7= A0.L + A0.H ;\r | |
76 | \r | |
77 | /* forward byte order operands */\r | |
78 | //( Dreg, Dreg ) = BYTEOP16P ( Dreg_pair, Dreg_pair ) ; /* (b) */\r | |
79 | (r7,r0) = BYTEOP16P ( r3:2,r1:0 ) ;\r | |
80 | (r1,r2) = byteop16p (r3:2,r1:0) ;\r | |
81 | (r0,r1) = BYTEOP16P ( r3:2,r1:0 ) ;\r | |
82 | (r2,r3) = byteop16p (r3:2,r1:0) ;\r | |
83 | (r7,r0) = BYTEOP16P (r1:0, r3:2) ;\r | |
84 | (r1,r2) = byteop16p (r1:0,r3:2) ;\r | |
85 | (r0,r1) = BYTEOP16P (r1:0, r3:2) ;\r | |
86 | (r2,r3) = byteop16p (r1:0,r3:2) ;\r | |
87 | \r | |
88 | /* reverse byte order operands */\r | |
89 | //( Dreg, Dreg ) = BYTEOP16P ( Dreg_pair, Dreg_pair ) (R); /* (b) */\r | |
90 | (r7,r0) = BYTEOP16P ( r3:2,r1:0 )(r) ;\r | |
91 | (r1,r2) = byteop16p (r3:2,r1:0)(r) ;\r | |
92 | (r0,r1) = BYTEOP16P ( r3:2,r1:0 )(r) ;\r | |
93 | (r2,r3) = byteop16p (r3:2,r1:0)(r) ;\r | |
94 | (r7,r0) = BYTEOP16P (r1:0, r3:2)(r) ;\r | |
95 | (r1,r2) = byteop16p (r1:0,r3:2)(r) ;\r | |
96 | (r0,r1) = BYTEOP16P (r1:0, r3:2)(r) ;\r | |
97 | (r2,r3) = byteop16p (r1:0,r3:2)(r) ;\r | |
98 | \r | |
99 | /* forward byte order operands */\r | |
100 | //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) ; /* (b) */\r | |
101 | //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) (T) ; /* truncated (b)*/\r | |
102 | /* reverse byte order operands */\r | |
103 | //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) (R) ; /* (b) */\r | |
104 | //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) (T, R) ; /* truncated (b) */ \r | |
105 | \r | |
106 | r3 = byteop1p (r1:0, r3:2) ;\r | |
107 | r3 = byteop1p (r1:0, r3:2) (r) ;\r | |
108 | r3 = byteop1p (r1:0, r3:2) (t) ;\r | |
109 | r3 = byteop1p (r1:0, r3:2) (t,r) ;\r | |
110 | \r | |
111 | r0 = byteop1p (r3:2,r1:0);\r | |
112 | r1 = byteop1p (r3:2,r1:0)(r) ;\r | |
113 | r2 = byteop1p (r3:2,r1:0)(t) ;\r | |
114 | r3 = byteop1p (r3:2,r1:0)(t,r) ;\r | |
115 | \r | |
116 | /* forward byte order operands */\r | |
117 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDL) ;\r | |
118 | /* round into low bytes (b) */\r | |
119 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDH) ;\r | |
120 | /* round into high bytes (b) */\r | |
121 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TL) ;\r | |
122 | /* truncate into low bytes (b) */\r | |
123 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TH) ;\r | |
124 | /* truncate into high bytes (b) */\r | |
125 | /* reverse byte order operands */\r | |
126 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDL, R) ;\r | |
127 | /* round into low bytes (b) */\r | |
128 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDH, R) ;\r | |
129 | /* round into high bytes (b) */\r | |
130 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TL, R) ;\r | |
131 | /* truncate into low bytes (b) */\r | |
132 | //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TH, R) ;\r | |
133 | /* truncate into high bytes (b) */\r | |
134 | \r | |
135 | r3 = byteop2p (r1:0, r3:2) (rndl) ;\r | |
136 | r3 = byteop2p (r1:0, r3:2) (rndh) ;\r | |
137 | r3 = byteop2p (r1:0, r3:2) (tl) ;\r | |
138 | r3 = byteop2p (r1:0, r3:2) (th) ;\r | |
139 | r3 = byteop2p (r1:0, r3:2) (rndl, r) ;\r | |
140 | r3 = byteop2p (r1:0, r3:2) (rndh, r) ;\r | |
141 | r3 = byteop2p (r1:0, r3:2) (tl, r) ;\r | |
142 | r3 = byteop2p (r1:0, r3:2) (th, r) ;\r | |
143 | \r | |
144 | r0 = byteop2p (r1:0, r3:2) (rndl) ;\r | |
145 | r1 = byteop2p (r1:0, r3:2) (rndh) ;\r | |
146 | r2 = byteop2p (r1:0, r3:2) (tl) ;\r | |
147 | r3 = byteop2p (r1:0, r3:2) (th) ;\r | |
148 | r4 = byteop2p (r1:0, r3:2) (rndl, r) ;\r | |
149 | r5 = byteop2p (r1:0, r3:2) (rndh, r) ;\r | |
150 | r6 = byteop2p (r1:0, r3:2) (tl, r) ;\r | |
151 | r7 = byteop2p (r1:0, r3:2) (th, r) ;\r | |
152 | \r | |
153 | r0 = byteop2p (r3:2, r3:2) (rndl) ;\r | |
154 | r1 = byteop2p (r3:2, r3:2) (rndh) ;\r | |
155 | r2 = byteop2p (r3:2, r3:2) (tl) ;\r | |
156 | r3 = byteop2p (r3:2, r3:2) (th) ;\r | |
157 | r4 = byteop2p (r3:2, r3:2) (rndl, r) ;\r | |
158 | r5 = byteop2p (r3:2, r3:2) (rndh, r) ;\r | |
159 | r6 = byteop2p (r3:2, r3:2) (tl, r) ;\r | |
160 | r7 = byteop2p (r3:2, r3:2) (th, r) ;\r | |
161 | \r | |
162 | //Dreg = BYTEPACK ( Dreg, Dreg ) ; /* (b) */\r | |
163 | r0 = bytepack (r0,r0) ;\r | |
164 | r1 = bytepack (r2,r3) ;\r | |
165 | r4 = bytepack (r5,r6) ;\r | |
166 | r7 = bytepack (r0,r1) ;\r | |
167 | r2 = bytepack (r3,r4) ;\r | |
168 | r5 = bytepack (r6,r7) ;\r | |
169 | \r | |
170 | /* forward byte order operands */\r | |
171 | //(Dreg, Dreg) = BYTEOP16M (Dreg_pair, Dreg_pair) ; /* (b */)\r | |
172 | /* reverse byte order operands */\r | |
173 | //(Dreg, Dreg) = BYTEOP16M (Dreg-pair, Dreg-pair) (R) ; /* (b) */\r | |
174 | \r | |
175 | (r1,r2)= byteop16m (r3:2,r1:0) ;\r | |
176 | (r1,r2)= byteop16m (r3:2,r1:0) (r) ;\r | |
177 | (r0,r1)= byteop16m (r3:2,r1:0) ;\r | |
178 | (r2,r3)= byteop16m (r3:2,r1:0) (r) ;\r | |
179 | (r3,r5)= byteop16m (r3:2,r1:0) ;\r | |
180 | (r6,r7)= byteop16m (r3:2,r1:0) (r) ;\r | |
181 | \r | |
182 | (r1,r2)= byteop16m (r1:0,r1:0) ;\r | |
183 | (r1,r2)= byteop16m (r1:0,r1:0) (r) ;\r | |
184 | (r0,r1)= byteop16m (r1:0,r1:0) ;\r | |
185 | (r2,r3)= byteop16m (r1:0,r1:0) (r) ;\r | |
186 | (r3,r5)= byteop16m (r1:0,r1:0) ;\r | |
187 | (r6,r7)= byteop16m (r1:0,r1:0) (r) ;\r | |
188 | \r | |
189 | (r1,r2)= byteop16m (r1:0,r3:2) ;\r | |
190 | (r1,r2)= byteop16m (r1:0,r3:2) (r) ;\r | |
191 | (r0,r1)= byteop16m (r1:0,r3:2) ;\r | |
192 | (r2,r3)= byteop16m (r1:0,r3:2) (r) ;\r | |
193 | (r3,r5)= byteop16m (r1:0,r3:2) ;\r | |
194 | (r6,r7)= byteop16m (r1:0,r3:2) (r) ;\r | |
195 | \r | |
196 | (r1,r2)= byteop16m (r3:2,r3:2) ;\r | |
197 | (r1,r2)= byteop16m (r3:2,r3:2) (r) ;\r | |
198 | (r0,r1)= byteop16m (r3:2,r3:2) ;\r | |
199 | (r2,r3)= byteop16m (r3:2,r3:2) (r) ;\r | |
200 | (r3,r5)= byteop16m (r3:2,r3:2) ;\r | |
201 | (r6,r7)= byteop16m (r3:2,r3:2) (r) ;\r | |
202 | \r | |
203 | //SAA (Dreg_pair, Dreg_pair) ; /* forward byte order operands (b) */\r | |
204 | //SAA (Dreg_pair, Dreg_pair) (R) ; /* reverse byte order operands (b) */\r | |
205 | \r | |
206 | saa(r1:0, r3:2) || r0 = [i0++] || r2 = [i1++] ; /* parallel fill instructions */\r | |
207 | saa (r1:0, r3:2) (R) || r1 = [i0++] || r3 = [i1++] ; /* reverse, parallel fill instructions */\r | |
208 | saa (r1:0, r3:2) ; /* last SAA in a loop, no more fill required */\r | |
209 | \r | |
210 | //( Dreg , Dreg ) = BYTEUNPACK Dreg_pair ; /* (b) */\r | |
211 | //( Dreg , Dreg ) = BYTEUNPACK Dreg_pair (R) ; /* reverse source order (b) */\r | |
212 | \r | |
213 | (r6,r5) = byteunpack r1:0 ; /* non-reversing sources */\r | |
214 | (r6,r5) = byteunpack r1:0 (R) ; /* reversing sources case */\r | |
215 | (r6,r5) = byteunpack r3:2 ; /* non-reversing sources */\r | |
216 | (r6,r5) = byteunpack r3:2 (R) ; /* reversing sources case */\r | |
217 | (r0,r1) = byteunpack r1:0 ; /* non-reversing sources */\r | |
218 | (r2,r3) = byteunpack r1:0 (R) ; /* reversing sources case */\r | |
219 | (r4,r5) = byteunpack r3:2 ; /* non-reversing sources */\r | |
220 | (r6,r7) = byteunpack r3:2 (R) ; /* reversing sources case */\r |