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

Unified Diff: test/mjsunit/asm/int16array-outofbounds.js

Issue 2663243002: [asm] Fix lots of invalid asm.js tests (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « test/mjsunit/asm/int16array-negative-offset.js ('k') | test/mjsunit/asm/int32-div.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/asm/int16array-outofbounds.js
diff --git a/test/mjsunit/asm/int16array-outofbounds.js b/test/mjsunit/asm/int16array-outofbounds.js
index 7982c0046ae4fcbaa3f3cbbe1246d93e2b089f50..8cad86efb5a6c350d9d87c803bb1547d3090e2e5 100644
--- a/test/mjsunit/asm/int16array-outofbounds.js
+++ b/test/mjsunit/asm/int16array-outofbounds.js
@@ -8,19 +8,22 @@ function Module(stdlib, foreign, heap) {
function load(i) {
i = i|0;
i = MEM16[i >> 1] | 0;
- return i;
+ return i | 0;
}
function loadm1() {
- return MEM16[-1] | 0;
+ var i = -1 << 1;
+ return MEM16[i >> 1] | 0;
+ return 0;
}
function store(i, v) {
- i = i|0;
- v = v|0;
+ i = i | 0;
+ v = v | 0;
MEM16[i >> 1] = v;
}
function storem1(v) {
- v = v|0;
- MEM16[-1] = v;
+ v = v | 0;
+ var i = -1 << 1;
+ MEM16[i >> 1] = v;
}
return {load: load, loadm1: loadm1, store: store, storem1: storem1};
}
« no previous file with comments | « test/mjsunit/asm/int16array-negative-offset.js ('k') | test/mjsunit/asm/int32-div.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698