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

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

Issue 757503002: [x64] Introduce FMA3 instructions on scalar data elements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove avx_os_support Created 6 years, 1 month 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/globals.h ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/assembler-x64.h
diff --git a/src/x64/assembler-x64.h b/src/x64/assembler-x64.h
index c9e319b9f16b70d057f13a461fb052d7bda127fe..27728b6a45edf3269657737b68a6ec24190ca69b 100644
--- a/src/x64/assembler-x64.h
+++ b/src/x64/assembler-x64.h
@@ -1014,6 +1014,17 @@ class Assembler : public AssemblerBase {
void sahf();
// SSE instructions
+ void addss(XMMRegister dst, XMMRegister src);
+ void addss(XMMRegister dst, const Operand& src);
+ void subss(XMMRegister dst, XMMRegister src);
+ void subss(XMMRegister dst, const Operand& src);
+ void mulss(XMMRegister dst, XMMRegister src);
+ void mulss(XMMRegister dst, const Operand& src);
+ void divss(XMMRegister dst, XMMRegister src);
+ void divss(XMMRegister dst, const Operand& src);
+
+ void ucomiss(XMMRegister dst, XMMRegister src);
+ void ucomiss(XMMRegister dst, const Operand& src);
void movaps(XMMRegister dst, XMMRegister src);
void movss(XMMRegister dst, const Operand& src);
void movss(const Operand& dst, XMMRegister src);
@@ -1123,6 +1134,157 @@ class Assembler : public AssemblerBase {
void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode);
+ // AVX instruction
+ void vfmadd132sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0x99, dst, src1, src2);
+ }
+ void vfmadd213sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xa9, dst, src1, src2);
+ }
+ void vfmadd231sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xb9, dst, src1, src2);
+ }
+ void vfmadd132sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0x99, dst, src1, src2);
+ }
+ void vfmadd213sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xa9, dst, src1, src2);
+ }
+ void vfmadd231sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xb9, dst, src1, src2);
+ }
+ void vfmsub132sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0x9b, dst, src1, src2);
+ }
+ void vfmsub213sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xab, dst, src1, src2);
+ }
+ void vfmsub231sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xbb, dst, src1, src2);
+ }
+ void vfmsub132sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0x9b, dst, src1, src2);
+ }
+ void vfmsub213sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xab, dst, src1, src2);
+ }
+ void vfmsub231sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xbb, dst, src1, src2);
+ }
+ void vfnmadd132sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0x9d, dst, src1, src2);
+ }
+ void vfnmadd213sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xad, dst, src1, src2);
+ }
+ void vfnmadd231sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xbd, dst, src1, src2);
+ }
+ void vfnmadd132sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0x9d, dst, src1, src2);
+ }
+ void vfnmadd213sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xad, dst, src1, src2);
+ }
+ void vfnmadd231sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xbd, dst, src1, src2);
+ }
+ void vfnmsub132sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0x9f, dst, src1, src2);
+ }
+ void vfnmsub213sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xaf, dst, src1, src2);
+ }
+ void vfnmsub231sd(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmasd(0xbf, dst, src1, src2);
+ }
+ void vfnmsub132sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0x9f, dst, src1, src2);
+ }
+ void vfnmsub213sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xaf, dst, src1, src2);
+ }
+ void vfnmsub231sd(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmasd(0xbf, dst, src1, src2);
+ }
+ void vfmasd(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2);
+ void vfmasd(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2);
+
+ void vfmadd132ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0x99, dst, src1, src2);
+ }
+ void vfmadd213ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xa9, dst, src1, src2);
+ }
+ void vfmadd231ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xb9, dst, src1, src2);
+ }
+ void vfmadd132ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0x99, dst, src1, src2);
+ }
+ void vfmadd213ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xa9, dst, src1, src2);
+ }
+ void vfmadd231ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xb9, dst, src1, src2);
+ }
+ void vfmsub132ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0x9b, dst, src1, src2);
+ }
+ void vfmsub213ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xab, dst, src1, src2);
+ }
+ void vfmsub231ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xbb, dst, src1, src2);
+ }
+ void vfmsub132ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0x9b, dst, src1, src2);
+ }
+ void vfmsub213ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xab, dst, src1, src2);
+ }
+ void vfmsub231ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xbb, dst, src1, src2);
+ }
+ void vfnmadd132ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0x9d, dst, src1, src2);
+ }
+ void vfnmadd213ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xad, dst, src1, src2);
+ }
+ void vfnmadd231ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xbd, dst, src1, src2);
+ }
+ void vfnmadd132ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0x9d, dst, src1, src2);
+ }
+ void vfnmadd213ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xad, dst, src1, src2);
+ }
+ void vfnmadd231ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xbd, dst, src1, src2);
+ }
+ void vfnmsub132ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0x9f, dst, src1, src2);
+ }
+ void vfnmsub213ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xaf, dst, src1, src2);
+ }
+ void vfnmsub231ss(XMMRegister dst, XMMRegister src1, XMMRegister src2) {
+ vfmass(0xbf, dst, src1, src2);
+ }
+ void vfnmsub132ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0x9f, dst, src1, src2);
+ }
+ void vfnmsub213ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xaf, dst, src1, src2);
+ }
+ void vfnmsub231ss(XMMRegister dst, XMMRegister src1, const Operand& src2) {
+ vfmass(0xbf, dst, src1, src2);
+ }
+ void vfmass(byte op, XMMRegister dst, XMMRegister src1, XMMRegister src2);
+ void vfmass(byte op, XMMRegister dst, XMMRegister src1, const Operand& src2);
+
// Debugging
void Print();
@@ -1316,6 +1478,14 @@ class Assembler : public AssemblerBase {
}
}
+ // Emit vex prefix
+ void emit_vex2_byte0() { emit(0xc5); }
+ void emit_vex2_byte1(XMMRegister reg, XMMRegister v, byte lpp);
+ void emit_vex3_byte0() { emit(0xc4); }
+ void emit_vex3_byte1(XMMRegister reg, XMMRegister rm, byte m);
+ void emit_vex3_byte1(XMMRegister reg, const Operand& rm, byte m);
+ void emit_vex3_byte2(byte w, XMMRegister v, byte lpp);
+
// Emit the ModR/M byte, and optionally the SIB byte and
// 1- or 4-byte offset for a memory operand. Also encodes
// the second operand of the operation, a register or operation
« no previous file with comments | « src/globals.h ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698