From b479bed1e0a91a6553561014aa840e9e238a80fa Mon Sep 17 00:00:00 2001 From: Ng Zhi An Date: Tue, 16 Jul 2019 08:50:27 +0000 Subject: [PATCH] Fix disassembly of pcmpgtq pcmpgtq was added in https://crrev.com/c/1684362 but not to the disasembler. Bug: v8:8460 Change-Id: Id30f9ece015713e8597f5e218dc066ab75ccec96 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1703766 Reviewed-by: Deepti Gandluri Commit-Queue: Zhi An Ng Cr-Commit-Position: refs/heads/master@{#62750} --- src/diagnostics/x64/disasm-x64.cc | 1 + test/cctest/test-disasm-x64.cc | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/diagnostics/x64/disasm-x64.cc b/src/diagnostics/x64/disasm-x64.cc index 7347ab712d..9b978be8c0 100644 --- a/src/diagnostics/x64/disasm-x64.cc +++ b/src/diagnostics/x64/disasm-x64.cc @@ -1684,6 +1684,7 @@ int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) { SSSE3_INSTRUCTION_LIST(SSE34_DIS_CASE) SSE4_INSTRUCTION_LIST(SSE34_DIS_CASE) + SSE4_2_INSTRUCTION_LIST(SSE34_DIS_CASE) #undef SSE34_DIS_CASE default: UnimplementedInstruction(); diff --git a/test/cctest/test-disasm-x64.cc b/test/cctest/test-disasm-x64.cc index 15c043a784..a571bf9c6a 100644 --- a/test/cctest/test-disasm-x64.cc +++ b/test/cctest/test-disasm-x64.cc @@ -606,6 +606,14 @@ TEST(DisasmX64) { SSE4_INSTRUCTION_LIST(EMIT_SSE34_INSTR) } } + + { + if (CpuFeatures::IsSupported(SSE4_2)) { + CpuFeatureScope scope(&assm, SSE4_2); + + SSE4_2_INSTRUCTION_LIST(EMIT_SSE34_INSTR) + } + } #undef EMIT_SSE34_INSTR // AVX instruction