Index: src/ia32/assembler-ia32.h |
diff --git a/src/ia32/assembler-ia32.h b/src/ia32/assembler-ia32.h |
index 00ee959589257a3d2ff340d13ae919c80393cecc..aa70bf9d41eb3326f3bc6da724fce7647d86187e 100644 |
--- a/src/ia32/assembler-ia32.h |
+++ b/src/ia32/assembler-ia32.h |
@@ -1049,6 +1049,34 @@ class Assembler : public AssemblerBase { |
// Parallel XMM operations. |
void movntdqa(XMMRegister dst, const Operand& src); |
void movntdq(const Operand& dst, XMMRegister src); |
+ |
+ // AVX instructions |
+ void vaddsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { |
+ vaddsd(dst, src1, Operand(src2)); |
+ } |
+ void vaddsd(XMMRegister dst, XMMRegister src1, const Operand& src2) { |
+ vsd(0x58, dst, src1, src2); |
+ } |
+ void vsubsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { |
+ vsubsd(dst, src1, Operand(src2)); |
+ } |
+ void vsubsd(XMMRegister dst, XMMRegister src1, const Operand& src2) { |
+ vsd(0x5c, dst, src1, src2); |
+ } |
+ void vmulsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { |
+ vmulsd(dst, src1, Operand(src2)); |
+ } |
+ void vmulsd(XMMRegister dst, XMMRegister src1, const Operand& src2) { |
+ vsd(0x59, dst, src1, src2); |
+ } |
+ void vdivsd(XMMRegister dst, XMMRegister src1, XMMRegister src2) { |
+ vdivsd(dst, src1, Operand(src2)); |
+ } |
+ void vdivsd(XMMRegister dst, XMMRegister src1, const Operand& src2) { |
+ vsd(0x5e, dst, src1, src2); |
+ } |
+ void vsd(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2); |
+ |
// Prefetch src position into cache level. |
// Level 1, 2 or 3 specifies CPU cache level. Level 0 specifies a |
// non-temporal |
@@ -1152,6 +1180,14 @@ class Assembler : public AssemblerBase { |
void emit_farith(int b1, int b2, int i); |
+ // Emit vex prefix |
+ enum SIMDPrefix { kNone = 0x0, k66 = 0x1, kF3 = 0x2, kF2 = 0x3 }; |
+ enum VectorLength { kL128 = 0x0, kL256 = 0x4, kLIG = kL128 }; |
+ enum VexW { kW0 = 0x0, kW1 = 0x80, kWIG = kW0 }; |
+ enum LeadingOpcode { k0F = 0x1, k0F38 = 0x2, k0F3A = 0x2 }; |
+ inline void emit_vex_prefix(XMMRegister v, VectorLength l, SIMDPrefix pp, |
+ LeadingOpcode m, VexW w); |
+ |
// labels |
void print(Label* L); |
void bind_to(Label* L, int pos); |