Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: test/cctest/test-disasm-ia32.cc

Issue 1069683002: [ia32] Introduce BMI instructions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Align with gdb disassembler Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 583
584 __ vfnmsub132ss(xmm0, xmm1, xmm2); 584 __ vfnmsub132ss(xmm0, xmm1, xmm2);
585 __ vfnmsub132ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); 585 __ vfnmsub132ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000));
586 __ vfnmsub213ss(xmm0, xmm1, xmm2); 586 __ vfnmsub213ss(xmm0, xmm1, xmm2);
587 __ vfnmsub213ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); 587 __ vfnmsub213ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000));
588 __ vfnmsub231ss(xmm0, xmm1, xmm2); 588 __ vfnmsub231ss(xmm0, xmm1, xmm2);
589 __ vfnmsub231ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000)); 589 __ vfnmsub231ss(xmm0, xmm1, Operand(ebx, ecx, times_4, 10000));
590 } 590 }
591 } 591 }
592 592
593 // BMI1 instructions
594 {
595 if (CpuFeatures::IsSupported(BMI1)) {
596 CpuFeatureScope scope(&assm, BMI1);
597 __ andn(eax, ebx, ecx);
598 __ andn(eax, ebx, Operand(ebx, ecx, times_4, 10000));
599 __ bextr(eax, ebx, ecx);
600 __ bextr(eax, Operand(ebx, ecx, times_4, 10000), ebx);
601 __ blsi(eax, ebx);
602 __ blsi(eax, Operand(ebx, ecx, times_4, 10000));
603 __ blsmsk(eax, ebx);
604 __ blsmsk(eax, Operand(ebx, ecx, times_4, 10000));
605 __ blsr(eax, ebx);
606 __ blsr(eax, Operand(ebx, ecx, times_4, 10000));
607 __ tzcnt(eax, ebx);
608 __ tzcnt(eax, Operand(ebx, ecx, times_4, 10000));
609 }
610 }
611
612 // LZCNT instructions
613 {
614 if (CpuFeatures::IsSupported(LZCNT)) {
615 CpuFeatureScope scope(&assm, LZCNT);
616 __ lzcnt(eax, ebx);
617 __ lzcnt(eax, Operand(ebx, ecx, times_4, 10000));
618 }
619 }
620
621 // POPCNT instructions
622 {
623 if (CpuFeatures::IsSupported(POPCNT)) {
624 CpuFeatureScope scope(&assm, POPCNT);
625 __ popcnt(eax, ebx);
626 __ popcnt(eax, Operand(ebx, ecx, times_4, 10000));
627 }
628 }
629
630 // BMI2 instructions
631 {
632 if (CpuFeatures::IsSupported(BMI2)) {
633 CpuFeatureScope scope(&assm, BMI2);
634 __ bzhi(eax, ebx, ecx);
635 __ bzhi(eax, Operand(ebx, ecx, times_4, 10000), ebx);
636 __ mulx(eax, ebx, ecx);
637 __ mulx(eax, ebx, Operand(ebx, ecx, times_4, 10000));
638 __ pdep(eax, ebx, ecx);
639 __ pdep(eax, ebx, Operand(ebx, ecx, times_4, 10000));
640 __ pext(eax, ebx, ecx);
641 __ pext(eax, ebx, Operand(ebx, ecx, times_4, 10000));
642 __ sarx(eax, ebx, ecx);
643 __ sarx(eax, Operand(ebx, ecx, times_4, 10000), ebx);
644 __ shlx(eax, ebx, ecx);
645 __ shlx(eax, Operand(ebx, ecx, times_4, 10000), ebx);
646 __ shrx(eax, ebx, ecx);
647 __ shrx(eax, Operand(ebx, ecx, times_4, 10000), ebx);
648 __ rorx(eax, ebx, 31);
649 __ rorx(eax, Operand(ebx, ecx, times_4, 10000), 31);
650 }
651 }
652
593 // xchg. 653 // xchg.
594 { 654 {
595 __ xchg(eax, eax); 655 __ xchg(eax, eax);
596 __ xchg(eax, ebx); 656 __ xchg(eax, ebx);
597 __ xchg(ebx, ebx); 657 __ xchg(ebx, ebx);
598 __ xchg(ebx, Operand(esp, 12)); 658 __ xchg(ebx, Operand(esp, 12));
599 } 659 }
600 660
601 // Nop instructions 661 // Nop instructions
602 for (int i = 0; i < 16; i++) { 662 for (int i = 0; i < 16; i++) {
(...skipping 10 matching lines...) Expand all
613 #ifdef OBJECT_PRINT 673 #ifdef OBJECT_PRINT
614 OFStream os(stdout); 674 OFStream os(stdout);
615 code->Print(os); 675 code->Print(os);
616 byte* begin = code->instruction_start(); 676 byte* begin = code->instruction_start();
617 byte* end = begin + code->instruction_size(); 677 byte* end = begin + code->instruction_size();
618 disasm::Disassembler::Disassemble(stdout, begin, end); 678 disasm::Disassembler::Disassemble(stdout, begin, end);
619 #endif 679 #endif
620 } 680 }
621 681
622 #undef __ 682 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698