v8/test
Ng Zhi An b48b82e779 [wasm] Fix wasm decoder for multi-byte opcodes
SIMD opcodes consist of the prefix byte, then an LEB128 encoded int. We
were decoding this incorrectly as a fixed uint8. This fixes the decoder
to properly handle multi bytes.

In some cases, the multi byte logic is applied to all prefixed opcodes.
This is not a problem, since for values < 0x80, the LEB encoding is a
single byte, and decodes to the same int. If the prefix opcode has
instructions with index >= 0x80, it would be required to be LEB128
encoded anyway.

There are a bunch of trivial changes to test-run-wasm-simd, to change
the macro from BUILD to BUILD_V, the former only works for single byte
opcodes, the latter is a new template-based macro that correct handles
multi-byte opcodes. The only unchanged test is the shuffle fuzzer test,
which builds its own sequence of bytes without using the BUILD macro.

Bug: v8:10258
Change-Id: Ie7377e899a7eab97ecf28176fd908babc08d0f19
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2118476
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67186}
2020-04-16 18:12:48 +00:00
..
benchmarks Create master files per benchmark in csuite 2020-02-26 10:37:33 +00:00
cctest [wasm] Fix wasm decoder for multi-byte opcodes 2020-04-16 18:12:48 +00:00
common [wasm] Turn ValueType from an enum to a class 2020-03-12 17:03:16 +00:00
debugger [debug] Reenable tests in stress_incremental_marking 2020-04-16 16:31:27 +00:00
debugging Add initial support for Wasm debugging with LLDB: implements a GDB-remote stub 2020-02-20 22:27:58 +00:00
fuzzer [wasm-simd][fuzzer] Add S8x16Shuffle to fuzzer 2020-04-09 01:02:57 +00:00
inspector [inspector] Fix handling of on-heap TypedArrays in queryObjects() 2020-04-16 13:34:57 +00:00
intl Fix special case timezone RangeError 2020-04-15 18:19:00 +00:00
js-perf-test [cleanup][test] Fix typo in js-perf-test/Scope/with.js 2020-02-12 10:59:54 +00:00
memory [owners] Remove redundant OWNERS files in test/ 2019-06-24 12:44:32 +00:00
message [weakrefs] Port FinalizationRegistry cleanup loop to Torque 2020-04-16 03:31:04 +00:00
mjsunit [wasm] Fix wasm decoder for multi-byte opcodes 2020-04-16 18:12:48 +00:00
mkgrokdump [heap] Enable Verify for RO_SPACE when it is shared 2019-11-04 09:55:45 +00:00
mozilla Remove and update some outdated TODO(mstarzinger). 2019-12-13 10:18:04 +00:00
test262 Support the o?.#foo syntax 2020-04-14 10:16:25 +00:00
torque [torque] support multiline comments 2020-04-07 13:32:16 +00:00
unittests [wasm] Fix wasm decoder for multi-byte opcodes 2020-04-16 18:12:48 +00:00
wasm-api-tests [wasm] Clean up WASM_CALL_INDIRECT macros 2019-11-28 14:44:06 +00:00
wasm-js [wasm] Update wasm spec tests 2020-03-26 16:04:53 +00:00
wasm-spec-tests [wasm] Passive element segments don't need a table 2020-03-27 08:38:03 +00:00
webkit [class] Improve error message for calling anonymous class constructors 2019-12-05 21:13:07 +00:00
BUILD.gn [preparser] deprecate stand-alone "preparser" test-suite 2019-11-20 08:52:59 +00:00
OWNERS Use relative paths to OWNERS files 2019-08-12 13:52:52 +00:00