Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | ; |
michael@0 | 2 | ; Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
michael@0 | 3 | ; |
michael@0 | 4 | ; Use of this source code is governed by a BSD-style license |
michael@0 | 5 | ; that can be found in the LICENSE file in the root of the source |
michael@0 | 6 | ; tree. An additional intellectual property rights grant can be found |
michael@0 | 7 | ; in the file PATENTS. All contributing project authors may |
michael@0 | 8 | ; be found in the AUTHORS file in the root of the source tree. |
michael@0 | 9 | ; |
michael@0 | 10 | |
michael@0 | 11 | |
michael@0 | 12 | %include "vpx_ports/x86_abi_support.asm" |
michael@0 | 13 | |
michael@0 | 14 | %macro STACK_FRAME_CREATE 0 |
michael@0 | 15 | %if ABI_IS_32BIT |
michael@0 | 16 | %define input rsi |
michael@0 | 17 | %define output rdi |
michael@0 | 18 | %define pitch rax |
michael@0 | 19 | push rbp |
michael@0 | 20 | mov rbp, rsp |
michael@0 | 21 | GET_GOT rbx |
michael@0 | 22 | push rsi |
michael@0 | 23 | push rdi |
michael@0 | 24 | ; end prolog |
michael@0 | 25 | |
michael@0 | 26 | mov rsi, arg(0) |
michael@0 | 27 | mov rdi, arg(1) |
michael@0 | 28 | |
michael@0 | 29 | movsxd rax, dword ptr arg(2) |
michael@0 | 30 | lea rcx, [rsi + rax*2] |
michael@0 | 31 | %else |
michael@0 | 32 | %if LIBVPX_YASM_WIN64 |
michael@0 | 33 | %define input rcx |
michael@0 | 34 | %define output rdx |
michael@0 | 35 | %define pitch r8 |
michael@0 | 36 | SAVE_XMM 7, u |
michael@0 | 37 | %else |
michael@0 | 38 | %define input rdi |
michael@0 | 39 | %define output rsi |
michael@0 | 40 | %define pitch rdx |
michael@0 | 41 | %endif |
michael@0 | 42 | %endif |
michael@0 | 43 | %endmacro |
michael@0 | 44 | |
michael@0 | 45 | %macro STACK_FRAME_DESTROY 0 |
michael@0 | 46 | %define input |
michael@0 | 47 | %define output |
michael@0 | 48 | %define pitch |
michael@0 | 49 | |
michael@0 | 50 | %if ABI_IS_32BIT |
michael@0 | 51 | pop rdi |
michael@0 | 52 | pop rsi |
michael@0 | 53 | RESTORE_GOT |
michael@0 | 54 | pop rbp |
michael@0 | 55 | %else |
michael@0 | 56 | %if LIBVPX_YASM_WIN64 |
michael@0 | 57 | RESTORE_XMM |
michael@0 | 58 | %endif |
michael@0 | 59 | %endif |
michael@0 | 60 | ret |
michael@0 | 61 | %endmacro |
michael@0 | 62 | |
michael@0 | 63 | ;void vp8_short_fdct4x4_sse2(short *input, short *output, int pitch) |
michael@0 | 64 | global sym(vp8_short_fdct4x4_sse2) PRIVATE |
michael@0 | 65 | sym(vp8_short_fdct4x4_sse2): |
michael@0 | 66 | |
michael@0 | 67 | STACK_FRAME_CREATE |
michael@0 | 68 | |
michael@0 | 69 | movq xmm0, MMWORD PTR[input ] ;03 02 01 00 |
michael@0 | 70 | movq xmm2, MMWORD PTR[input+ pitch] ;13 12 11 10 |
michael@0 | 71 | lea input, [input+2*pitch] |
michael@0 | 72 | movq xmm1, MMWORD PTR[input ] ;23 22 21 20 |
michael@0 | 73 | movq xmm3, MMWORD PTR[input+ pitch] ;33 32 31 30 |
michael@0 | 74 | |
michael@0 | 75 | punpcklqdq xmm0, xmm2 ;13 12 11 10 03 02 01 00 |
michael@0 | 76 | punpcklqdq xmm1, xmm3 ;33 32 31 30 23 22 21 20 |
michael@0 | 77 | |
michael@0 | 78 | movdqa xmm2, xmm0 |
michael@0 | 79 | punpckldq xmm0, xmm1 ;23 22 03 02 21 20 01 00 |
michael@0 | 80 | punpckhdq xmm2, xmm1 ;33 32 13 12 31 30 11 10 |
michael@0 | 81 | movdqa xmm1, xmm0 |
michael@0 | 82 | punpckldq xmm0, xmm2 ;31 21 30 20 11 10 01 00 |
michael@0 | 83 | pshufhw xmm1, xmm1, 0b1h ;22 23 02 03 xx xx xx xx |
michael@0 | 84 | pshufhw xmm2, xmm2, 0b1h ;32 33 12 13 xx xx xx xx |
michael@0 | 85 | |
michael@0 | 86 | punpckhdq xmm1, xmm2 ;32 33 22 23 12 13 02 03 |
michael@0 | 87 | movdqa xmm3, xmm0 |
michael@0 | 88 | paddw xmm0, xmm1 ;b1 a1 b1 a1 b1 a1 b1 a1 |
michael@0 | 89 | psubw xmm3, xmm1 ;c1 d1 c1 d1 c1 d1 c1 d1 |
michael@0 | 90 | psllw xmm0, 3 ;b1 <<= 3 a1 <<= 3 |
michael@0 | 91 | psllw xmm3, 3 ;c1 <<= 3 d1 <<= 3 |
michael@0 | 92 | |
michael@0 | 93 | movdqa xmm1, xmm0 |
michael@0 | 94 | pmaddwd xmm0, XMMWORD PTR[GLOBAL(_mult_add)] ;a1 + b1 |
michael@0 | 95 | pmaddwd xmm1, XMMWORD PTR[GLOBAL(_mult_sub)] ;a1 - b1 |
michael@0 | 96 | movdqa xmm4, xmm3 |
michael@0 | 97 | pmaddwd xmm3, XMMWORD PTR[GLOBAL(_5352_2217)] ;c1*2217 + d1*5352 |
michael@0 | 98 | pmaddwd xmm4, XMMWORD PTR[GLOBAL(_2217_neg5352)];d1*2217 - c1*5352 |
michael@0 | 99 | |
michael@0 | 100 | paddd xmm3, XMMWORD PTR[GLOBAL(_14500)] |
michael@0 | 101 | paddd xmm4, XMMWORD PTR[GLOBAL(_7500)] |
michael@0 | 102 | psrad xmm3, 12 ;(c1 * 2217 + d1 * 5352 + 14500)>>12 |
michael@0 | 103 | psrad xmm4, 12 ;(d1 * 2217 - c1 * 5352 + 7500)>>12 |
michael@0 | 104 | |
michael@0 | 105 | packssdw xmm0, xmm1 ;op[2] op[0] |
michael@0 | 106 | packssdw xmm3, xmm4 ;op[3] op[1] |
michael@0 | 107 | ; 23 22 21 20 03 02 01 00 |
michael@0 | 108 | ; |
michael@0 | 109 | ; 33 32 31 30 13 12 11 10 |
michael@0 | 110 | ; |
michael@0 | 111 | movdqa xmm2, xmm0 |
michael@0 | 112 | punpcklqdq xmm0, xmm3 ;13 12 11 10 03 02 01 00 |
michael@0 | 113 | punpckhqdq xmm2, xmm3 ;23 22 21 20 33 32 31 30 |
michael@0 | 114 | |
michael@0 | 115 | movdqa xmm3, xmm0 |
michael@0 | 116 | punpcklwd xmm0, xmm2 ;32 30 22 20 12 10 02 00 |
michael@0 | 117 | punpckhwd xmm3, xmm2 ;33 31 23 21 13 11 03 01 |
michael@0 | 118 | movdqa xmm2, xmm0 |
michael@0 | 119 | punpcklwd xmm0, xmm3 ;13 12 11 10 03 02 01 00 |
michael@0 | 120 | punpckhwd xmm2, xmm3 ;33 32 31 30 23 22 21 20 |
michael@0 | 121 | |
michael@0 | 122 | movdqa xmm5, XMMWORD PTR[GLOBAL(_7)] |
michael@0 | 123 | pshufd xmm2, xmm2, 04eh |
michael@0 | 124 | movdqa xmm3, xmm0 |
michael@0 | 125 | paddw xmm0, xmm2 ;b1 b1 b1 b1 a1 a1 a1 a1 |
michael@0 | 126 | psubw xmm3, xmm2 ;c1 c1 c1 c1 d1 d1 d1 d1 |
michael@0 | 127 | |
michael@0 | 128 | pshufd xmm0, xmm0, 0d8h ;b1 b1 a1 a1 b1 b1 a1 a1 |
michael@0 | 129 | movdqa xmm2, xmm3 ;save d1 for compare |
michael@0 | 130 | pshufd xmm3, xmm3, 0d8h ;c1 c1 d1 d1 c1 c1 d1 d1 |
michael@0 | 131 | pshuflw xmm0, xmm0, 0d8h ;b1 b1 a1 a1 b1 a1 b1 a1 |
michael@0 | 132 | pshuflw xmm3, xmm3, 0d8h ;c1 c1 d1 d1 c1 d1 c1 d1 |
michael@0 | 133 | pshufhw xmm0, xmm0, 0d8h ;b1 a1 b1 a1 b1 a1 b1 a1 |
michael@0 | 134 | pshufhw xmm3, xmm3, 0d8h ;c1 d1 c1 d1 c1 d1 c1 d1 |
michael@0 | 135 | movdqa xmm1, xmm0 |
michael@0 | 136 | pmaddwd xmm0, XMMWORD PTR[GLOBAL(_mult_add)] ;a1 + b1 |
michael@0 | 137 | pmaddwd xmm1, XMMWORD PTR[GLOBAL(_mult_sub)] ;a1 - b1 |
michael@0 | 138 | |
michael@0 | 139 | pxor xmm4, xmm4 ;zero out for compare |
michael@0 | 140 | paddd xmm0, xmm5 |
michael@0 | 141 | paddd xmm1, xmm5 |
michael@0 | 142 | pcmpeqw xmm2, xmm4 |
michael@0 | 143 | psrad xmm0, 4 ;(a1 + b1 + 7)>>4 |
michael@0 | 144 | psrad xmm1, 4 ;(a1 - b1 + 7)>>4 |
michael@0 | 145 | pandn xmm2, XMMWORD PTR[GLOBAL(_cmp_mask)] ;clear upper, |
michael@0 | 146 | ;and keep bit 0 of lower |
michael@0 | 147 | |
michael@0 | 148 | movdqa xmm4, xmm3 |
michael@0 | 149 | pmaddwd xmm3, XMMWORD PTR[GLOBAL(_5352_2217)] ;c1*2217 + d1*5352 |
michael@0 | 150 | pmaddwd xmm4, XMMWORD PTR[GLOBAL(_2217_neg5352)] ;d1*2217 - c1*5352 |
michael@0 | 151 | paddd xmm3, XMMWORD PTR[GLOBAL(_12000)] |
michael@0 | 152 | paddd xmm4, XMMWORD PTR[GLOBAL(_51000)] |
michael@0 | 153 | packssdw xmm0, xmm1 ;op[8] op[0] |
michael@0 | 154 | psrad xmm3, 16 ;(c1 * 2217 + d1 * 5352 + 12000)>>16 |
michael@0 | 155 | psrad xmm4, 16 ;(d1 * 2217 - c1 * 5352 + 51000)>>16 |
michael@0 | 156 | |
michael@0 | 157 | packssdw xmm3, xmm4 ;op[12] op[4] |
michael@0 | 158 | movdqa xmm1, xmm0 |
michael@0 | 159 | paddw xmm3, xmm2 ;op[4] += (d1!=0) |
michael@0 | 160 | punpcklqdq xmm0, xmm3 ;op[4] op[0] |
michael@0 | 161 | punpckhqdq xmm1, xmm3 ;op[12] op[8] |
michael@0 | 162 | |
michael@0 | 163 | movdqa XMMWORD PTR[output + 0], xmm0 |
michael@0 | 164 | movdqa XMMWORD PTR[output + 16], xmm1 |
michael@0 | 165 | |
michael@0 | 166 | STACK_FRAME_DESTROY |
michael@0 | 167 | |
michael@0 | 168 | ;void vp8_short_fdct8x4_sse2(short *input, short *output, int pitch) |
michael@0 | 169 | global sym(vp8_short_fdct8x4_sse2) PRIVATE |
michael@0 | 170 | sym(vp8_short_fdct8x4_sse2): |
michael@0 | 171 | |
michael@0 | 172 | STACK_FRAME_CREATE |
michael@0 | 173 | |
michael@0 | 174 | ; read the input data |
michael@0 | 175 | movdqa xmm0, [input ] |
michael@0 | 176 | movdqa xmm2, [input+ pitch] |
michael@0 | 177 | lea input, [input+2*pitch] |
michael@0 | 178 | movdqa xmm4, [input ] |
michael@0 | 179 | movdqa xmm3, [input+ pitch] |
michael@0 | 180 | |
michael@0 | 181 | ; transpose for the first stage |
michael@0 | 182 | movdqa xmm1, xmm0 ; 00 01 02 03 04 05 06 07 |
michael@0 | 183 | movdqa xmm5, xmm4 ; 20 21 22 23 24 25 26 27 |
michael@0 | 184 | |
michael@0 | 185 | punpcklwd xmm0, xmm2 ; 00 10 01 11 02 12 03 13 |
michael@0 | 186 | punpckhwd xmm1, xmm2 ; 04 14 05 15 06 16 07 17 |
michael@0 | 187 | |
michael@0 | 188 | punpcklwd xmm4, xmm3 ; 20 30 21 31 22 32 23 33 |
michael@0 | 189 | punpckhwd xmm5, xmm3 ; 24 34 25 35 26 36 27 37 |
michael@0 | 190 | |
michael@0 | 191 | movdqa xmm2, xmm0 ; 00 10 01 11 02 12 03 13 |
michael@0 | 192 | punpckldq xmm0, xmm4 ; 00 10 20 30 01 11 21 31 |
michael@0 | 193 | |
michael@0 | 194 | punpckhdq xmm2, xmm4 ; 02 12 22 32 03 13 23 33 |
michael@0 | 195 | |
michael@0 | 196 | movdqa xmm4, xmm1 ; 04 14 05 15 06 16 07 17 |
michael@0 | 197 | punpckldq xmm4, xmm5 ; 04 14 24 34 05 15 25 35 |
michael@0 | 198 | |
michael@0 | 199 | punpckhdq xmm1, xmm5 ; 06 16 26 36 07 17 27 37 |
michael@0 | 200 | movdqa xmm3, xmm2 ; 02 12 22 32 03 13 23 33 |
michael@0 | 201 | |
michael@0 | 202 | punpckhqdq xmm3, xmm1 ; 03 13 23 33 07 17 27 37 |
michael@0 | 203 | punpcklqdq xmm2, xmm1 ; 02 12 22 32 06 16 26 36 |
michael@0 | 204 | |
michael@0 | 205 | movdqa xmm1, xmm0 ; 00 10 20 30 01 11 21 31 |
michael@0 | 206 | punpcklqdq xmm0, xmm4 ; 00 10 20 30 04 14 24 34 |
michael@0 | 207 | |
michael@0 | 208 | punpckhqdq xmm1, xmm4 ; 01 11 21 32 05 15 25 35 |
michael@0 | 209 | |
michael@0 | 210 | ; xmm0 0 |
michael@0 | 211 | ; xmm1 1 |
michael@0 | 212 | ; xmm2 2 |
michael@0 | 213 | ; xmm3 3 |
michael@0 | 214 | |
michael@0 | 215 | ; first stage |
michael@0 | 216 | movdqa xmm5, xmm0 |
michael@0 | 217 | movdqa xmm4, xmm1 |
michael@0 | 218 | |
michael@0 | 219 | paddw xmm0, xmm3 ; a1 = 0 + 3 |
michael@0 | 220 | paddw xmm1, xmm2 ; b1 = 1 + 2 |
michael@0 | 221 | |
michael@0 | 222 | psubw xmm4, xmm2 ; c1 = 1 - 2 |
michael@0 | 223 | psubw xmm5, xmm3 ; d1 = 0 - 3 |
michael@0 | 224 | |
michael@0 | 225 | psllw xmm5, 3 |
michael@0 | 226 | psllw xmm4, 3 |
michael@0 | 227 | |
michael@0 | 228 | psllw xmm0, 3 |
michael@0 | 229 | psllw xmm1, 3 |
michael@0 | 230 | |
michael@0 | 231 | ; output 0 and 2 |
michael@0 | 232 | movdqa xmm2, xmm0 ; a1 |
michael@0 | 233 | |
michael@0 | 234 | paddw xmm0, xmm1 ; op[0] = a1 + b1 |
michael@0 | 235 | psubw xmm2, xmm1 ; op[2] = a1 - b1 |
michael@0 | 236 | |
michael@0 | 237 | ; output 1 and 3 |
michael@0 | 238 | ; interleave c1, d1 |
michael@0 | 239 | movdqa xmm1, xmm5 ; d1 |
michael@0 | 240 | punpcklwd xmm1, xmm4 ; c1 d1 |
michael@0 | 241 | punpckhwd xmm5, xmm4 ; c1 d1 |
michael@0 | 242 | |
michael@0 | 243 | movdqa xmm3, xmm1 |
michael@0 | 244 | movdqa xmm4, xmm5 |
michael@0 | 245 | |
michael@0 | 246 | pmaddwd xmm1, XMMWORD PTR[GLOBAL (_5352_2217)] ; c1*2217 + d1*5352 |
michael@0 | 247 | pmaddwd xmm4, XMMWORD PTR[GLOBAL (_5352_2217)] ; c1*2217 + d1*5352 |
michael@0 | 248 | |
michael@0 | 249 | pmaddwd xmm3, XMMWORD PTR[GLOBAL(_2217_neg5352)] ; d1*2217 - c1*5352 |
michael@0 | 250 | pmaddwd xmm5, XMMWORD PTR[GLOBAL(_2217_neg5352)] ; d1*2217 - c1*5352 |
michael@0 | 251 | |
michael@0 | 252 | paddd xmm1, XMMWORD PTR[GLOBAL(_14500)] |
michael@0 | 253 | paddd xmm4, XMMWORD PTR[GLOBAL(_14500)] |
michael@0 | 254 | paddd xmm3, XMMWORD PTR[GLOBAL(_7500)] |
michael@0 | 255 | paddd xmm5, XMMWORD PTR[GLOBAL(_7500)] |
michael@0 | 256 | |
michael@0 | 257 | psrad xmm1, 12 ; (c1 * 2217 + d1 * 5352 + 14500)>>12 |
michael@0 | 258 | psrad xmm4, 12 ; (c1 * 2217 + d1 * 5352 + 14500)>>12 |
michael@0 | 259 | psrad xmm3, 12 ; (d1 * 2217 - c1 * 5352 + 7500)>>12 |
michael@0 | 260 | psrad xmm5, 12 ; (d1 * 2217 - c1 * 5352 + 7500)>>12 |
michael@0 | 261 | |
michael@0 | 262 | packssdw xmm1, xmm4 ; op[1] |
michael@0 | 263 | packssdw xmm3, xmm5 ; op[3] |
michael@0 | 264 | |
michael@0 | 265 | ; done with vertical |
michael@0 | 266 | ; transpose for the second stage |
michael@0 | 267 | movdqa xmm4, xmm0 ; 00 10 20 30 04 14 24 34 |
michael@0 | 268 | movdqa xmm5, xmm2 ; 02 12 22 32 06 16 26 36 |
michael@0 | 269 | |
michael@0 | 270 | punpcklwd xmm0, xmm1 ; 00 01 10 11 20 21 30 31 |
michael@0 | 271 | punpckhwd xmm4, xmm1 ; 04 05 14 15 24 25 34 35 |
michael@0 | 272 | |
michael@0 | 273 | punpcklwd xmm2, xmm3 ; 02 03 12 13 22 23 32 33 |
michael@0 | 274 | punpckhwd xmm5, xmm3 ; 06 07 16 17 26 27 36 37 |
michael@0 | 275 | |
michael@0 | 276 | movdqa xmm1, xmm0 ; 00 01 10 11 20 21 30 31 |
michael@0 | 277 | punpckldq xmm0, xmm2 ; 00 01 02 03 10 11 12 13 |
michael@0 | 278 | |
michael@0 | 279 | punpckhdq xmm1, xmm2 ; 20 21 22 23 30 31 32 33 |
michael@0 | 280 | |
michael@0 | 281 | movdqa xmm2, xmm4 ; 04 05 14 15 24 25 34 35 |
michael@0 | 282 | punpckldq xmm2, xmm5 ; 04 05 06 07 14 15 16 17 |
michael@0 | 283 | |
michael@0 | 284 | punpckhdq xmm4, xmm5 ; 24 25 26 27 34 35 36 37 |
michael@0 | 285 | movdqa xmm3, xmm1 ; 20 21 22 23 30 31 32 33 |
michael@0 | 286 | |
michael@0 | 287 | punpckhqdq xmm3, xmm4 ; 30 31 32 33 34 35 36 37 |
michael@0 | 288 | punpcklqdq xmm1, xmm4 ; 20 21 22 23 24 25 26 27 |
michael@0 | 289 | |
michael@0 | 290 | movdqa xmm4, xmm0 ; 00 01 02 03 10 11 12 13 |
michael@0 | 291 | punpcklqdq xmm0, xmm2 ; 00 01 02 03 04 05 06 07 |
michael@0 | 292 | |
michael@0 | 293 | punpckhqdq xmm4, xmm2 ; 10 11 12 13 14 15 16 17 |
michael@0 | 294 | |
michael@0 | 295 | ; xmm0 0 |
michael@0 | 296 | ; xmm1 4 |
michael@0 | 297 | ; xmm2 1 |
michael@0 | 298 | ; xmm3 3 |
michael@0 | 299 | |
michael@0 | 300 | movdqa xmm5, xmm0 |
michael@0 | 301 | movdqa xmm2, xmm1 |
michael@0 | 302 | |
michael@0 | 303 | paddw xmm0, xmm3 ; a1 = 0 + 3 |
michael@0 | 304 | paddw xmm1, xmm4 ; b1 = 1 + 2 |
michael@0 | 305 | |
michael@0 | 306 | psubw xmm4, xmm2 ; c1 = 1 - 2 |
michael@0 | 307 | psubw xmm5, xmm3 ; d1 = 0 - 3 |
michael@0 | 308 | |
michael@0 | 309 | pxor xmm6, xmm6 ; zero out for compare |
michael@0 | 310 | |
michael@0 | 311 | pcmpeqw xmm6, xmm5 ; d1 != 0 |
michael@0 | 312 | |
michael@0 | 313 | pandn xmm6, XMMWORD PTR[GLOBAL(_cmp_mask8x4)] ; clear upper, |
michael@0 | 314 | ; and keep bit 0 of lower |
michael@0 | 315 | |
michael@0 | 316 | ; output 0 and 2 |
michael@0 | 317 | movdqa xmm2, xmm0 ; a1 |
michael@0 | 318 | |
michael@0 | 319 | paddw xmm0, xmm1 ; a1 + b1 |
michael@0 | 320 | psubw xmm2, xmm1 ; a1 - b1 |
michael@0 | 321 | |
michael@0 | 322 | paddw xmm0, XMMWORD PTR[GLOBAL(_7w)] |
michael@0 | 323 | paddw xmm2, XMMWORD PTR[GLOBAL(_7w)] |
michael@0 | 324 | |
michael@0 | 325 | psraw xmm0, 4 ; op[0] = (a1 + b1 + 7)>>4 |
michael@0 | 326 | psraw xmm2, 4 ; op[8] = (a1 - b1 + 7)>>4 |
michael@0 | 327 | |
michael@0 | 328 | ; output 1 and 3 |
michael@0 | 329 | ; interleave c1, d1 |
michael@0 | 330 | movdqa xmm1, xmm5 ; d1 |
michael@0 | 331 | punpcklwd xmm1, xmm4 ; c1 d1 |
michael@0 | 332 | punpckhwd xmm5, xmm4 ; c1 d1 |
michael@0 | 333 | |
michael@0 | 334 | movdqa xmm3, xmm1 |
michael@0 | 335 | movdqa xmm4, xmm5 |
michael@0 | 336 | |
michael@0 | 337 | pmaddwd xmm1, XMMWORD PTR[GLOBAL (_5352_2217)] ; c1*2217 + d1*5352 |
michael@0 | 338 | pmaddwd xmm4, XMMWORD PTR[GLOBAL (_5352_2217)] ; c1*2217 + d1*5352 |
michael@0 | 339 | |
michael@0 | 340 | pmaddwd xmm3, XMMWORD PTR[GLOBAL(_2217_neg5352)] ; d1*2217 - c1*5352 |
michael@0 | 341 | pmaddwd xmm5, XMMWORD PTR[GLOBAL(_2217_neg5352)] ; d1*2217 - c1*5352 |
michael@0 | 342 | |
michael@0 | 343 | paddd xmm1, XMMWORD PTR[GLOBAL(_12000)] |
michael@0 | 344 | paddd xmm4, XMMWORD PTR[GLOBAL(_12000)] |
michael@0 | 345 | paddd xmm3, XMMWORD PTR[GLOBAL(_51000)] |
michael@0 | 346 | paddd xmm5, XMMWORD PTR[GLOBAL(_51000)] |
michael@0 | 347 | |
michael@0 | 348 | psrad xmm1, 16 ; (c1 * 2217 + d1 * 5352 + 14500)>>16 |
michael@0 | 349 | psrad xmm4, 16 ; (c1 * 2217 + d1 * 5352 + 14500)>>16 |
michael@0 | 350 | psrad xmm3, 16 ; (d1 * 2217 - c1 * 5352 + 7500)>>16 |
michael@0 | 351 | psrad xmm5, 16 ; (d1 * 2217 - c1 * 5352 + 7500)>>16 |
michael@0 | 352 | |
michael@0 | 353 | packssdw xmm1, xmm4 ; op[4] |
michael@0 | 354 | packssdw xmm3, xmm5 ; op[12] |
michael@0 | 355 | |
michael@0 | 356 | paddw xmm1, xmm6 ; op[4] += (d1!=0) |
michael@0 | 357 | |
michael@0 | 358 | movdqa xmm4, xmm0 |
michael@0 | 359 | movdqa xmm5, xmm2 |
michael@0 | 360 | |
michael@0 | 361 | punpcklqdq xmm0, xmm1 |
michael@0 | 362 | punpckhqdq xmm4, xmm1 |
michael@0 | 363 | |
michael@0 | 364 | punpcklqdq xmm2, xmm3 |
michael@0 | 365 | punpckhqdq xmm5, xmm3 |
michael@0 | 366 | |
michael@0 | 367 | movdqa XMMWORD PTR[output + 0 ], xmm0 |
michael@0 | 368 | movdqa XMMWORD PTR[output + 16], xmm2 |
michael@0 | 369 | movdqa XMMWORD PTR[output + 32], xmm4 |
michael@0 | 370 | movdqa XMMWORD PTR[output + 48], xmm5 |
michael@0 | 371 | |
michael@0 | 372 | STACK_FRAME_DESTROY |
michael@0 | 373 | |
michael@0 | 374 | SECTION_RODATA |
michael@0 | 375 | align 16 |
michael@0 | 376 | _5352_2217: |
michael@0 | 377 | dw 5352 |
michael@0 | 378 | dw 2217 |
michael@0 | 379 | dw 5352 |
michael@0 | 380 | dw 2217 |
michael@0 | 381 | dw 5352 |
michael@0 | 382 | dw 2217 |
michael@0 | 383 | dw 5352 |
michael@0 | 384 | dw 2217 |
michael@0 | 385 | align 16 |
michael@0 | 386 | _2217_neg5352: |
michael@0 | 387 | dw 2217 |
michael@0 | 388 | dw -5352 |
michael@0 | 389 | dw 2217 |
michael@0 | 390 | dw -5352 |
michael@0 | 391 | dw 2217 |
michael@0 | 392 | dw -5352 |
michael@0 | 393 | dw 2217 |
michael@0 | 394 | dw -5352 |
michael@0 | 395 | align 16 |
michael@0 | 396 | _mult_add: |
michael@0 | 397 | times 8 dw 1 |
michael@0 | 398 | align 16 |
michael@0 | 399 | _cmp_mask: |
michael@0 | 400 | times 4 dw 1 |
michael@0 | 401 | times 4 dw 0 |
michael@0 | 402 | align 16 |
michael@0 | 403 | _cmp_mask8x4: |
michael@0 | 404 | times 8 dw 1 |
michael@0 | 405 | align 16 |
michael@0 | 406 | _mult_sub: |
michael@0 | 407 | dw 1 |
michael@0 | 408 | dw -1 |
michael@0 | 409 | dw 1 |
michael@0 | 410 | dw -1 |
michael@0 | 411 | dw 1 |
michael@0 | 412 | dw -1 |
michael@0 | 413 | dw 1 |
michael@0 | 414 | dw -1 |
michael@0 | 415 | align 16 |
michael@0 | 416 | _7: |
michael@0 | 417 | times 4 dd 7 |
michael@0 | 418 | align 16 |
michael@0 | 419 | _7w: |
michael@0 | 420 | times 8 dw 7 |
michael@0 | 421 | align 16 |
michael@0 | 422 | _14500: |
michael@0 | 423 | times 4 dd 14500 |
michael@0 | 424 | align 16 |
michael@0 | 425 | _7500: |
michael@0 | 426 | times 4 dd 7500 |
michael@0 | 427 | align 16 |
michael@0 | 428 | _12000: |
michael@0 | 429 | times 4 dd 12000 |
michael@0 | 430 | align 16 |
michael@0 | 431 | _51000: |
michael@0 | 432 | times 4 dd 51000 |