v8/test/cctest/wasm
Ng Zhi An c92e74fa68 [wasm-simd][liftoff][arm64] Check offset fits in str immediate
When filling stack slots, the start offset can be too large to fit into
the immediate of a str instruction (which is used to handle remainders
after stp). For example, a function with 32 i64 params will require 256
bytes reserved for the params, so the offset starts at 256 + 16
(instance) = 272. This does not fit into a int9, so we hit an
UNREACHABLE case when emitting str.

The fix here checks that start can fit in an unscaled immediate, and if
it doesn't fallback to the general case. We could use the Str
from macro-asesmbler, but that uses another instruction, so we are not
saving anything.

A check for IsImmLSUnscaled(-start-12) is sufficient because 12 is the
largest possible value for remainder. So if -start-12 fits, everything
else will fit.

Bug: v8:10645
Change-Id: I1c415499ada3a807d5f3889f091150bfefdf471d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2267369
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68594}
2020-06-29 19:57:07 +00:00
..
OWNERS [wasm] Update OWNERS 2020-01-08 14:56:06 +00:00
test-c-wasm-entry.cc [wasm-simd] Add JS-API errors for Simd, tests 2020-06-16 00:27:48 +00:00
test-compilation-cache.cc Reland "Reland "[wasm] Cache streaming compilation result"" 2020-02-03 13:49:18 +00:00
test-gc.cc Reland: [wasm-gc] Implement rtt.sub 2020-06-29 14:55:45 +00:00
test-grow-memory.cc [wasm] Fix capitalization of "Wasm" 2020-03-31 06:55:16 +00:00
test-jump-table-assembler.cc [codegen] Reduce kMinimalBufferSize and add kDefaultBufferSize 2019-11-14 15:05:31 +00:00
test-liftoff-inspection.cc [wasm][debug] Store "for debugging" flag on compilation unit 2020-04-14 13:58:59 +00:00
test-run-wasm-64.cc [wasm] Turn ValueType from an enum to a class 2020-03-12 17:03:16 +00:00
test-run-wasm-asmjs.cc [Liftoff] List unsupported opcodes explicitly 2019-05-29 09:47:28 +00:00
test-run-wasm-atomics64.cc [wasm][liftoff][arm] Implement CompareExchange 2020-05-06 10:11:49 +00:00
test-run-wasm-atomics.cc Make atomic operations effectful. 2019-07-31 16:12:04 +00:00
test-run-wasm-bulk-memory.cc [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
test-run-wasm-exceptions.cc [wasm] Prepare tests for flipping the wasm-bigint flag 2020-06-12 18:12:42 +00:00
test-run-wasm-interpreter.cc [wasm] Remove immediate of ref.is_null 2020-06-23 14:32:13 +00:00
test-run-wasm-js.cc [wasm] Remove interpreter entry code 2020-05-05 11:18:05 +00:00
test-run-wasm-module.cc [wasm-gc] Change reference type encoding to match proposal spec 2020-06-19 17:47:17 +00:00
test-run-wasm-sign-extension.cc [wasm] Remove Sign Extension flag, and helper functions 2019-12-06 13:14:44 +00:00
test-run-wasm-simd-liftoff.cc [wasm-simd][liftoff][arm64] Check offset fits in str immediate 2020-06-29 19:57:07 +00:00
test-run-wasm-simd-scalar-lowering.cc [wasm-simd] Scalar lowering to convert i8x16 to f32x4 2020-05-07 17:09:53 +00:00
test-run-wasm-simd.cc [wasm-simd][arm] Prototype f64x2.trunc 2020-06-29 18:55:17 +00:00
test-run-wasm.cc [wasm] Make opcode properties constexpr 2020-06-24 11:58:22 +00:00
test-streaming-compilation.cc [wasm] Do not log code of functions whose module is not fully loaded 2020-06-15 09:23:48 +00:00
test-wasm-breakpoints.cc [wasm][debug] Pass pointer for detected features 2020-06-15 08:54:12 +00:00
test-wasm-codegen.cc [wasm] Deprecate unused {DeserializeOrCompile} API 2020-01-22 08:46:23 +00:00
test-wasm-debug-evaluate.cc [wasm] Move interpreter to test directory 2020-06-23 08:48:14 +00:00
test-wasm-import-wrapper-cache.cc Reland "[wasm] Share native modules compiled from the same bytes" 2019-12-18 14:40:28 +00:00
test-wasm-serialization.cc [wasm] Set source url when deserializing wasm module 2020-04-22 07:12:18 +00:00
test-wasm-shared-engine.cc [wasm] Store the source URL in CompiledWasmModule 2020-05-04 15:07:21 +00:00
test-wasm-stack.cc [wasm] Remove interpreter entry code 2020-05-05 11:18:05 +00:00
test-wasm-trap-position.cc [wasm] Remove interpreter entry code 2020-05-05 11:18:05 +00:00
wasm-atomics-utils.h [wasm][cleanup] Using 'using' instead of 'typedef' 2019-03-29 10:20:30 +00:00
wasm-run-utils.cc [wasm] Instantiate interpreter for testing directly 2020-06-09 13:04:32 +00:00
wasm-run-utils.h [wasm] Move interpreter to test directory 2020-06-23 08:48:14 +00:00