1/*
2 * Copyright © 2008 Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *
23 * Author:
24 *    Zou Nan hai <nanhai.zou@intel.com>
25 *
26 */
27
28and.nz (1) null g2.0<1,1,1>UD 0x1UD{align1};
29(f0) jmpi direct_idct;
30add (1) g2.8<1>UD g76.8<1,1,1>UD 0UD{align1};
31send (16) 0 g3.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
32add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
33send (16) 0 g4.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
34add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
35send (16) 0 g5.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
36add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
37send (16) 0 g6.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
38add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
39send (16) 0 g7.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
40add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
41send (16) 0 g8.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
42add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
43send (16) 0 g9.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
44add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
45send (16) 0 g10.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
46add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
47send (16) 0 g11.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
48add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
49send (16) 0 g12.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
50add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
51send (16) 0 g13.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
52add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
53send (16) 0 g14.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
54add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
55send (16) 0 g15.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
56add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
57send (16) 0 g16.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
58add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
59send (16) 0 g17.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
60add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
61send (16) 0 g18.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
62add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
63send (16) 0 g19.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
64add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
65send (16) 0 g20.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
66add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
67send (16) 0 g21.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
68add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
69send (16) 0 g22.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
70add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
71send (16) 0 g23<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
72add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
73send (16) 0 g24.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
74add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
75send (16) 0 g25.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
76add (1) g2.8<1>UD g2.8<1,1,1>UD 32UD {align1};
77send (16) 0 g26.0<1>UD g2<16,16,1>UD read(3, 0, 2, 0) mlen 1 rlen 1 { align1 };
78direct_idct:
79
80and.nz (1) null g76.12<1,1,1>UW 0x20UW {align1};
81(f0) jmpi next_block;
82mov (8) g3.0<1>UW 0UW {align1}; 
83mov (8) g4.0<1>UW 0UW {align1}; 
84mov (8) g5.0<1>UW 0UW {align1}; 
85mov (8) g6.0<1>UW 0UW {align1}; 
86mov (8) g7.0<1>UW 0UW {align1}; 
87mov (8) g8.0<1>UW 0UW {align1}; 
88mov (8) g9.0<1>UW 0UW {align1}; 
89mov (8) g10.0<1>UW 0UW {align1}; 
90next_block:
91
92and.nz (1) null g1.12<1,1,1>UW 0x10UW {align1};
93(f0) jmpi next_field;
94mov (8) g3.16<1>UW 0UW {align1}; 
95mov (8) g4.16<1>UW 0UW {align1}; 
96mov (8) g5.16<1>UW 0UW {align1}; 
97mov (8) g6.16<1>UW 0UW {align1}; 
98mov (8) g7.16<1>UW 0UW {align1}; 
99mov (8) g8.16<1>UW 0UW {align1}; 
100mov (8) g9.16<1>UW 0UW {align1}; 
101mov (8) g10.16<1>UW 0UW {align1}; 
102next_field:
103and.nz (1) null g1.12<1,1,1>UW 0x8UW {align1};
104(f0) jmpi next_field;
105mov (8) g11.0<1>UW 0UW {align1}; 
106mov (8) g12.0<1>UW 0UW {align1}; 
107mov (8) g13.0<1>UW 0UW {align1}; 
108mov (8) g14.0<1>UW 0UW {align1}; 
109mov (8) g15.0<1>UW 0UW {align1}; 
110mov (8) g16.0<1>UW 0UW {align1}; 
111mov (8) g17.0<1>UW 0UW {align1}; 
112mov (8) g18.0<1>UW 0UW {align1}; 
113next_field:
114and.nz (1) null g1.12<1,1,1>UW 0x4UW {align1};
115(f0) jmpi next_field;
116mov (8) g11.16<1>UW 0UW {align1}; 
117mov (8) g12.16<1>UW 0UW {align1}; 
118mov (8) g13.16<1>UW 0UW {align1}; 
119mov (8) g14.16<1>UW 0UW {align1}; 
120mov (8) g15.16<1>UW 0UW {align1}; 
121mov (8) g16.16<1>UW 0UW {align1}; 
122mov (8) g17.16<1>UW 0UW {align1}; 
123mov (8) g18.16<1>UW 0UW {align1}; 
124next_field:
125
126and.nz (1) null g1.12<1,1,1>UW 0x2UW {align1};
127(f0) jmpi next_field;
128mov (16) g19.0<1>UW 0UW {align1}; 
129mov (16) g20.0<1>UW 0UW {align1}; 
130mov (16) g21.0<1>UW 0UW {align1}; 
131mov (16) g22.0<1>UW 0UW {align1}; 
132next_field:
133
134and.nz (1) null g1.12<1,1,1>UW 0x1UW {align1};
135(f0) jmpi next_field;
136mov (16) g23.0<1>UW 0UW {align1}; 
137mov (16) g24.0<1>UW 0UW {align1}; 
138mov (16) g25.0<1>UW 0UW {align1}; 
139mov (16) g26.0<1>UW 0UW {align1}; 
140next_field:
141