| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 7b831fdab8fcfddac25fd7dbedfb9107a9516063..960525a6b76e4528bb25319266c5007dace50e4a 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -2136,6 +2136,25 @@ void MacroAssembler::Move(XMMRegister dst, uint64_t src) {
|
| }
|
| }
|
|
|
| +void MacroAssembler::Pxor(XMMRegister dst, const Operand& src) {
|
| + if (CpuFeatures::IsSupported(AVX)) {
|
| + CpuFeatureScope scope(this, AVX);
|
| + vpxor(dst, dst, src);
|
| + } else {
|
| + pxor(dst, src);
|
| + }
|
| +}
|
| +
|
| +void MacroAssembler::Pshuflw(XMMRegister dst, const Operand& src,
|
| + uint8_t shuffle) {
|
| + if (CpuFeatures::IsSupported(AVX)) {
|
| + CpuFeatureScope scope(this, AVX);
|
| + vpshuflw(dst, src, shuffle);
|
| + } else {
|
| + pshuflw(dst, src, shuffle);
|
| + }
|
| +}
|
| +
|
| void MacroAssembler::Pshufd(XMMRegister dst, const Operand& src,
|
| uint8_t shuffle) {
|
| if (CpuFeatures::IsSupported(AVX)) {
|
| @@ -2146,6 +2165,48 @@ void MacroAssembler::Pshufd(XMMRegister dst, const Operand& src,
|
| }
|
| }
|
|
|
| +void MacroAssembler::Pshufb(XMMRegister dst, const Operand& src) {
|
| + if (CpuFeatures::IsSupported(AVX)) {
|
| + CpuFeatureScope scope(this, AVX);
|
| + vpshufb(dst, dst, src);
|
| + return;
|
| + }
|
| + if (CpuFeatures::IsSupported(SSSE3)) {
|
| + CpuFeatureScope sse_scope(this, SSSE3);
|
| + pshufb(dst, src);
|
| + return;
|
| + }
|
| + UNREACHABLE();
|
| +}
|
| +
|
| +void MacroAssembler::Pextrb(Register dst, XMMRegister src, int8_t imm8) {
|
| + if (CpuFeatures::IsSupported(AVX)) {
|
| + CpuFeatureScope scope(this, AVX);
|
| + vpextrb(dst, src, imm8);
|
| + return;
|
| + }
|
| + if (CpuFeatures::IsSupported(SSE4_1)) {
|
| + CpuFeatureScope sse_scope(this, SSE4_1);
|
| + pextrb(dst, src, imm8);
|
| + return;
|
| + }
|
| + UNREACHABLE();
|
| +}
|
| +
|
| +void MacroAssembler::Pextrw(Register dst, XMMRegister src, int8_t imm8) {
|
| + if (CpuFeatures::IsSupported(AVX)) {
|
| + CpuFeatureScope scope(this, AVX);
|
| + vpextrw(dst, src, imm8);
|
| + return;
|
| + }
|
| + if (CpuFeatures::IsSupported(SSE4_1)) {
|
| + CpuFeatureScope sse_scope(this, SSE4_1);
|
| + pextrw(dst, src, imm8);
|
| + return;
|
| + }
|
| + UNREACHABLE();
|
| +}
|
| +
|
| void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) {
|
| if (imm8 == 0) {
|
| Movd(dst, src);
|
|
|