6 //13 VIDEO PIXEL OPERATIONS
9 //Dreg = ALIGN8 ( Dreg, Dreg ) ; /* overlay 1 byte (b) */
23 //Dreg = ALIGN16 ( Dreg, Dreg ) ; /* overlay 2 bytes (b) */
37 //Dreg = ALIGN24 ( Dreg, Dreg ) ; /* overlay 3 bytes (b) */
51 DISALGNEXCPT ; /* (b) */
53 /* forward byte order operands */
54 //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (LO) ; /* sum into low bytes (b) */
55 //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (HI) ; /* sum into high bytes (b) */
56 /* reverse byte order operands */
57 //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (LO, R) ; /* sum into low bytes (b) */
58 //Dreg = BYTEOP3P (Dreg_pair, Dreg_pair) (HI, R) ; /* sum into high bytes (b) */
60 r0 = byteop3p (r1:0, r3:2) (lo) ;
61 r1 = byteop3p (r1:0, r3:2) (hi) ;
62 r2 = byteop3p (r1:0, r3:2) (lo, r) ;
63 r3 = byteop3p (r1:0, r3:2) (hi, r) ;
64 r4 = byteop3p (r3:2, r1:0) (lo) ;
65 r5 = byteop3p (r3:2, r1:0) (hi) ;
66 r6 = byteop3p (r3:2, r1:0) (lo, r) ;
67 r7 = byteop3p (r3:2, r1:0) (hi, r) ;
69 //Dreg = A1.L + A1.H, Dreg = A0.L + A0.H ; /* (b) */
71 R0 = A1.L + A1.H, R1= A0.L + A0.H ;
72 R2 = A1.L + A1.H, R3= A0.L + A0.H ;
73 R4 = A1.L + A1.H, R5= A0.L + A0.H ;
74 R6 = A1.L + A1.H, R7= A0.L + A0.H ;
76 /* forward byte order operands */
77 //( Dreg, Dreg ) = BYTEOP16P ( Dreg_pair, Dreg_pair ) ; /* (b) */
78 (r7,r0) = BYTEOP16P ( r3:2,r1:0 ) ;
79 (r1,r2) = byteop16p (r3:2,r1:0) ;
80 (r0,r1) = BYTEOP16P ( r3:2,r1:0 ) ;
81 (r2,r3) = byteop16p (r3:2,r1:0) ;
82 (r7,r0) = BYTEOP16P (r1:0, r3:2) ;
83 (r1,r2) = byteop16p (r1:0,r3:2) ;
84 (r0,r1) = BYTEOP16P (r1:0, r3:2) ;
85 (r2,r3) = byteop16p (r1:0,r3:2) ;
87 /* reverse byte order operands */
88 //( Dreg, Dreg ) = BYTEOP16P ( Dreg_pair, Dreg_pair ) (R); /* (b) */
89 (r7,r0) = BYTEOP16P ( r3:2,r1:0 )(r) ;
90 (r1,r2) = byteop16p (r3:2,r1:0)(r) ;
91 (r0,r1) = BYTEOP16P ( r3:2,r1:0 )(r) ;
92 (r2,r3) = byteop16p (r3:2,r1:0)(r) ;
93 (r7,r0) = BYTEOP16P (r1:0, r3:2)(r) ;
94 (r1,r2) = byteop16p (r1:0,r3:2)(r) ;
95 (r0,r1) = BYTEOP16P (r1:0, r3:2)(r) ;
96 (r2,r3) = byteop16p (r1:0,r3:2)(r) ;
98 /* forward byte order operands */
99 //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) ; /* (b) */
100 //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) (T) ; /* truncated (b)*/
101 /* reverse byte order operands */
102 //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) (R) ; /* (b) */
103 //Dreg = BYTEOP1P (Dreg_pair, Dreg_pair) (T, R) ; /* truncated (b) */
105 r3 = byteop1p (r1:0, r3:2) ;
106 r3 = byteop1p (r1:0, r3:2) (r) ;
107 r3 = byteop1p (r1:0, r3:2) (t) ;
108 r3 = byteop1p (r1:0, r3:2) (t,r) ;
110 r0 = byteop1p (r3:2,r1:0);
111 r1 = byteop1p (r3:2,r1:0)(r) ;
112 r2 = byteop1p (r3:2,r1:0)(t) ;
113 r3 = byteop1p (r3:2,r1:0)(t,r) ;
115 /* forward byte order operands */
116 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDL) ;
117 /* round into low bytes (b) */
118 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDH) ;
119 /* round into high bytes (b) */
120 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TL) ;
121 /* truncate into low bytes (b) */
122 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TH) ;
123 /* truncate into high bytes (b) */
124 /* reverse byte order operands */
125 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDL, R) ;
126 /* round into low bytes (b) */
127 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (RNDH, R) ;
128 /* round into high bytes (b) */
129 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TL, R) ;
130 /* truncate into low bytes (b) */
131 //Dreg = BYTEOP2P (Dreg_pair, Dreg_pair) (TH, R) ;
132 /* truncate into high bytes (b) */
134 r3 = byteop2p (r1:0, r3:2) (rndl) ;
135 r3 = byteop2p (r1:0, r3:2) (rndh) ;
136 r3 = byteop2p (r1:0, r3:2) (tl) ;
137 r3 = byteop2p (r1:0, r3:2) (th) ;
138 r3 = byteop2p (r1:0, r3:2) (rndl, r) ;
139 r3 = byteop2p (r1:0, r3:2) (rndh, r) ;
140 r3 = byteop2p (r1:0, r3:2) (tl, r) ;
141 r3 = byteop2p (r1:0, r3:2) (th, r) ;
143 r0 = byteop2p (r1:0, r3:2) (rndl) ;
144 r1 = byteop2p (r1:0, r3:2) (rndh) ;
145 r2 = byteop2p (r1:0, r3:2) (tl) ;
146 r3 = byteop2p (r1:0, r3:2) (th) ;
147 r4 = byteop2p (r1:0, r3:2) (rndl, r) ;
148 r5 = byteop2p (r1:0, r3:2) (rndh, r) ;
149 r6 = byteop2p (r1:0, r3:2) (tl, r) ;
150 r7 = byteop2p (r1:0, r3:2) (th, r) ;
152 r0 = byteop2p (r3:2, r3:2) (rndl) ;
153 r1 = byteop2p (r3:2, r3:2) (rndh) ;
154 r2 = byteop2p (r3:2, r3:2) (tl) ;
155 r3 = byteop2p (r3:2, r3:2) (th) ;
156 r4 = byteop2p (r3:2, r3:2) (rndl, r) ;
157 r5 = byteop2p (r3:2, r3:2) (rndh, r) ;
158 r6 = byteop2p (r3:2, r3:2) (tl, r) ;
159 r7 = byteop2p (r3:2, r3:2) (th, r) ;
161 //Dreg = BYTEPACK ( Dreg, Dreg ) ; /* (b) */
162 r0 = bytepack (r0,r0) ;
163 r1 = bytepack (r2,r3) ;
164 r4 = bytepack (r5,r6) ;
165 r7 = bytepack (r0,r1) ;
166 r2 = bytepack (r3,r4) ;
167 r5 = bytepack (r6,r7) ;
169 /* forward byte order operands */
170 //(Dreg, Dreg) = BYTEOP16M (Dreg_pair, Dreg_pair) ; /* (b */)
171 /* reverse byte order operands */
172 //(Dreg, Dreg) = BYTEOP16M (Dreg-pair, Dreg-pair) (R) ; /* (b) */
174 (r1,r2)= byteop16m (r3:2,r1:0) ;
175 (r1,r2)= byteop16m (r3:2,r1:0) (r) ;
176 (r0,r1)= byteop16m (r3:2,r1:0) ;
177 (r2,r3)= byteop16m (r3:2,r1:0) (r) ;
178 (r3,r5)= byteop16m (r3:2,r1:0) ;
179 (r6,r7)= byteop16m (r3:2,r1:0) (r) ;
181 (r1,r2)= byteop16m (r1:0,r1:0) ;
182 (r1,r2)= byteop16m (r1:0,r1:0) (r) ;
183 (r0,r1)= byteop16m (r1:0,r1:0) ;
184 (r2,r3)= byteop16m (r1:0,r1:0) (r) ;
185 (r3,r5)= byteop16m (r1:0,r1:0) ;
186 (r6,r7)= byteop16m (r1:0,r1:0) (r) ;
188 (r1,r2)= byteop16m (r1:0,r3:2) ;
189 (r1,r2)= byteop16m (r1:0,r3:2) (r) ;
190 (r0,r1)= byteop16m (r1:0,r3:2) ;
191 (r2,r3)= byteop16m (r1:0,r3:2) (r) ;
192 (r3,r5)= byteop16m (r1:0,r3:2) ;
193 (r6,r7)= byteop16m (r1:0,r3:2) (r) ;
195 (r1,r2)= byteop16m (r3:2,r3:2) ;
196 (r1,r2)= byteop16m (r3:2,r3:2) (r) ;
197 (r0,r1)= byteop16m (r3:2,r3:2) ;
198 (r2,r3)= byteop16m (r3:2,r3:2) (r) ;
199 (r3,r5)= byteop16m (r3:2,r3:2) ;
200 (r6,r7)= byteop16m (r3:2,r3:2) (r) ;
202 //SAA (Dreg_pair, Dreg_pair) ; /* forward byte order operands (b) */
203 //SAA (Dreg_pair, Dreg_pair) (R) ; /* reverse byte order operands (b) */
205 saa(r1:0, r3:2) || r0 = [i0++] || r2 = [i1++] ; /* parallel fill instructions */
206 saa (r1:0, r3:2) (R) || r1 = [i0++] || r3 = [i1++] ; /* reverse, parallel fill instructions */
207 saa (r1:0, r3:2) ; /* last SAA in a loop, no more fill required */
209 //( Dreg , Dreg ) = BYTEUNPACK Dreg_pair ; /* (b) */
210 //( Dreg , Dreg ) = BYTEUNPACK Dreg_pair (R) ; /* reverse source order (b) */
212 (r6,r5) = byteunpack r1:0 ; /* non-reversing sources */
213 (r6,r5) = byteunpack r1:0 (R) ; /* reversing sources case */
214 (r6,r5) = byteunpack r3:2 ; /* non-reversing sources */
215 (r6,r5) = byteunpack r3:2 (R) ; /* reversing sources case */
216 (r0,r1) = byteunpack r1:0 ; /* non-reversing sources */
217 (r2,r3) = byteunpack r1:0 (R) ; /* reversing sources case */
218 (r4,r5) = byteunpack r3:2 ; /* non-reversing sources */
219 (r6,r7) = byteunpack r3:2 (R) ; /* reversing sources case */