Index: src/ia32/assembler-ia32.cc |
diff --git a/src/ia32/assembler-ia32.cc b/src/ia32/assembler-ia32.cc |
index b55f6f17b44349af53735a94850d0fd08e1163e7..4dcf50ff8534c70917ace65c617778b32e55b25d 100644 |
--- a/src/ia32/assembler-ia32.cc |
+++ b/src/ia32/assembler-ia32.cc |
@@ -2520,7 +2520,6 @@ void Assembler::extractps(Register dst, XMMRegister src, byte imm8) { |
EMIT(imm8); |
} |
- |
void Assembler::ptest(XMMRegister dst, XMMRegister src) { |
DCHECK(IsEnabled(SSE4_1)); |
EnsureSpace ensure_space(this); |
@@ -2531,6 +2530,14 @@ void Assembler::ptest(XMMRegister dst, XMMRegister src) { |
emit_sse_operand(dst, src); |
} |
+void Assembler::psllw(XMMRegister reg, int8_t shift) { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0x66); |
+ EMIT(0x0F); |
+ EMIT(0x71); |
+ emit_sse_operand(esi, reg); // esi == 6 |
+ EMIT(shift); |
+} |
void Assembler::pslld(XMMRegister reg, int8_t shift) { |
EnsureSpace ensure_space(this); |
@@ -2541,6 +2548,14 @@ void Assembler::pslld(XMMRegister reg, int8_t shift) { |
EMIT(shift); |
} |
+void Assembler::psrlw(XMMRegister reg, int8_t shift) { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0x66); |
+ EMIT(0x0F); |
+ EMIT(0x71); |
+ emit_sse_operand(edx, reg); // edx == 2 |
+ EMIT(shift); |
+} |
void Assembler::psrld(XMMRegister reg, int8_t shift) { |
EnsureSpace ensure_space(this); |
@@ -2551,6 +2566,23 @@ void Assembler::psrld(XMMRegister reg, int8_t shift) { |
EMIT(shift); |
} |
+void Assembler::psraw(XMMRegister reg, int8_t shift) { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0x66); |
+ EMIT(0x0F); |
+ EMIT(0x71); |
+ emit_sse_operand(esp, reg); // esp == 4 |
+ EMIT(shift); |
+} |
+ |
+void Assembler::psrad(XMMRegister reg, int8_t shift) { |
+ EnsureSpace ensure_space(this); |
+ EMIT(0x66); |
+ EMIT(0x0F); |
+ EMIT(0x72); |
+ emit_sse_operand(esp, reg); // esp == 4 |
+ EMIT(shift); |
+} |
void Assembler::psllq(XMMRegister reg, int8_t shift) { |
EnsureSpace ensure_space(this); |
@@ -2764,6 +2796,41 @@ void Assembler::vpd(byte op, XMMRegister dst, XMMRegister src1, |
emit_sse_operand(dst, src2); |
} |
+void Assembler::vpsllw(XMMRegister dst, XMMRegister src, int8_t imm8) { |
+ XMMRegister iop = {6}; |
+ vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG); |
+ EMIT(imm8); |
+} |
+ |
+void Assembler::vpslld(XMMRegister dst, XMMRegister src, int8_t imm8) { |
+ XMMRegister iop = {6}; |
+ vinstr(0x72, iop, dst, Operand(src), k66, k0F, kWIG); |
+ EMIT(imm8); |
+} |
+ |
+void Assembler::vpsrlw(XMMRegister dst, XMMRegister src, int8_t imm8) { |
+ XMMRegister iop = {2}; |
+ vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG); |
+ EMIT(imm8); |
+} |
+ |
+void Assembler::vpsrld(XMMRegister dst, XMMRegister src, int8_t imm8) { |
+ XMMRegister iop = {2}; |
+ vinstr(0x72, iop, dst, Operand(src), k66, k0F, kWIG); |
+ EMIT(imm8); |
+} |
+ |
+void Assembler::vpsraw(XMMRegister dst, XMMRegister src, int8_t imm8) { |
+ XMMRegister iop = {4}; |
+ vinstr(0x71, iop, dst, Operand(src), k66, k0F, kWIG); |
+ EMIT(imm8); |
+} |
+ |
+void Assembler::vpsrad(XMMRegister dst, XMMRegister src, int8_t imm8) { |
+ XMMRegister iop = {4}; |
+ vinstr(0x72, iop, dst, Operand(src), k66, k0F, kWIG); |
+ EMIT(imm8); |
+} |
void Assembler::bmi1(byte op, Register reg, Register vreg, const Operand& rm) { |
DCHECK(IsEnabled(BMI1)); |