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

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

Issue 90643003: Experimental implementation: Exposing SIMD instructions into JavaScript Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/hydrogen-representation-changes.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 6ed0bc6d6625d092fec6170a991d77123197c310..4ce787dae34ae9e03c27f309f62ee9d1df8b67b1 100644
--- a/src/ia32/assembler-ia32.h
+++ b/src/ia32/assembler-ia32.h
@@ -219,6 +219,8 @@ struct XMMRegister : IntelDoubleRegister {
}
};
+typedef XMMRegister Float32x4Register;
+typedef XMMRegister Int32x4Register;
#define xmm0 (static_cast<const XMMRegister&>(double_register_0))
#define xmm1 (static_cast<const XMMRegister&>(double_register_1))
@@ -390,7 +392,8 @@ class Operand BASE_EMBEDDED {
INLINE(explicit Operand(XMMRegister xmm_reg));
// [disp/r]
- INLINE(explicit Operand(int32_t disp, RelocInfo::Mode rmode));
+ INLINE(explicit Operand(int32_t disp,
+ RelocInfo::Mode rmode = RelocInfo::NONE32));
// disp only must always be relocated
// [base + disp/r]
@@ -410,6 +413,11 @@ class Operand BASE_EMBEDDED {
int32_t disp,
RelocInfo::Mode rmode = RelocInfo::NONE32);
+ // Offset from existing memory operand.
+ // Offset is added to existing displacement as 32-bit signed values and
+ // this must not overflow.
+ Operand(const Operand& base, int32_t offset);
+
static Operand StaticVariable(const ExternalReference& ext) {
return Operand(reinterpret_cast<int32_t>(ext.address()),
RelocInfo::EXTERNAL_REFERENCE);
@@ -1014,6 +1022,8 @@ class Assembler : public AssemblerBase {
// SSE instructions
void movaps(XMMRegister dst, XMMRegister src);
void shufps(XMMRegister dst, XMMRegister src, byte imm8);
+ void movups(XMMRegister dst, const Operand& src);
+ void movups(const Operand& dst, XMMRegister src);
void andps(XMMRegister dst, const Operand& src);
void andps(XMMRegister dst, XMMRegister src) { andps(dst, Operand(src)); }
@@ -1030,6 +1040,48 @@ class Assembler : public AssemblerBase {
void mulps(XMMRegister dst, XMMRegister src) { mulps(dst, Operand(src)); }
void divps(XMMRegister dst, const Operand& src);
void divps(XMMRegister dst, XMMRegister src) { divps(dst, Operand(src)); }
+ void minps(XMMRegister dst, XMMRegister src) { minps(dst, Operand(src)); }
+ void minps(XMMRegister dst, const Operand& src);
+ void maxps(XMMRegister dst, XMMRegister src) { maxps(dst, Operand(src)); }
+ void maxps(XMMRegister dst, const Operand& src);
+ void rcpps(XMMRegister dst, XMMRegister src) { rcpps(dst, Operand(src)); }
+ void rcpps(XMMRegister dst, const Operand& src);
+ void rsqrtps(XMMRegister dst, XMMRegister src) { rsqrtps(dst, Operand(src)); }
+ void rsqrtps(XMMRegister dst, const Operand& src);
+ void sqrtps(XMMRegister dst, XMMRegister src) { sqrtps(dst, Operand(src)); }
+ void sqrtps(XMMRegister dst, const Operand& src);
+
+ void cvtdq2ps(XMMRegister dst, const Operand& src);
+ void cmpps(XMMRegister dst, XMMRegister src, int8_t cmp);
+ void cmpeqps(XMMRegister dst, XMMRegister src);
+ void cmpltps(XMMRegister dst, XMMRegister src);
+ void cmpleps(XMMRegister dst, XMMRegister src);
+ void cmpneqps(XMMRegister dst, XMMRegister src);
+ void cmpnltps(XMMRegister dst, XMMRegister src);
+ void cmpnleps(XMMRegister dst, XMMRegister src);
+
+ // SSE 2, introduced by SIMD
+ void paddd(XMMRegister dst, XMMRegister src) { paddd(dst, Operand(src)); }
+ void paddd(XMMRegister dst, const Operand& src);
+ void psubd(XMMRegister dst, XMMRegister src) { psubd(dst, Operand(src)); }
+ void psubd(XMMRegister dst, const Operand& src);
+ void pmuludq(XMMRegister dst, XMMRegister src) { pmuludq(dst, Operand(src)); }
+ void pmuludq(XMMRegister dst, const Operand& src);
+ void punpackldq(XMMRegister dst, XMMRegister src) {
+ punpackldq(dst, Operand(src));
+ }
+ void punpackldq(XMMRegister dst, const Operand& src);
+ void cvtps2dq(XMMRegister dst, XMMRegister src) {
+ cvtps2dq(dst, Operand(src));
+ }
+ void cvtps2dq(XMMRegister dst, const Operand& src);
+ void cvtdq2ps(XMMRegister dst, XMMRegister src) {
+ cvtdq2ps(dst, Operand(src));
+ }
+ // SSE 4.1, introduced by SIMD
+ void insertps(XMMRegister dst, XMMRegister src, byte imm8);
+ void pmulld(XMMRegister dst, XMMRegister src) { pmulld(dst, Operand(src)); }
+ void pmulld(XMMRegister dst, const Operand& src);
// SSE2 instructions
void cvttss2si(Register dst, const Operand& src);
« no previous file with comments | « src/hydrogen-representation-changes.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698