Index: test/mjsunit/wasm/asm-wasm.js |
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js |
index 419fdf8a7658262fff89c211dab528107b77aba9..8e46691e35a1f52fcb38214666731ec8fd33e729 100644 |
--- a/test/mjsunit/wasm/asm-wasm.js |
+++ b/test/mjsunit/wasm/asm-wasm.js |
@@ -1523,3 +1523,20 @@ TestForeignVariables(); |
_WASMEXP_.instantiateModuleFromAsm(Module.toString()); |
}); |
})(); |
+ |
+ |
+(function TestAndIntAndHeapValue() { |
+ function Module(stdlib, foreign, buffer) { |
+ "use asm"; |
+ var HEAP32 = new stdlib.Int32Array(buffer); |
+ function func() { |
+ var x = 0; |
+ x = HEAP32[0] & -1; |
+ return x | 0; |
+ } |
+ return {func: func}; |
+ } |
+ |
+ var m = _WASMEXP_.instantiateModuleFromAsm(Module.toString()); |
+ assertEquals(0, m.func()); |
+})(); |