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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-assembler-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-disasm-ia32.cc
diff --git a/test/cctest/test-disasm-ia32.cc b/test/cctest/test-disasm-ia32.cc
index ef0bf0e98ad25424eaa4c8d4111aba8bae0359aa..52df2fd039b5b82c3dcd894a75ee6389625fd82f 100644
--- a/test/cctest/test-disasm-ia32.cc
+++ b/test/cctest/test-disasm-ia32.cc
@@ -590,6 +590,66 @@ TEST(DisasmIa320) {
}
}
+ // BMI1 instructions
+ {
+ if (CpuFeatures::IsSupported(BMI1)) {
+ CpuFeatureScope scope(&assm, BMI1);
+ __ andn(eax, ebx, ecx);
+ __ andn(eax, ebx, Operand(ebx, ecx, times_4, 10000));
+ __ bextr(eax, ebx, ecx);
+ __ bextr(eax, Operand(ebx, ecx, times_4, 10000), ebx);
+ __ blsi(eax, ebx);
+ __ blsi(eax, Operand(ebx, ecx, times_4, 10000));
+ __ blsmsk(eax, ebx);
+ __ blsmsk(eax, Operand(ebx, ecx, times_4, 10000));
+ __ blsr(eax, ebx);
+ __ blsr(eax, Operand(ebx, ecx, times_4, 10000));
+ __ tzcnt(eax, ebx);
+ __ tzcnt(eax, Operand(ebx, ecx, times_4, 10000));
+ }
+ }
+
+ // LZCNT instructions
+ {
+ if (CpuFeatures::IsSupported(LZCNT)) {
+ CpuFeatureScope scope(&assm, LZCNT);
+ __ lzcnt(eax, ebx);
+ __ lzcnt(eax, Operand(ebx, ecx, times_4, 10000));
+ }
+ }
+
+ // POPCNT instructions
+ {
+ if (CpuFeatures::IsSupported(POPCNT)) {
+ CpuFeatureScope scope(&assm, POPCNT);
+ __ popcnt(eax, ebx);
+ __ popcnt(eax, Operand(ebx, ecx, times_4, 10000));
+ }
+ }
+
+ // BMI2 instructions
+ {
+ if (CpuFeatures::IsSupported(BMI2)) {
+ CpuFeatureScope scope(&assm, BMI2);
+ __ bzhi(eax, ebx, ecx);
+ __ bzhi(eax, Operand(ebx, ecx, times_4, 10000), ebx);
+ __ mulx(eax, ebx, ecx);
+ __ mulx(eax, ebx, Operand(ebx, ecx, times_4, 10000));
+ __ pdep(eax, ebx, ecx);
+ __ pdep(eax, ebx, Operand(ebx, ecx, times_4, 10000));
+ __ pext(eax, ebx, ecx);
+ __ pext(eax, ebx, Operand(ebx, ecx, times_4, 10000));
+ __ sarx(eax, ebx, ecx);
+ __ sarx(eax, Operand(ebx, ecx, times_4, 10000), ebx);
+ __ shlx(eax, ebx, ecx);
+ __ shlx(eax, Operand(ebx, ecx, times_4, 10000), ebx);
+ __ shrx(eax, ebx, ecx);
+ __ shrx(eax, Operand(ebx, ecx, times_4, 10000), ebx);
+ __ rorx(eax, ebx, 31);
+ __ rorx(eax, Operand(ebx, ecx, times_4, 10000), 31);
+ }
+ }
+
// xchg.
{
__ xchg(eax, eax);
« 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