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

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: Bill's comments 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/runtime/runtime.h » ('j') | src/runtime/runtime-simd.cc » ('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..a7e2c23e3991b1325320af39140e585d43b684fe 100644
--- a/src/harmony-simd.js
+++ b/src/harmony-simd.js
@@ -195,6 +195,10 @@ function NAMEGreaterThanJS(a, b) {
function NAMEGreaterThanOrEqualJS(a, b) {
return %NAMEGreaterThanOrEqual(a, b);
}
+
+function NAMELoadJS(tarray, index) {
+ return %NAMELoad(tarray, index);
+}
endmacro
SIMD_NUMERIC_TYPES(DECLARE_NUMERIC_FUNCTIONS)
@@ -260,6 +264,24 @@ endmacro
SIMD_FROM_BITS_TYPES(DECLARE_FROM_BITS_FUNCTIONS)
+
+macro SIMD_LOADN_STOREN_TYPES(FUNCTION)
+FUNCTION(Float32x4, 1)
+FUNCTION(Float32x4, 2)
+FUNCTION(Float32x4, 3)
+FUNCTION(Int32x4, 1)
+FUNCTION(Int32x4, 2)
+FUNCTION(Int32x4, 3)
+endmacro
+
+macro DECLARE_LOADN_STOREN_FUNCTIONS(NAME, COUNT)
+function NAMELoadCOUNTJS(tarray, index) {
+ return %NAMELoadCOUNT(tarray, index);
+}
+endmacro
+
+SIMD_LOADN_STOREN_TYPES(DECLARE_LOADN_STOREN_FUNCTIONS)
+
//-------------------------------------------------------------------
function Float32x4Constructor(c0, c1, c2, c3) {
@@ -517,6 +539,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 +576,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 +630,7 @@ utils.InstallFunctions(GlobalInt16x8, DONT_ENUM, [
'fromFloat32x4Bits', Int16x8FromFloat32x4BitsJS,
'fromInt32x4Bits', Int16x8FromInt32x4BitsJS,
'fromInt8x16Bits', Int16x8FromInt8x16BitsJS,
+ 'load', Int16x8LoadJS,
]);
utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [
@@ -650,6 +681,7 @@ utils.InstallFunctions(GlobalInt8x16, DONT_ENUM, [
'fromFloat32x4Bits', Int8x16FromFloat32x4BitsJS,
'fromInt32x4Bits', Int8x16FromInt32x4BitsJS,
'fromInt16x8Bits', Int8x16FromInt16x8BitsJS,
+ 'load', Int8x16LoadJS,
]);
utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [
« no previous file with comments | « no previous file | src/runtime/runtime.h » ('j') | src/runtime/runtime-simd.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698