| 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 <[email protected]> |
| 25 |
* Zhang Hua jun <[email protected]> |
| 26 |
* Xing Dong sheng <[email protected]> |
| 27 |
* |
| 28 |
*/ |
| 29 |
mov (8) g1.0<1>UD g76.0<8,8,1>UD{align1}; |
| 30 |
//mov (8) g2.0<1>UD g77.0<8,8,1>UD{align1}; |
| 31 |
|
| 32 |
mov (16) g44.1<2>UB 0W {align1}; |
| 33 |
mov (16) g45.1<2>UB 0W {align1}; |
| 34 |
mov (16) g46.1<2>UB 0W {align1}; |
| 35 |
mov (16) g47.1<2>UB 0W {align1}; |
| 36 |
mov (16) g48.1<2>UB 0W {align1}; |
| 37 |
mov (16) g49.1<2>UB 0W {align1}; |
| 38 |
mov (16) g50.1<2>UB 0W {align1}; |
| 39 |
mov (16) g51.1<2>UB 0W {align1}; |
| 40 |
|
| 41 |
and.nz (1) null g1.30<1,1,1>UB 1UW {align1}; //dct_type |
| 42 |
(f0) jmpi field_dct; |
| 43 |
//jmpi field_dct; |
| 44 |
add (16) g28.0<1>W g3.0<16,16,1>W g28.0<16,16,2>UB {align1}; |
| 45 |
add (16) g29.0<1>W g4.0<16,16,1>W g29.0<16,16,2>UB {align1}; |
| 46 |
add (16) g30.0<1>W g5.0<16,16,1>W g30.0<16,16,2>UB {align1}; |
| 47 |
add (16) g31.0<1>W g6.0<16,16,1>W g31.0<16,16,2>UB {align1}; |
| 48 |
add (16) g32.0<1>W g7.0<16,16,1>W g32.0<16,16,2>UB {align1}; |
| 49 |
add (16) g33.0<1>W g8.0<16,16,1>W g33.0<16,16,2>UB {align1}; |
| 50 |
add (16) g34.0<1>W g9.0<16,16,1>W g34.0<16,16,2>UB {align1}; |
| 51 |
add (16) g35.0<1>W g10.0<16,16,1>W g35.0<16,16,2>UB {align1}; |
| 52 |
add (16) g36.0<1>W g11.0<16,16,1>W g36.0<16,16,2>UB {align1}; |
| 53 |
add (16) g37.0<1>W g12.0<16,16,1>W g37.0<16,16,2>UB {align1}; |
| 54 |
add (16) g38.0<1>W g13.0<16,16,1>W g38.0<16,16,2>UB {align1}; |
| 55 |
add (16) g39.0<1>W g14.0<16,16,1>W g39.0<16,16,2>UB {align1}; |
| 56 |
add (16) g40.0<1>W g15.0<16,16,1>W g40.0<16,16,2>UB {align1}; |
| 57 |
add (16) g41.0<1>W g16.0<16,16,1>W g41.0<16,16,2>UB {align1}; |
| 58 |
add (16) g42.0<1>W g17.0<16,16,1>W g42.0<16,16,2>UB {align1}; |
| 59 |
add (16) g43.0<1>W g18.0<16,16,1>W g43.0<16,16,2>UB {align1}; |
| 60 |
jmpi write_back; |
| 61 |
|
| 62 |
field_dct: |
| 63 |
add (16) g28.0<1>W g3.0<16,16,1>W g28.0<16,16,2>UB {align1}; |
| 64 |
add (16) g29.0<1>W g11.0<16,16,1>W g29.0<16,16,2>UB {align1}; |
| 65 |
add (16) g30.0<1>W g4.0<16,16,1>W g30.0<16,16,2>UB {align1}; |
| 66 |
add (16) g31.0<1>W g12.0<16,16,1>W g31.0<16,16,2>UB {align1}; |
| 67 |
add (16) g32.0<1>W g5.0<16,16,1>W g32.0<16,16,2>UB {align1}; |
| 68 |
add (16) g33.0<1>W g13.0<16,16,1>W g33.0<16,16,2>UB {align1}; |
| 69 |
add (16) g34.0<1>W g6.0<16,16,1>W g34.0<16,16,2>UB {align1}; |
| 70 |
add (16) g35.0<1>W g14.0<16,16,1>W g35.0<16,16,2>UB {align1}; |
| 71 |
add (16) g36.0<1>W g7.0<16,16,1>W g36.0<16,16,2>UB {align1}; |
| 72 |
add (16) g37.0<1>W g15.0<16,16,1>W g37.0<16,16,2>UB {align1}; |
| 73 |
add (16) g38.0<1>W g8.0<16,16,1>W g38.0<16,16,2>UB {align1}; |
| 74 |
add (16) g39.0<1>W g16.0<16,16,1>W g39.0<16,16,2>UB {align1}; |
| 75 |
add (16) g40.0<1>W g9.0<16,16,1>W g40.0<16,16,2>UB {align1}; |
| 76 |
add (16) g41.0<1>W g17.0<16,16,1>W g41.0<16,16,2>UB {align1}; |
| 77 |
add (16) g42.0<1>W g10.0<16,16,1>W g42.0<16,16,2>UB {align1}; |
| 78 |
add (16) g43.0<1>W g18.0<16,16,1>W g43.0<16,16,2>UB {align1}; |
| 79 |
|
| 80 |
write_back: |
| 81 |
mov (1) g1.8<1>UD 0x00F000FUD {align1}; |
| 82 |
mov.sat (16) g28.0<2>UB g28.0<16,16,1>W {align1}; |
| 83 |
mov.sat (16) g29.0<2>UB g29.0<16,16,1>W {align1}; |
| 84 |
mov.sat (16) g30.0<2>UB g30.0<16,16,1>W {align1}; |
| 85 |
mov.sat (16) g31.0<2>UB g31.0<16,16,1>W {align1}; |
| 86 |
mov.sat (16) g32.0<2>UB g32.0<16,16,1>W {align1}; |
| 87 |
mov.sat (16) g33.0<2>UB g33.0<16,16,1>W {align1}; |
| 88 |
mov.sat (16) g34.0<2>UB g34.0<16,16,1>W {align1}; |
| 89 |
mov.sat (16) g35.0<2>UB g35.0<16,16,1>W {align1}; |
| 90 |
mov.sat (16) g36.0<2>UB g36.0<16,16,1>W {align1}; |
| 91 |
mov.sat (16) g37.0<2>UB g37.0<16,16,1>W {align1}; |
| 92 |
mov.sat (16) g38.0<2>UB g38.0<16,16,1>W {align1}; |
| 93 |
mov.sat (16) g39.0<2>UB g39.0<16,16,1>W {align1}; |
| 94 |
mov.sat (16) g40.0<2>UB g40.0<16,16,1>W {align1}; |
| 95 |
mov.sat (16) g41.0<2>UB g41.0<16,16,1>W {align1}; |
| 96 |
mov.sat (16) g42.0<2>UB g42.0<16,16,1>W {align1}; |
| 97 |
mov.sat (16) g43.0<2>UB g43.0<16,16,1>W {align1}; |
| 98 |
|
| 99 |
mov (16) m1.0<1>UB g28.0<16,16,2>UB {align1}; |
| 100 |
mov (16) m1.16<1>UB g29.0<16,16,2>UB {align1}; |
| 101 |
mov (16) m2.0<1>UB g30.0<16,16,2>UB {align1}; |
| 102 |
mov (16) m2.16<1>UB g31.0<16,16,2>UB {align1}; |
| 103 |
mov (16) m3.0<1>UB g32.0<16,16,2>UB {align1}; |
| 104 |
mov (16) m3.16<1>UB g33.0<16,16,2>UB {align1}; |
| 105 |
mov (16) m4.0<1>UB g34.0<16,16,2>UB {align1}; |
| 106 |
mov (16) m4.16<1>UB g35.0<16,16,2>UB {align1}; |
| 107 |
mov (16) m5.0<1>UB g36.0<16,16,2>UB {align1}; |
| 108 |
mov (16) m5.16<1>UB g37.0<16,16,2>UB {align1}; |
| 109 |
mov (16) m6.0<1>UB g38.0<16,16,2>UB {align1}; |
| 110 |
mov (16) m6.16<1>UB g39.0<16,16,2>UB {align1}; |
| 111 |
mov (16) m7.0<1>UB g40.0<16,16,2>UB {align1}; |
| 112 |
mov (16) m7.16<1>UB g41.0<16,16,2>UB {align1}; |
| 113 |
mov (16) m8.0<1>UB g42.0<16,16,2>UB {align1}; |
| 114 |
mov (16) m8.16<1>UB g43.0<16,16,2>UB {align1}; |
| 115 |
send (16) 0 acc0<1>UW g1<8,8,1>UW write(0,0,2,0) mlen 9 rlen 0 {align1}; |
| 116 |
|
| 117 |
//U |
| 118 |
mov (1) g1.8<1>UD 0x0070007UD { align1 }; |
| 119 |
shr (2) g1.0<1>UD g1.0<2,2,1>UD 1D {align1}; |
| 120 |
add (16) g44.0<1>UW g19.0<16,16,1>W g44.0<16,16,1>UW {align1}; |
| 121 |
add (16) g45.0<1>UW g20.0<16,16,1>W g45.0<16,16,1>UW {align1}; |
| 122 |
add (16) g46.0<1>UW g21.0<16,16,1>W g46.0<16,16,1>UW {align1}; |
| 123 |
add (16) g47.0<1>UW g22.0<16,16,1>W g47.0<16,16,1>UW {align1}; |
| 124 |
mov.sat (16) g44.0<2>UB g44.0<16,16,1>UW {align1}; |
| 125 |
mov.sat (16) g45.0<2>UB g45.0<16,16,1>UW {align1}; |
| 126 |
mov.sat (16) g46.0<2>UB g46.0<16,16,1>UW {align1}; |
| 127 |
mov.sat (16) g47.0<2>UB g47.0<16,16,1>UW {align1}; |
| 128 |
|
| 129 |
mov (16) m1.0<1>UB g44.0<16,16,2>UB {align1}; |
| 130 |
mov (16) m1.16<1>UB g45.0<16,16,2>UB {align1}; |
| 131 |
mov (16) m2.0<1>UB g46.0<16,16,2>UB {align1}; |
| 132 |
mov (16) m2.16<1>UB g47.0<16,16,2>UB {align1}; |
| 133 |
send (16) 0 acc0<1>UW g1<8,8,1>UW write(1, 0, 2, 0) mlen 3 rlen 0 { align1 }; |
| 134 |
|
| 135 |
//V |
| 136 |
add (16) g48.0<1>UW g23.0<16,16,1>W g48.0<16,16,1>UW {align1}; |
| 137 |
add (16) g49.0<1>UW g24.0<16,16,1>W g49.0<16,16,1>UW {align1}; |
| 138 |
add (16) g50.0<1>UW g25.0<16,16,1>W g50.0<16,16,1>UW {align1}; |
| 139 |
add (16) g51.0<1>UW g26.0<16,16,1>W g51.0<16,16,1>UW {align1}; |
| 140 |
mov.sat (16) g48.0<2>UB g48.0<16,16,1>UW {align1}; |
| 141 |
mov.sat (16) g49.0<2>UB g49.0<16,16,1>UW {align1}; |
| 142 |
mov.sat (16) g50.0<2>UB g50.0<16,16,1>UW {align1}; |
| 143 |
mov.sat (16) g51.0<2>UB g51.0<16,16,1>UW {align1}; |
| 144 |
|
| 145 |
mov (16) m1.0<1>UB g48.0<16,16,2>UB {align1}; |
| 146 |
mov (16) m1.16<1>UB g49.0<16,16,2>UB {align1}; |
| 147 |
mov (16) m2.0<1>UB g50.0<16,16,2>UB {align1}; |
| 148 |
mov (16) m2.16<1>UB g51.0<16,16,2>UB {align1}; |
| 149 |
send (16) 0 acc0<1>UW g1<8,8,1>UW write(2, 0, 2, 0) mlen 3 rlen 0 { align1 }; |
| 150 |
|
| 151 |
send (16) 0 acc0<1>UW g0<8,8,1>UW |
| 152 |
thread_spawner(0, 0, 0) mlen 1 rlen 0 { align1 EOT}; |