Index: test/cctest/test-disasm-x64.cc |
diff --git a/test/cctest/test-disasm-x64.cc b/test/cctest/test-disasm-x64.cc |
index 7b95eae54d81e47cafef64edbba27b9a02b540fb..072b3b8426148c60423cd7ace1eb6f258c2c0e46 100644 |
--- a/test/cctest/test-disasm-x64.cc |
+++ b/test/cctest/test-disasm-x64.cc |
@@ -596,6 +596,99 @@ TEST(DisasmX64) { |
__ vfnmsub231ss(xmm0, xmm1, Operand(rbx, rcx, times_4, 10000)); |
} |
} |
+ |
+ // BMI1 instructions |
+ { |
+ if (CpuFeatures::IsSupported(BMI1)) { |
+ CpuFeatureScope scope(&assm, BMI1); |
+ __ andnq(rax, rbx, rcx); |
+ __ andnq(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ andnl(rax, rbx, rcx); |
+ __ andnl(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ bextrq(rax, rbx, rcx); |
+ __ bextrq(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ bextrl(rax, rbx, rcx); |
+ __ bextrl(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ blsiq(rax, rbx); |
+ __ blsiq(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ blsil(rax, rbx); |
+ __ blsil(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ blsmskq(rax, rbx); |
+ __ blsmskq(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ blsmskl(rax, rbx); |
+ __ blsmskl(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ blsrq(rax, rbx); |
+ __ blsrq(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ blsrl(rax, rbx); |
+ __ blsrl(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ tzcntq(rax, rbx); |
+ __ tzcntq(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ tzcntl(rax, rbx); |
+ __ tzcntl(rax, Operand(rbx, rcx, times_4, 10000)); |
+ } |
+ } |
+ |
+ // LZCNT instructions |
+ { |
+ if (CpuFeatures::IsSupported(LZCNT)) { |
+ CpuFeatureScope scope(&assm, LZCNT); |
+ __ lzcntq(rax, rbx); |
+ __ lzcntq(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ lzcntl(rax, rbx); |
+ __ lzcntl(rax, Operand(rbx, rcx, times_4, 10000)); |
+ } |
+ } |
+ |
+ // POPCNT instructions |
+ { |
+ if (CpuFeatures::IsSupported(POPCNT)) { |
+ CpuFeatureScope scope(&assm, POPCNT); |
+ __ popcntq(rax, rbx); |
+ __ popcntq(rax, Operand(rbx, rcx, times_4, 10000)); |
+ __ popcntl(rax, rbx); |
+ __ popcntl(rax, Operand(rbx, rcx, times_4, 10000)); |
+ } |
+ } |
+ |
+ // BMI2 instructions |
+ { |
+ if (CpuFeatures::IsSupported(BMI2)) { |
+ CpuFeatureScope scope(&assm, BMI2); |
+ __ bzhiq(rax, rbx, rcx); |
+ __ bzhiq(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ bzhil(rax, rbx, rcx); |
+ __ bzhil(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ mulxq(rax, rbx, rcx); |
+ __ mulxq(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ mulxl(rax, rbx, rcx); |
+ __ mulxl(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ pdepq(rax, rbx, rcx); |
+ __ pdepq(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ pdepl(rax, rbx, rcx); |
+ __ pdepl(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ pextq(rax, rbx, rcx); |
+ __ pextq(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ pextl(rax, rbx, rcx); |
+ __ pextl(rax, rbx, Operand(rbx, rcx, times_4, 10000)); |
+ __ sarxq(rax, rbx, rcx); |
+ __ sarxq(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ sarxl(rax, rbx, rcx); |
+ __ sarxl(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ shlxq(rax, rbx, rcx); |
+ __ shlxq(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ shlxl(rax, rbx, rcx); |
+ __ shlxl(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ shrxq(rax, rbx, rcx); |
+ __ shrxq(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ shrxl(rax, rbx, rcx); |
+ __ shrxl(rax, Operand(rbx, rcx, times_4, 10000), rbx); |
+ __ rorxq(rax, rbx, 63); |
+ __ rorxq(rax, Operand(rbx, rcx, times_4, 10000), 63); |
+ __ rorxl(rax, rbx, 31); |
+ __ rorxl(rax, Operand(rbx, rcx, times_4, 10000), 31); |
+ } |
+ } |
+ |
// xchg. |
{ |
__ xchgq(rax, rax); |