Commit 820a3bda authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm] Add some more test cases to wasm-trace-memory

We were missing test cases for i16, i64, and f64. It's not super
critical, but it's also an easy addition, and helps bring coverage of
memory-tracing.cc up (close to 100% now).

Change-Id: Ib8433f8615c900d8665ccbc33e12d6fd05d51336
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2121168Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66878}
parent 073c5d2d
......@@ -9,3 +9,6 @@ interpreter func: 0+0x3 load from 00000002 val: i32:1454047232 / 56ab000
interpreter func: 2+0x3 load from 00000002 val: f32:94008244174848.000000 / 56ab0000
interpreter func: 6+0x7 store to 00000004 val: s128:48879 48879 48879 48879 / 0000beef 0000beef 0000beef 0000beef
interpreter func: 5+0x3 load from 00000002 val: s128:-1091633152 -1091633152 -1091633152 -1091633152 / beef0000 beef0000 beef0000 beef0000
interpreter func: 7+0x3 load from 00000004 val: i16:48879 / beef
interpreter func: 8+0x3 load from 00000002 val: i64:-4688528683866062848 / beef0000beef0000
interpreter func: 9+0x3 load from 00000002 val: f64:-0.000015 / beef0000beef0000
......@@ -9,3 +9,6 @@ liftoff func: 0+0x3 load from 00000002 val: i32:1454047232 / 56ab000
liftoff func: 2+0x3 load from 00000002 val: f32:94008244174848.000000 / 56ab0000
liftoff func: 6+0x7 store to 00000004 val: s128:48879 48879 48879 48879 / 0000beef 0000beef 0000beef 0000beef
liftoff func: 5+0x3 load from 00000002 val: s128:-1091633152 -1091633152 -1091633152 -1091633152 / beef0000 beef0000 beef0000 beef0000
liftoff func: 7+0x3 load from 00000004 val: i16:48879 / beef
liftoff func: 8+0x3 load from 00000002 val: i64:-4688528683866062848 / beef0000beef0000
liftoff func: 9+0x3 load from 00000002 val: f64:-0.000015 / beef0000beef0000
......@@ -31,6 +31,17 @@ builder.addFunction('load128', kSig_v_i)
builder.addFunction('store128', kSig_v_ii)
.addBody([kExprLocalGet, 0, kExprLocalGet, 1, kSimdPrefix, kExprI32x4Splat, kSimdPrefix, kExprS128StoreMem, 0, 0])
.exportFunc();
// We add functions after, rather than sorting in some order, so as to keep
// the .out changes small (due to function index).
builder.addFunction('load16', kSig_v_i)
.addBody([kExprLocalGet, 0, kExprI32LoadMem16U, 0, 0, kExprDrop])
.exportFunc();
builder.addFunction('load64', kSig_v_i)
.addBody([kExprLocalGet, 0, kExprI64LoadMem, 0, 0, kExprDrop])
.exportFunc();
builder.addFunction('loadf64', kSig_v_i)
.addBody([kExprLocalGet, 0, kExprF64LoadMem, 0, 0, kExprDrop])
.exportFunc();
var module = builder.instantiate();
module.exports.load(4);
......@@ -44,3 +55,6 @@ module.exports.load(2);
module.exports.loadf(2);
module.exports.store128(4, 0xbeef);
module.exports.load128(2);
module.exports.load16(4);
module.exports.load64(2);
module.exports.loadf64(2);
......@@ -9,3 +9,6 @@ turbofan func: 0+0x3 load from 00000002 val: i32:1454047232 / 56ab000
turbofan func: 2+0x3 load from 00000002 val: f32:94008244174848.000000 / 56ab0000
turbofan func: 6+0x7 store to 00000004 val: s128:48879 48879 48879 48879 / 0000beef 0000beef 0000beef 0000beef
turbofan func: 5+0x3 load from 00000002 val: s128:-1091633152 -1091633152 -1091633152 -1091633152 / beef0000 beef0000 beef0000 beef0000
turbofan func: 7+0x3 load from 00000004 val: i16:48879 / beef
turbofan func: 8+0x3 load from 00000002 val: i64:-4688528683866062848 / beef0000beef0000
turbofan func: 9+0x3 load from 00000002 val: f64:-0.000015 / beef0000beef0000
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment