diff options
Diffstat (limited to 'chromium/v8/src/codegen/x64/assembler-x64.cc')
-rw-r--r-- | chromium/v8/src/codegen/x64/assembler-x64.cc | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/chromium/v8/src/codegen/x64/assembler-x64.cc b/chromium/v8/src/codegen/x64/assembler-x64.cc index 1d28f1d45dd..1783da700ba 100644 --- a/chromium/v8/src/codegen/x64/assembler-x64.cc +++ b/chromium/v8/src/codegen/x64/assembler-x64.cc @@ -109,15 +109,16 @@ void CpuFeatures::ProbeImpl(bool cross_compile) { void CpuFeatures::PrintTarget() {} void CpuFeatures::PrintFeatures() { printf( - "SSE3=%d SSSE3=%d SSE4_1=%d SAHF=%d AVX=%d FMA3=%d BMI1=%d BMI2=%d " + "SSE3=%d SSSE3=%d SSE4_1=%d SSE4_2=%d SAHF=%d AVX=%d FMA3=%d BMI1=%d " + "BMI2=%d " "LZCNT=%d " "POPCNT=%d ATOM=%d\n", CpuFeatures::IsSupported(SSE3), CpuFeatures::IsSupported(SSSE3), - CpuFeatures::IsSupported(SSE4_1), CpuFeatures::IsSupported(SAHF), - CpuFeatures::IsSupported(AVX), CpuFeatures::IsSupported(FMA3), - CpuFeatures::IsSupported(BMI1), CpuFeatures::IsSupported(BMI2), - CpuFeatures::IsSupported(LZCNT), CpuFeatures::IsSupported(POPCNT), - CpuFeatures::IsSupported(ATOM)); + CpuFeatures::IsSupported(SSE4_1), CpuFeatures::IsSupported(SSE4_2), + CpuFeatures::IsSupported(SAHF), CpuFeatures::IsSupported(AVX), + CpuFeatures::IsSupported(FMA3), CpuFeatures::IsSupported(BMI1), + CpuFeatures::IsSupported(BMI2), CpuFeatures::IsSupported(LZCNT), + CpuFeatures::IsSupported(POPCNT), CpuFeatures::IsSupported(ATOM)); } // ----------------------------------------------------------------------------- @@ -428,6 +429,9 @@ Assembler::Assembler(const AssemblerOptions& options, std::unique_ptr<AssemblerBuffer> buffer) : AssemblerBase(options, std::move(buffer)), constpool_(this) { reloc_info_writer.Reposition(buffer_start_ + buffer_->size(), pc_); + if (CpuFeatures::IsSupported(SSE4_2)) { + EnableCpuFeature(SSE4_1); + } if (CpuFeatures::IsSupported(SSE4_1)) { EnableCpuFeature(SSSE3); } @@ -3524,8 +3528,8 @@ void Assembler::cmpps(XMMRegister dst, Operand src, int8_t cmp) { void Assembler::cmppd(XMMRegister dst, XMMRegister src, int8_t cmp) { EnsureSpace ensure_space(this); - emit_optional_rex_32(dst, src); emit(0x66); + emit_optional_rex_32(dst, src); emit(0x0F); emit(0xC2); emit_sse_operand(dst, src); @@ -3534,8 +3538,8 @@ void Assembler::cmppd(XMMRegister dst, XMMRegister src, int8_t cmp) { void Assembler::cmppd(XMMRegister dst, Operand src, int8_t cmp) { EnsureSpace ensure_space(this); - emit_optional_rex_32(dst, src); emit(0x66); + emit_optional_rex_32(dst, src); emit(0x0F); emit(0xC2); emit_sse_operand(dst, src); @@ -4716,6 +4720,26 @@ void Assembler::lddqu(XMMRegister dst, Operand src) { emit_sse_operand(dst, src); } +void Assembler::movddup(XMMRegister dst, XMMRegister src) { + DCHECK(IsEnabled(SSE3)); + EnsureSpace ensure_space(this); + emit(0xF2); + emit_optional_rex_32(dst, src); + emit(0x0F); + emit(0x12); + emit_sse_operand(dst, src); +} + +void Assembler::movddup(XMMRegister dst, Operand src) { + DCHECK(IsEnabled(SSE3)); + EnsureSpace ensure_space(this); + emit(0xF2); + emit_optional_rex_32(dst, src); + emit(0x0F); + emit(0x12); + emit_sse_operand(dst, src); +} + void Assembler::psrldq(XMMRegister dst, uint8_t shift) { EnsureSpace ensure_space(this); emit(0x66); |