OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that be | 3 * Use of this source code is governed by a BSD-style license that be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 /* | 7 /* |
8 * Defines SSE instructions. Taken from: | 8 * Defines SSE instructions. Taken from: |
9 * (1) Tables A-3 and A-4 of appendix "A2 - Opcode Encodings", in AMD | 9 * (1) Tables A-3 and A-4 of appendix "A2 - Opcode Encodings", in AMD |
10 * document 24594-Rev.3.14-September 2007: "AMD64 Architecture | 10 * document 24594-Rev.3.14-September 2007: "AMD64 Architecture |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
322 NaClDefine(" f20f79: Insertq $Vdq, $VRdq", NACLi_SSE4A, st, Binary); | 322 NaClDefine(" f20f79: Insertq $Vdq, $VRdq", NACLi_SSE4A, st, Binary); |
323 NaClDefIter(" f20f7a+@i: Invalid", 0, 1, NACLi_INVALID, st, Other); | 323 NaClDefIter(" f20f7a+@i: Invalid", 0, 1, NACLi_INVALID, st, Other); |
324 NaClDefine(" f20f7c: Haddps $Vps, $Wps", NACLi_SSE3, st, Binary); | 324 NaClDefine(" f20f7c: Haddps $Vps, $Wps", NACLi_SSE3, st, Binary); |
325 NaClDefine(" f20f7d: Hsubps $Vps, $Wps", NACLi_SSE3, st, Binary); | 325 NaClDefine(" f20f7d: Hsubps $Vps, $Wps", NACLi_SSE3, st, Binary); |
326 NaClDefIter(" f20f7e+@i: Invalid", 0, 1, NACLi_INVALID, st, Other); | 326 NaClDefIter(" f20f7e+@i: Invalid", 0, 1, NACLi_INVALID, st, Other); |
327 NaClDefIter(" f30f78+@i: Invalid", 0, 5, NACLi_INVALID, st, Other); | 327 NaClDefIter(" f30f78+@i: Invalid", 0, 5, NACLi_INVALID, st, Other); |
328 NaClDefine(" f30f7e: Movq $Vq, $Wq", NACLi_SSE2, st, Move); | 328 NaClDefine(" f30f7e: Movq $Vq, $Wq", NACLi_SSE2, st, Move); |
329 NaClDefine(" f30f7f: Movdqu $Wdq, $Vdq", NACLi_SSE2, st, Move); | 329 NaClDefine(" f30f7f: Movdqu $Wdq, $Vdq", NACLi_SSE2, st, Move); |
330 NaClDefIter(" f20fb8+@i: Invalid", 0, 7, NACLi_INVALID, st, Other); | 330 NaClDefIter(" f20fb8+@i: Invalid", 0, 7, NACLi_INVALID, st, Other); |
331 NaClDefine(" f30fb8: Popcnt $Gv, $Ev", NACLi_POPCNT, st, Move); | 331 NaClDefine(" f30fb8: Popcnt $Gv, $Ev", NACLi_POPCNT, st, Move); |
332 NaClDefIter(" f30fb9+@i: Invalid", 0, 3, NACLi_INVALID, st, Other); | 332 NaClDefIter(" f30fb9+@i: Invalid", 0, 2, NACLi_INVALID, st, Other); |
333 NaClDefine(" f30fbd: Lzcnt $Gv, $Ev", NACLi_LZCNT, st, Move); | 333 /* tzcnt is treated as a bsf on machines that don't have tzcnt. |
334 * Hence, even though its conditional on NACLi_LZCNT, we act | |
335 * like it can be used on all processors. | |
336 */ | |
337 NaClDefine(" f30fbc: Tzcnt $Gv, $Ev", NACLi_386, st, Move); | |
Karl
2012/07/24 21:28:18
Made tzcnt and lzcnt work on all processors.
| |
338 /* lzcnt is treated as a bsr on machines that don't have lzcnt. | |
339 * Hence, even though its conditional on NACLi_LZCNT, we act | |
340 * like it can be used on all processors. | |
341 */ | |
342 NaClDefine(" f30fbd: Lzcnt $Gv, $Ev", NACLi_386, st, Move); | |
334 NaClDefIter(" f30fbe+@i: Invalid", 0, 1, NACLi_INVALID, st, Other); | 343 NaClDefIter(" f30fbe+@i: Invalid", 0, 1, NACLi_INVALID, st, Other); |
335 NaClDefine(" 0fc2: Cmpps $Vps, $Wps, $Ib", | 344 NaClDefine(" 0fc2: Cmpps $Vps, $Wps, $Ib", |
336 NACLi_SSE, st, Nary); | 345 NACLi_SSE, st, Nary); |
337 NaClDefine(" 0fc3: Movnti $Md/q $Gd/q", NACLi_SSE2, st, Move); | 346 NaClDefine(" 0fc3: Movnti $Md/q $Gd/q", NACLi_SSE2, st, Move); |
338 /* Note: Pinsrw follows Intel's table, not ADM, which uses: | 347 /* Note: Pinsrw follows Intel's table, not ADM, which uses: |
339 * Pinsrw $Pq, $Ew, $Ib | 348 * Pinsrw $Pq, $Ew, $Ib |
340 */ | 349 */ |
341 NaClDefine(" 0fc4: Pinsrw $Pq, $Rd/q/Mw, $Ib", | 350 NaClDefine(" 0fc4: Pinsrw $Pq, $Rd/q/Mw, $Ib", |
342 NACLi_SSE, st, Nary); | 351 NACLi_SSE, st, Nary); |
343 NaClDefine(" 0fc5: Pextrw $Gd, $PRq, $Ib", | 352 NaClDefine(" 0fc5: Pextrw $Gd, $PRq, $Ib", |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
598 NACLi_SSE42, st, O1Nary); | 607 NACLi_SSE42, st, O1Nary); |
599 NaClDefine(" 660f3a63: Pcmpistri {$rCXv}, $Vdq, $Wdq, $Ib", | 608 NaClDefine(" 660f3a63: Pcmpistri {$rCXv}, $Vdq, $Wdq, $Ib", |
600 NACLi_SSE42, st, O1Nary); | 609 NACLi_SSE42, st, O1Nary); |
601 } | 610 } |
602 | 611 |
603 void NaClDefSseInsts(struct NaClSymbolTable* st) { | 612 void NaClDefSseInsts(struct NaClSymbolTable* st) { |
604 NaClDefNarySseInsts(st); | 613 NaClDefNarySseInsts(st); |
605 NaClDefBinarySseInsts(st); | 614 NaClDefBinarySseInsts(st); |
606 NaClDefMmxInsts(st); | 615 NaClDefMmxInsts(st); |
607 } | 616 } |
OLD | NEW |