Index: test/mjsunit/regress/wasm/regression-667745.js |
diff --git a/test/mjsunit/regress/wasm/regression-667745.js b/test/mjsunit/regress/wasm/regression-667745.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f78681e9b55c3029cd98cfa14d5f1577e53eb9ba |
--- /dev/null |
+++ b/test/mjsunit/regress/wasm/regression-667745.js |
@@ -0,0 +1,415 @@ |
+// Copyright 2016 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Flags: --expose-wasm |
+ |
+load("test/mjsunit/wasm/wasm-constants.js"); |
+load("test/mjsunit/wasm/wasm-module-builder.js"); |
+ |
+(function() { |
+ var builder = new WasmModuleBuilder(); |
+ builder.addFunction("test", kSig_i_iii) |
+ .addBody([ |
+kExprI8Const, 0xcb, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x67, |
+kExprI8Const, 0x67, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Eq, |
+kExprI32RemU, |
+kExprI32Clz, |
+kExprI32Const, 0x25, |
+kExprI32Const, 0x82, 0x6c, |
+kExprI32Add, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x70, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x70, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x67, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32GeS, |
+kExprI32Const, 0x67, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprDrop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x01, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprSelect, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x0e, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x01, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprSelect, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x0e, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x01, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprSelect, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x0e, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x01, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprSelect, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x0e, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x4a, |
+kExprI32Const, 0x41, |
+kExprI32LtU, |
+kExprI32Const, 0x67, |
+kExprI32Clz, |
+kExprI32GtS, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Ne, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x1a, |
+kExprI32Const, 0x71, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32ShrS, |
+kExprI32Clz, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprI32Clz, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Const, 0x4a, |
+kExprI32Const, 0x41, |
+kExprI32LtU, |
+kExprI32Const, 0x67, |
+kExprI32Clz, |
+kExprI32GtS, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x41, |
+kExprI32Ne, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Const, 0x41, |
+kExprI32Const, 0x1a, |
+kExprI32Const, 0x71, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32And, |
+kExprI32ShrS, |
+kExprI32Clz, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprI32Clz, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprUnreachable, |
+kExprCallFunction, 0x00, // function #0 |
+kExprCallFunction, 0x00, // function #0 |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprReturn, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprUnreachable, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprI32Clz, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI64DivS, |
+kExprI64LoadMem, 0x01, 0x01, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprNop, |
+kExprI64DivU, |
+kExprUnreachable, |
+kExprI32GeS, |
+kExprI8Const, 0xcb, |
+ ]) |
+ .exportFunc(); |
+ var module = builder.instantiate(); |
+ assertTrue(module != undefined); |
+})(); |