Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(536)

Unified Diff: src/ia32/assembler-ia32.h

Issue 770183002: [ia32] Introduce vex prefix version of float64 arithmetic binop (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698