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); |