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

Unified Diff: src/harmony-simd.js

Issue 1302133002: [simd.js] Add SIMD load functions for Phase 1. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months 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 | « no previous file | src/messages.h » ('j') | src/messages.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-simd.js
diff --git a/src/harmony-simd.js b/src/harmony-simd.js
index 3cc18c2e908d8301717128caa1698a89e6683edd..62cad0e8f92c7e3f7c5dcd8a856de7137239a874 100644
--- a/src/harmony-simd.js
+++ b/src/harmony-simd.js
@@ -319,6 +319,26 @@ function Float32x4ShuffleJS(a, b, c0, c1, c2, c3) {
}
+function Float32x4LoadJS(tarray, index) {
+ return %Float32x4Load(tarray, index);
+}
+
+
+function Float32x4Load1JS(tarray, index) {
+ return %Float32x4Load1(tarray, index);
+}
+
+
+function Float32x4Load2JS(tarray, index) {
+ return %Float32x4Load2(tarray, index);
+}
+
+
+function Float32x4Load3JS(tarray, index) {
+ return %Float32x4Load3(tarray, index);
+}
bbudge 2015/08/20 18:23:34 You should be able to use the V8 macro system on t
gdeepti 2015/08/20 22:09:24 Done.
+
+
function Int32x4Constructor(c0, c1, c2, c3) {
if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int32x4");
return %CreateInt32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1),
@@ -341,6 +361,26 @@ function Int32x4ShuffleJS(a, b, c0, c1, c2, c3) {
}
+function Int32x4LoadJS(tarray, index) {
+ return %Int32x4Load(tarray, index);
+}
+
+
+function Int32x4Load1JS(tarray, index) {
+ return %Int32x4Load1(tarray, index);
+}
+
+
+function Int32x4Load2JS(tarray, index) {
+ return %Int32x4Load2(tarray, index);
+}
+
+
+function Int32x4Load3JS(tarray, index) {
+ return %Int32x4Load3(tarray, index);
+}
+
+
function Bool32x4Constructor(c0, c1, c2, c3) {
if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool32x4");
return %CreateBool32x4(c0, c1, c2, c3);
@@ -385,6 +425,26 @@ function Int16x8ShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7) {
}
+function Int16x8LoadJS(tarray, index) {
+ return %Int16x8Load(tarray, index);
+}
+
+
+function Int16x8Load1JS(tarray, index) {
+ return %Int16x8Load1(tarray, index);
+}
+
+
+function Int16x8Load2JS(tarray, index) {
+ return %Int16x8Load2(tarray, index);
+}
+
+
+function Int16x8Load3JS(tarray, index) {
+ return %Int16x8Load3(tarray, index);
+}
+
+
function Bool16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) {
if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool16x8");
return %CreateBool16x8(c0, c1, c2, c3, c4, c5, c6, c7);
@@ -439,6 +499,26 @@ function Int8x16ShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
}
+function Int8x16LoadJS(tarray, index) {
+ return %Int8x16Load(tarray, index);
+}
+
+
+function Int8x16Load1JS(tarray, index) {
+ return %Int8x16Load1(tarray, index);
+}
+
+
+function Int8x16Load2JS(tarray, index) {
+ return %Int8x16Load2(tarray, index);
+}
+
+
+function Int8x16Load3JS(tarray, index) {
+ return %Int8x16Load3(tarray, index);
+}
+
+
function Bool8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
c12, c13, c14, c15) {
if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool8x16");
@@ -517,6 +597,10 @@ utils.InstallFunctions(GlobalFloat32x4, DONT_ENUM, [
'fromInt32x4Bits', Float32x4FromInt32x4BitsJS,
'fromInt16x8Bits', Float32x4FromInt16x8BitsJS,
'fromInt8x16Bits', Float32x4FromInt8x16BitsJS,
+ 'load', Float32x4LoadJS,
+ 'load1', Float32x4Load1JS,
+ 'load2', Float32x4Load2JS,
+ 'load3', Float32x4Load3JS,
]);
utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [
@@ -550,6 +634,10 @@ utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [
'fromFloat32x4Bits', Int32x4FromFloat32x4BitsJS,
'fromInt16x8Bits', Int32x4FromInt16x8BitsJS,
'fromInt8x16Bits', Int32x4FromInt8x16BitsJS,
+ 'load', Int32x4LoadJS,
+ 'load1', Int32x4Load1JS,
+ 'load2', Int32x4Load2JS,
+ 'load3', Int32x4Load3JS,
]);
utils.InstallFunctions(GlobalBool32x4, DONT_ENUM, [
@@ -600,6 +688,10 @@ utils.InstallFunctions(GlobalInt16x8, DONT_ENUM, [
'fromFloat32x4Bits', Int16x8FromFloat32x4BitsJS,
'fromInt32x4Bits', Int16x8FromInt32x4BitsJS,
'fromInt8x16Bits', Int16x8FromInt8x16BitsJS,
+ 'load', Int16x8LoadJS,
+ 'load1', Int16x8Load1JS,
+ 'load2', Int16x8Load2JS,
+ 'load3', Int16x8Load3JS,
]);
utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [
@@ -650,6 +742,10 @@ utils.InstallFunctions(GlobalInt8x16, DONT_ENUM, [
'fromFloat32x4Bits', Int8x16FromFloat32x4BitsJS,
'fromInt32x4Bits', Int8x16FromInt32x4BitsJS,
'fromInt16x8Bits', Int8x16FromInt16x8BitsJS,
+ 'load', Int8x16LoadJS,
+ 'load1', Int8x16Load1JS,
+ 'load2', Int8x16Load2JS,
+ 'load3', Int8x16Load3JS,
]);
utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [
« no previous file with comments | « no previous file | src/messages.h » ('j') | src/messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698