Mercurial > hg > dmlib
comparison src/dmvecmat.c @ 1102:e06abfde6c39
Cosmetics pass: Remove excess whitespace.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 03 Mar 2015 23:22:36 +0200 |
parents | 27949209238b |
children | 848a88ce7a57 |
comparison
equal
deleted
inserted
replaced
1101:0577f10dc3de | 1102:e06abfde6c39 |
---|---|
99 "movups 32(%%edx), %%xmm6\n" | 99 "movups 32(%%edx), %%xmm6\n" |
100 "movups 48(%%edx), %%xmm7\n" | 100 "movups 48(%%edx), %%xmm7\n" |
101 | 101 |
102 // vector -> xmm0 | 102 // vector -> xmm0 |
103 "movups %2, %%xmm0\n" | 103 "movups %2, %%xmm0\n" |
104 | 104 |
105 // zero final result in xmm2 | 105 // zero final result in xmm2 |
106 "xorps %%xmm2, %%xmm2\n" | 106 "xorps %%xmm2, %%xmm2\n" |
107 | 107 |
108 // perform shuffle and multiply and add whole "column" "X" | 108 // perform shuffle and multiply and add whole "column" "X" |
109 "movups %%xmm0, %%xmm1\n" | 109 "movups %%xmm0, %%xmm1\n" |
167 #ifdef DM_USE_SIMD | 167 #ifdef DM_USE_SIMD |
168 asm volatile | 168 asm volatile |
169 ( | 169 ( |
170 // list[i] -> xmm0 | 170 // list[i] -> xmm0 |
171 "movups %1, %%xmm0\n" | 171 "movups %1, %%xmm0\n" |
172 | 172 |
173 // zero final result in xmm2 | 173 // zero final result in xmm2 |
174 "xorps %%xmm2, %%xmm2\n" | 174 "xorps %%xmm2, %%xmm2\n" |
175 | 175 |
176 // perform shuffle and multiply and add whole "column" "X" | 176 // perform shuffle and multiply and add whole "column" "X" |
177 "movups %%xmm0, %%xmm1\n" | 177 "movups %%xmm0, %%xmm1\n" |
253 "movups (%%ebx), %%xmm0\n" // mat1[0] | 253 "movups (%%ebx), %%xmm0\n" // mat1[0] |
254 "movups (%%edx), %%xmm1\n" // mat2[0] | 254 "movups (%%edx), %%xmm1\n" // mat2[0] |
255 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] | 255 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] |
256 "mulps %%xmm0, %%xmm1\n" | 256 "mulps %%xmm0, %%xmm1\n" |
257 "movups %%xmm1, %%xmm3\n" | 257 "movups %%xmm1, %%xmm3\n" |
258 | 258 |
259 // 1 | 259 // 1 |
260 "movups 16(%%ebx), %%xmm0\n" // mat1[0] | 260 "movups 16(%%ebx), %%xmm0\n" // mat1[0] |
261 "movups (%%edx), %%xmm1\n" // mat2[0] | 261 "movups (%%edx), %%xmm1\n" // mat2[0] |
262 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] | 262 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] |
263 "mulps %%xmm0, %%xmm1\n" | 263 "mulps %%xmm0, %%xmm1\n" |
288 "movups (%%ebx), %%xmm0\n" // mat1[0] | 288 "movups (%%ebx), %%xmm0\n" // mat1[0] |
289 "movups 16(%%edx), %%xmm1\n" // mat2[1] | 289 "movups 16(%%edx), %%xmm1\n" // mat2[1] |
290 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] | 290 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] |
291 "mulps %%xmm0, %%xmm1\n" | 291 "mulps %%xmm0, %%xmm1\n" |
292 "movups %%xmm1, %%xmm3\n" | 292 "movups %%xmm1, %%xmm3\n" |
293 | 293 |
294 // 1 | 294 // 1 |
295 "movups 16(%%ebx), %%xmm0\n" // mat1[0] | 295 "movups 16(%%ebx), %%xmm0\n" // mat1[0] |
296 "movups 16(%%edx), %%xmm1\n" // mat2[1] | 296 "movups 16(%%edx), %%xmm1\n" // mat2[1] |
297 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] | 297 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] |
298 "mulps %%xmm0, %%xmm1\n" | 298 "mulps %%xmm0, %%xmm1\n" |
323 "movups (%%ebx), %%xmm0\n" // mat1[0] | 323 "movups (%%ebx), %%xmm0\n" // mat1[0] |
324 "movups 32(%%edx), %%xmm1\n" // mat2[1] | 324 "movups 32(%%edx), %%xmm1\n" // mat2[1] |
325 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] | 325 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] |
326 "mulps %%xmm0, %%xmm1\n" | 326 "mulps %%xmm0, %%xmm1\n" |
327 "movups %%xmm1, %%xmm3\n" | 327 "movups %%xmm1, %%xmm3\n" |
328 | 328 |
329 // 1 | 329 // 1 |
330 "movups 16(%%ebx), %%xmm0\n" // mat1[0] | 330 "movups 16(%%ebx), %%xmm0\n" // mat1[0] |
331 "movups 32(%%edx), %%xmm1\n" // mat2[1] | 331 "movups 32(%%edx), %%xmm1\n" // mat2[1] |
332 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] | 332 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] |
333 "mulps %%xmm0, %%xmm1\n" | 333 "mulps %%xmm0, %%xmm1\n" |
358 "movups (%%ebx), %%xmm0\n" // mat1[0] | 358 "movups (%%ebx), %%xmm0\n" // mat1[0] |
359 "movups 48(%%edx), %%xmm1\n" // mat2[1] | 359 "movups 48(%%edx), %%xmm1\n" // mat2[1] |
360 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] | 360 "shufps $0x00, %%xmm1, %%xmm1\n" // mat2[0][0] |
361 "mulps %%xmm0, %%xmm1\n" | 361 "mulps %%xmm0, %%xmm1\n" |
362 "movups %%xmm1, %%xmm3\n" | 362 "movups %%xmm1, %%xmm3\n" |
363 | 363 |
364 // 1 | 364 // 1 |
365 "movups 16(%%ebx), %%xmm0\n" // mat1[0] | 365 "movups 16(%%ebx), %%xmm0\n" // mat1[0] |
366 "movups 48(%%edx), %%xmm1\n" // mat2[1] | 366 "movups 48(%%edx), %%xmm1\n" // mat2[1] |
367 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] | 367 "shufps $0x55, %%xmm1, %%xmm1\n" // mat2[0][1] |
368 "mulps %%xmm0, %%xmm1\n" | 368 "mulps %%xmm0, %%xmm1\n" |
429 q = cx * sz, | 429 q = cx * sz, |
430 l = cx * cz, | 430 l = cx * cz, |
431 i = sx * sz, | 431 i = sx * sz, |
432 j = sx * cz; | 432 j = sx * cz; |
433 | 433 |
434 mat->m[0][3] = | 434 mat->m[0][3] = |
435 mat->m[1][3] = | 435 mat->m[1][3] = |
436 mat->m[2][3] = | 436 mat->m[2][3] = |
437 mat->m[3][0] = | 437 mat->m[3][0] = |
438 mat->m[3][1] = | 438 mat->m[3][1] = |
439 mat->m[3][2] = 0; | 439 mat->m[3][2] = 0; |
440 | 440 |
441 mat->m[3][3] = 1.0f; | 441 mat->m[3][3] = 1.0f; |
442 | 442 |
443 mat->m[0][0] = cy * cz; | 443 mat->m[0][0] = cy * cz; |