Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index 25ec35eb2c944771ea65268bac66981bf8f013f4..a3badca2d8af7a359a6b1f5ccf6d2832618c2600 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -2127,10 +2127,24 @@ void MacroAssembler::Move(XMMRegister dst, uint64_t src) { |
} |
} |
+void MacroAssembler::Pshufd(XMMRegister dst, const Operand& src, |
+ uint8_t shuffle) { |
+ if (CpuFeatures::IsSupported(AVX)) { |
+ CpuFeatureScope scope(this, AVX); |
+ vpshufd(dst, src, shuffle); |
+ } else { |
+ pshufd(dst, src, shuffle); |
+ } |
+} |
void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) { |
if (imm8 == 0) { |
- movd(dst, src); |
+ Movd(dst, src); |
+ return; |
+ } |
+ if (CpuFeatures::IsSupported(AVX)) { |
+ CpuFeatureScope scope(this, AVX); |
+ vpextrd(dst, src, imm8); |
return; |
} |
if (CpuFeatures::IsSupported(SSE4_1)) { |