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

Unified Diff: test/mjsunit/simd/osr.js

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 | « test/mjsunit/simd/int32x4.js ('k') | test/mjsunit/simd/prototype.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/simd/osr.js
diff --git a/test/mjsunit/function-named-self-reference.js b/test/mjsunit/simd/osr.js
similarity index 84%
copy from test/mjsunit/function-named-self-reference.js
copy to test/mjsunit/simd/osr.js
index 5b03b094b7a4ef89a3730980fa863936056be0c5..024a6c8eb27c5e009121c74f2095f6de1079da1b 100644
--- a/test/mjsunit/function-named-self-reference.js
+++ b/test/mjsunit/simd/osr.js
@@ -25,21 +25,19 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+// Flags: --simd_object
-var fn = function fn(val) {
- if (val) return val;
-
- %OptimizeFunctionOnNextCall(fn);
-
- function run(val) {
- var res = fn((val + 1) << 1);
-
- return res;
+function testSIMDAbs() {
+ var a4 = float32x4(1.0, -2.0, 3.0, -4.0);
+ var b4;
+ for (var i = 0; i < 100000; i++) {
+ b4 = SIMD.float32x4.abs(a4);
}
- return run(0);
+ assertEquals(1.0, b4.x);
+ assertEquals(2.0, b4.y);
+ assertEquals(3.0, b4.z);
+ assertEquals(4.0, b4.w);
}
-var res = fn();
-assertEquals(res, 2);
+testSIMDAbs();
« no previous file with comments | « test/mjsunit/simd/int32x4.js ('k') | test/mjsunit/simd/prototype.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698