OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 __ cvttps2dq(xmm1, xmm0); | 455 __ cvttps2dq(xmm1, xmm0); |
456 __ cvttps2dq(xmm1, Operand(ebx, ecx, times_4, 10000)); | 456 __ cvttps2dq(xmm1, Operand(ebx, ecx, times_4, 10000)); |
457 __ movsd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 457 __ movsd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
458 __ movsd(Operand(ebx, ecx, times_4, 10000), xmm1); | 458 __ movsd(Operand(ebx, ecx, times_4, 10000), xmm1); |
459 // 128 bit move instructions. | 459 // 128 bit move instructions. |
460 __ movdqa(xmm0, Operand(ebx, ecx, times_4, 10000)); | 460 __ movdqa(xmm0, Operand(ebx, ecx, times_4, 10000)); |
461 __ movdqa(Operand(ebx, ecx, times_4, 10000), xmm0); | 461 __ movdqa(Operand(ebx, ecx, times_4, 10000), xmm0); |
462 __ movdqu(xmm0, Operand(ebx, ecx, times_4, 10000)); | 462 __ movdqu(xmm0, Operand(ebx, ecx, times_4, 10000)); |
463 __ movdqu(Operand(ebx, ecx, times_4, 10000), xmm0); | 463 __ movdqu(Operand(ebx, ecx, times_4, 10000), xmm0); |
464 | 464 |
| 465 __ movd(xmm0, edi); |
| 466 __ movd(xmm0, Operand(ebx, ecx, times_4, 10000)); |
| 467 __ movd(eax, xmm1); |
| 468 __ movd(Operand(ebx, ecx, times_4, 10000), xmm1); |
| 469 |
465 __ addsd(xmm1, xmm0); | 470 __ addsd(xmm1, xmm0); |
466 __ addsd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 471 __ addsd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
467 __ mulsd(xmm1, xmm0); | 472 __ mulsd(xmm1, xmm0); |
468 __ mulsd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 473 __ mulsd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
469 __ subsd(xmm1, xmm0); | 474 __ subsd(xmm1, xmm0); |
470 __ subsd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 475 __ subsd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
471 __ divsd(xmm1, xmm0); | 476 __ divsd(xmm1, xmm0); |
472 __ divsd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 477 __ divsd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
473 __ minsd(xmm1, xmm0); | 478 __ minsd(xmm1, xmm0); |
474 __ minsd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 479 __ minsd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
475 __ maxsd(xmm1, xmm0); | 480 __ maxsd(xmm1, xmm0); |
476 __ maxsd(xmm1, Operand(ebx, ecx, times_4, 10000)); | 481 __ maxsd(xmm1, Operand(ebx, ecx, times_4, 10000)); |
477 __ ucomisd(xmm0, xmm1); | 482 __ ucomisd(xmm0, xmm1); |
478 __ cmpltsd(xmm0, xmm1); | 483 __ cmpltsd(xmm0, xmm1); |
479 | 484 |
480 __ andpd(xmm0, xmm1); | 485 __ andpd(xmm0, xmm1); |
481 | 486 |
482 __ psllw(xmm0, 17); | 487 __ psllw(xmm0, 17); |
483 __ pslld(xmm0, 17); | 488 __ pslld(xmm0, 17); |
484 __ psrlw(xmm0, 17); | 489 __ psrlw(xmm0, 17); |
485 __ psrld(xmm0, 17); | 490 __ psrld(xmm0, 17); |
486 __ psraw(xmm0, 17); | 491 __ psraw(xmm0, 17); |
487 __ psrad(xmm0, 17); | 492 __ psrad(xmm0, 17); |
488 __ psllq(xmm0, 17); | 493 __ psllq(xmm0, 17); |
489 __ psllq(xmm0, xmm1); | 494 __ psllq(xmm0, xmm1); |
490 __ psrlq(xmm0, 17); | 495 __ psrlq(xmm0, 17); |
491 __ psrlq(xmm0, xmm1); | 496 __ psrlq(xmm0, xmm1); |
492 | 497 |
| 498 __ pshufd(xmm5, xmm1, 5); |
| 499 __ pshufd(xmm5, Operand(edx, 4), 5); |
493 __ pinsrw(xmm5, edx, 5); | 500 __ pinsrw(xmm5, edx, 5); |
494 __ pinsrw(xmm5, Operand(edx, 4), 5); | 501 __ pinsrw(xmm5, Operand(edx, 4), 5); |
495 | 502 |
496 #define EMIT_SSE2_INSTR(instruction, notUsed1, notUsed2, notUsed3) \ | 503 #define EMIT_SSE2_INSTR(instruction, notUsed1, notUsed2, notUsed3) \ |
497 __ instruction(xmm5, xmm1); \ | 504 __ instruction(xmm5, xmm1); \ |
498 __ instruction(xmm5, Operand(edx, 4)); | 505 __ instruction(xmm5, Operand(edx, 4)); |
499 | 506 |
500 SSE2_INSTRUCTION_LIST(EMIT_SSE2_INSTR) | 507 SSE2_INSTRUCTION_LIST(EMIT_SSE2_INSTR) |
501 #undef EMIT_SSE2_INSTR | 508 #undef EMIT_SSE2_INSTR |
502 } | 509 } |
(...skipping 15 matching lines...) Expand all Loading... |
518 __ cmov(less, eax, Operand(edx, 0)); | 525 __ cmov(less, eax, Operand(edx, 0)); |
519 __ cmov(greater_equal, eax, Operand(edx, 1)); | 526 __ cmov(greater_equal, eax, Operand(edx, 1)); |
520 __ cmov(less_equal, eax, Operand(edx, 2)); | 527 __ cmov(less_equal, eax, Operand(edx, 2)); |
521 __ cmov(greater, eax, Operand(edx, 3)); | 528 __ cmov(greater, eax, Operand(edx, 3)); |
522 } | 529 } |
523 | 530 |
524 { | 531 { |
525 if (CpuFeatures::IsSupported(SSE4_1)) { | 532 if (CpuFeatures::IsSupported(SSE4_1)) { |
526 CpuFeatureScope scope(&assm, SSE4_1); | 533 CpuFeatureScope scope(&assm, SSE4_1); |
527 __ pextrd(eax, xmm0, 1); | 534 __ pextrd(eax, xmm0, 1); |
| 535 __ pextrd(Operand(edx, 4), xmm0, 1); |
528 __ pinsrd(xmm1, eax, 0); | 536 __ pinsrd(xmm1, eax, 0); |
| 537 __ pinsrd(xmm1, Operand(edx, 4), 0); |
529 __ extractps(eax, xmm1, 0); | 538 __ extractps(eax, xmm1, 0); |
530 | 539 |
531 #define EMIT_SSE4_INSTR(instruction, notUsed1, notUsed2, notUsed3, notUsed4) \ | 540 #define EMIT_SSE4_INSTR(instruction, notUsed1, notUsed2, notUsed3, notUsed4) \ |
532 __ instruction(xmm5, xmm1); \ | 541 __ instruction(xmm5, xmm1); \ |
533 __ instruction(xmm5, Operand(edx, 4)); | 542 __ instruction(xmm5, Operand(edx, 4)); |
534 | 543 |
535 SSE4_INSTRUCTION_LIST(EMIT_SSE4_INSTR) | 544 SSE4_INSTRUCTION_LIST(EMIT_SSE4_INSTR) |
536 #undef EMIT_SSE4_INSTR | 545 #undef EMIT_SSE4_INSTR |
537 } | 546 } |
538 } | 547 } |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 __ vmaxpd(xmm0, xmm1, xmm2); | 623 __ vmaxpd(xmm0, xmm1, xmm2); |
615 __ vmaxpd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); | 624 __ vmaxpd(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); |
616 | 625 |
617 __ vpsllw(xmm0, xmm7, 21); | 626 __ vpsllw(xmm0, xmm7, 21); |
618 __ vpslld(xmm0, xmm7, 21); | 627 __ vpslld(xmm0, xmm7, 21); |
619 __ vpsrlw(xmm0, xmm7, 21); | 628 __ vpsrlw(xmm0, xmm7, 21); |
620 __ vpsrld(xmm0, xmm7, 21); | 629 __ vpsrld(xmm0, xmm7, 21); |
621 __ vpsraw(xmm0, xmm7, 21); | 630 __ vpsraw(xmm0, xmm7, 21); |
622 __ vpsrad(xmm0, xmm7, 21); | 631 __ vpsrad(xmm0, xmm7, 21); |
623 | 632 |
| 633 __ vpshufd(xmm5, xmm1, 5); |
| 634 __ vpshufd(xmm5, Operand(edx, 4), 5); |
| 635 __ vpextrd(eax, xmm0, 1); |
| 636 __ vpextrd(Operand(edx, 4), xmm0, 1); |
| 637 __ vpinsrd(xmm0, xmm1, eax, 0); |
| 638 __ vpinsrd(xmm0, xmm1, Operand(edx, 4), 0); |
| 639 |
624 __ vcvtdq2ps(xmm1, xmm0); | 640 __ vcvtdq2ps(xmm1, xmm0); |
625 __ vcvtdq2ps(xmm1, Operand(ebx, ecx, times_4, 10000)); | 641 __ vcvtdq2ps(xmm1, Operand(ebx, ecx, times_4, 10000)); |
626 __ vcvttps2dq(xmm1, xmm0); | 642 __ vcvttps2dq(xmm1, xmm0); |
627 __ vcvttps2dq(xmm1, Operand(ebx, ecx, times_4, 10000)); | 643 __ vcvttps2dq(xmm1, Operand(ebx, ecx, times_4, 10000)); |
628 | 644 |
| 645 __ vmovd(xmm0, edi); |
| 646 __ vmovd(xmm0, Operand(ebx, ecx, times_4, 10000)); |
| 647 __ vmovd(eax, xmm1); |
| 648 __ vmovd(Operand(ebx, ecx, times_4, 10000), xmm1); |
629 #define EMIT_SSE2_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3) \ | 649 #define EMIT_SSE2_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3) \ |
630 __ v##instruction(xmm7, xmm5, xmm1); \ | 650 __ v##instruction(xmm7, xmm5, xmm1); \ |
631 __ v##instruction(xmm7, xmm5, Operand(edx, 4)); | 651 __ v##instruction(xmm7, xmm5, Operand(edx, 4)); |
632 | 652 |
633 SSE2_INSTRUCTION_LIST(EMIT_SSE2_AVXINSTR) | 653 SSE2_INSTRUCTION_LIST(EMIT_SSE2_AVXINSTR) |
634 #undef EMIT_SSE2_AVXINSTR | 654 #undef EMIT_SSE2_AVXINSTR |
635 | 655 |
636 #define EMIT_SSE4_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3, \ | 656 #define EMIT_SSE4_AVXINSTR(instruction, notUsed1, notUsed2, notUsed3, \ |
637 notUsed4) \ | 657 notUsed4) \ |
638 __ v##instruction(xmm7, xmm5, xmm1); \ | 658 __ v##instruction(xmm7, xmm5, xmm1); \ |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 #ifdef OBJECT_PRINT | 826 #ifdef OBJECT_PRINT |
807 OFStream os(stdout); | 827 OFStream os(stdout); |
808 code->Print(os); | 828 code->Print(os); |
809 byte* begin = code->instruction_start(); | 829 byte* begin = code->instruction_start(); |
810 byte* end = begin + code->instruction_size(); | 830 byte* end = begin + code->instruction_size(); |
811 disasm::Disassembler::Disassemble(stdout, begin, end); | 831 disasm::Disassembler::Disassemble(stdout, begin, end); |
812 #endif | 832 #endif |
813 } | 833 } |
814 | 834 |
815 #undef __ | 835 #undef __ |
OLD | NEW |