v8/test/mjsunit/wasm
Andreas Haas 7c4b930242 Reland "[wasm][liftoff] Emit safepoints for externref values on the stack"
The emitted safepoint entries had the wrong size, because it did not
contain StandardFrameConstants::kFixedFrameSizeAboveFp. The code still
worked because the indices of encoded in the entries where too low by
StandardFrameConstants::kFixedFrameSizeAboveFp and thereby corrected
the invalid size. It worked as follows:

First the stack_slots_size gets calculated from the safepoint entry.
Then the position of a stack slot was
"frame_header_base + stack_slots_size - index * pointer_size", where
"index" is what is encoded in the safepoint map. Because of the incorrect
encoding, both stack_slot_size and index were too low by
StandardFrameConstants::kFixedFrameSizeAboveFp. Therefore the errors in
both values eliminated each other, making the end result correct.

With --print-code, the safepoint entry size was also read, and it
crashed because the encoded value was too low.

The reland fixes the indices.

Original message:

With this CL we emit safepoint maps for externref values on the Liftoff
value stack. With that there is support for externref parameters and
locals in Liftoff, as well as for intermediate values of type
externref.

R=thibaudm@chromium.org

Bug: v8:7581
Change-Id: I88444e57745d7b9fe8f1630e904d49736fa9d720
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2398531
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69786}
2020-09-09 15:38:32 +00:00
..
embenchen
adapter-frame.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
add-getters.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
anyfunc.js [wasm-gc][cleanup] Remove nullref type 2020-06-10 09:01:24 +00:00
asm-wasm-copy.js
asm-wasm-deopt.js
asm-wasm-exception-in-tonumber.js
asm-wasm-expr.js
asm-wasm-f32.js Speed up asm-wasm tests 2020-03-26 19:31:47 +00:00
asm-wasm-f64.js Speed up asm-wasm tests 2020-03-26 19:31:47 +00:00
asm-wasm-heap.js
asm-wasm-i32.js Reduce the number of ints tested 2019-09-11 20:27:24 +00:00
asm-wasm-imports.js [asm.js] Split large asm.js test into parts. 2018-08-09 14:02:04 +00:00
asm-wasm-literals.js
asm-wasm-math-intrinsic.js [wasm] Enable optimization of Math.pow intrinsic. 2019-09-03 11:57:20 +00:00
asm-wasm-memory.js Reland "[asmjs] Properly validate asm.js heap sizes" 2018-08-21 09:00:04 +00:00
asm-wasm-names.js [wasm] Fix asm.js toString for modules with imports 2020-01-27 10:34:35 +00:00
asm-wasm-stack.js [wasm] Implement toString of exported functions 2020-01-24 12:53:31 +00:00
asm-wasm-stdlib.js
asm-wasm-switch.js
asm-wasm-u32.js Reduce the number of ints tested 2019-09-11 20:27:24 +00:00
asm-wasm.js [asm] Avoid instantiation as resumable function 2020-04-01 09:50:34 +00:00
asm-with-wasm-off.js Deprecate SetAllowCodeGenerationFromStringsCallback. 2020-01-13 10:02:45 +00:00
async-compile.js [wasm] Make error messages deterministic 2019-03-14 15:05:18 +00:00
atomics64-stress.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
atomics-non-shared.js [wasm] Adjust atomics wait/notify semantics 2020-06-22 17:49:23 +00:00
atomics-stress.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
atomics.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
bigint-i64-to-imported-js-func.js [wasm] split bigint.js test 2019-03-28 14:48:12 +00:00
bigint.js [wasm] Fix issues concerning type naming 2020-06-16 14:34:12 +00:00
bounds-check-64bit.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
bounds-check-turbofan.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
bulk-memory.js [wasm] Passive element segments don't need a table 2020-03-27 08:38:03 +00:00
call-ref.js [wasm-gc] Implement call_ref, return_call_ref, add some basic tests 2020-08-14 17:58:27 +00:00
calls.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
code-space-exhaustion.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
compare-exchange64-stress.js [wasm] Fix flake in cmpxchg stress test 2020-06-30 08:24:46 +00:00
compare-exchange-stress.js [wasm] Fix flake in cmpxchg stress test 2020-06-30 08:24:46 +00:00
compilation-hints-async-compilation.js [wasm] Remove interpreter compilation hint 2020-04-30 09:50:15 +00:00
compilation-hints-decoder.js [wasm] Remove interpreter compilation hint 2020-04-30 09:50:15 +00:00
compilation-hints-ignored.js [wasm] Remove interpreter compilation hint 2020-04-30 09:50:15 +00:00
compilation-hints-lazy-validation.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
compilation-hints-streaming-compilation.js [wasm] Remove interpreter compilation hint 2020-04-30 09:50:15 +00:00
compilation-hints-streaming-lazy-validation.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
compilation-hints-sync-compilation.js [wasm] Remove interpreter compilation hint 2020-04-30 09:50:15 +00:00
compilation-limits-asm.js
compilation-limits.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
compiled-module-management.js Reland "[wasm] Cleanup wasm script creation" 2020-04-09 14:43:54 +00:00
compiled-module-serialization.js Reland "[wasm] Ensure that only TurboFan code is serialized" 2020-08-11 14:43:58 +00:00
data-segments.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
disable-trap-handler.js
disallow-codegen.js Deprecate SetAllowCodeGenerationFromStringsCallback. 2020-01-13 10:02:45 +00:00
divrem-trap.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
empirical_max_memory.js [test][wasm] Allow testing of huge memories 2020-01-10 11:20:59 +00:00
ensure-wasm-binaries-up-to-date.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
errors.js [wasm] Prepare tests for flipping the wasm-bigint flag 2020-06-12 18:12:42 +00:00
exceptions-export.js [wasm] Revise compile error messages 2019-02-01 14:36:12 +00:00
exceptions-externref.js [wasm] Remove immediate of ref.is_null 2020-06-23 14:32:13 +00:00
exceptions-global.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
exceptions-import.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
exceptions-rethrow.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
exceptions-shared.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
exceptions-simd.js [wasm-simd] Rename anytrue and alltrue to follow proposal 2020-05-21 19:03:52 +00:00
exceptions-utils.js [wasm][test] Deduplicate assertWasmThrows helper method. 2018-12-10 09:56:17 +00:00
exceptions.js [wasm][exn] Add test for manipulated prototype chain 2020-04-27 13:13:13 +00:00
export-global.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
export-identity.js [wasm] Add test of function identity on re-export. 2019-07-03 16:43:27 +00:00
export-mutable-global.js [wasm] Rename {Get,Set}Global to Global{Get,Set} 2019-10-08 14:27:50 +00:00
export-table.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
expose-wasm.js
externref-globals.js [wasm-gc][cleanup] Remove nullref type 2020-06-10 09:01:24 +00:00
externref-liftoff.js Reland "[wasm][liftoff] Emit safepoints for externref values on the stack" 2020-09-09 15:38:32 +00:00
externref-table.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
externref.js [wasm] Remove immediate of ref.is_null 2020-06-23 14:32:13 +00:00
ffi-error.js [wasm] Prepare tests for flipping the wasm-bigint flag 2020-06-12 18:12:42 +00:00
ffi.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
float-constant-folding.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
function-names.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
function-prototype.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
futex.js [atomics] Remove the deprecated Atomics.wake 2020-08-10 23:02:17 +00:00
gc-buffer.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
gc-frame.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
gc-memory.js Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
gc-stress.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
generic-wrapper.js [wasm] Reverse the evaluation of params in js-to-wasm generic wrapper 2020-09-08 13:36:15 +00:00
globals-import-export-identity.js Reland "[wasm] Re-exported globals preserve their identity" 2020-06-25 18:12:41 +00:00
globals.js [wasm] Prepare tests for flipping the wasm-bigint flag 2020-06-12 18:12:42 +00:00
graceful_shutdown_during_tierup.js [api] Add API function Isolate::HasPendingBackgroundTasks 2020-08-10 17:10:36 +00:00
graceful_shutdown.js [api] Add API function Isolate::HasPendingBackgroundTasks 2020-08-10 17:10:36 +00:00
grow-huge-memory.js [wasm] Fix memory growth to >2GB 2020-02-28 11:48:37 +00:00
grow-memory-detaching.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
grow-memory-in-branch.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
grow-memory-in-call.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
grow-memory-in-loop.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
grow-memory.js [wasm] Speed up some tests in grow-memory 2020-03-27 22:30:27 +00:00
grow-shared-memory.js [wasm] Growing memory should always allocate a new JS buffer 2020-01-14 01:35:06 +00:00
huge-memory.js [test][wasm] Allow testing of huge memories 2020-01-10 11:20:59 +00:00
huge-typedarray.js [64bit] Bump TypedArray max length to 2**32-1 elements 2020-01-22 17:42:26 +00:00
import-function.js [wasm] Determine receiver at runtime to avoid re-creation of wrapper 2019-11-20 12:30:20 +00:00
import-memory.js [wasm] Fix memory growth to >2GB 2020-02-28 11:48:37 +00:00
import-mutable-global.js [wasm] Rename {Get,Set}Global to Global{Get,Set} 2019-10-08 14:27:50 +00:00
import-table.js [wasm] Rename {Get,Set}Global to Global{Get,Set} 2019-10-08 14:27:50 +00:00
incrementer.wasm
indirect-call-non-zero-table.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
indirect-calls.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
indirect-sig-mismatch.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
indirect-tables.js [wasm] Rename {Get,Set}Global to Global{Get,Set} 2019-10-08 14:27:50 +00:00
instance-gc.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
instance-memory-gc-stress.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
instantiate-module-basic.js [wasm] Rename {Get,Set}Global to Global{Get,Set} 2019-10-08 14:27:50 +00:00
instantiate-run-basic.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
js-api.js [wasm] Check size of tables dynamically 2020-08-06 11:50:43 +00:00
large-offset.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
lazy-compilation.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
liftoff-simd-params.js Reland "[wasm-simd][liftoff] Add S128 case for stack movements" 2020-02-04 18:28:26 +00:00
liftoff-trap-handler.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
liftoff.js [wasm] Adjust flags after changed implications 2020-01-09 16:55:42 +00:00
loop-rotation.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
many-modules.js [wasm] Remove always-on --wasm-far-jump-table flag 2020-01-31 09:39:04 +00:00
many-parameters.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
memory_1gb_oob.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
memory_2gb_oob.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
memory_4gb_oob.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
memory-external-call.js [wasm] Fix capitalization of "Wasm" 2020-03-31 06:55:16 +00:00
memory-instance-validation.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
memory-size.js [wasm] Check size of tables dynamically 2020-08-06 11:50:43 +00:00
memory.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
module-memory.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
multi-table-element-section.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
multi-value-simd.js [wasm-simd] Support returning Simd128 on caller's stack 2020-08-17 20:59:54 +00:00
multi-value.js [wasm][decoder] Type check one-armed if blocks 2019-10-31 13:47:13 +00:00
multiple-code-spaces.js [wasm] Speed up multiple-code-spaces test 2020-08-13 08:51:03 +00:00
mutable-globals.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
names.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
origin-trial-flags.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
OWNERS [wasm] Update OWNERS 2020-01-08 14:56:06 +00:00
parallel_compilation.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
params.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
print-code.js Reland "[wasm] Ensure that only TurboFan code is serialized" 2020-08-11 14:43:58 +00:00
receiver.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
return-calls.js [wasm][mv] Enable wasm multi-value 2020-08-18 16:21:43 +00:00
serialize-lazy-module.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
shared-arraybuffer-worker-simple-gc.js [api] Add [Shared]ArrayBuffer::GetBackingStore() 2019-09-19 10:03:02 +00:00
shared-memory-gc-stress.js Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
shared-memory-worker-explicit-gc-stress.js [mjsunit] Add more tests for shared array buffers / memories 2019-07-17 14:08:38 +00:00
shared-memory-worker-gc-stress.js [mjsunit] Add more tests for shared array buffers / memories 2019-07-17 14:08:38 +00:00
shared-memory-worker-gc.js Reland x6 [arraybuffer] Rearchitect backing store ownership 2019-09-09 13:07:42 +00:00
shared-memory-worker-simple-gc.js [api] Add [Shared]ArrayBuffer::GetBackingStore() 2019-09-19 10:03:02 +00:00
shared-memory-worker-stress.js [mjsunit] Nerf shared-memory-worker-stress a little 2019-07-18 13:08:22 +00:00
shared-memory.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
simd-call.js Reland "[wasm-simd][liftoff] Check CpuFeatures for SIMD support" 2020-02-03 19:43:09 +00:00
simd-errors.js [wasm-simd] Add JS-API errors for Simd, tests 2020-06-16 00:27:48 +00:00
simd-globals.js [wasm-simd] Fix init of SIMD global 2020-07-24 16:44:22 +00:00
stack.js [wasm] WAT-compatible naming for exported function 2020-03-26 17:29:49 +00:00
stackwalk.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
start-function.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
streaming-api.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
streaming-compile.js [wasm][test] Remove default --wasm-async-compilation flag 2018-11-09 17:29:17 +00:00
streaming-error-position.js [wasm][gc][refactor] Decode gc types with immediates consistently. 2020-05-06 14:31:29 +00:00
streaming-trap-location.js [wasm][test] Remove default --wasm-async-compilation flag 2018-11-09 17:29:17 +00:00
table-access.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
table-copy-externref.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
table-copy.js [wasm] Rename {Get,Set}Global to Global{Get,Set} 2019-10-08 14:27:50 +00:00
table-fill.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
table-get.js [wasm][test] Get rid of the imported parameter in addElementSegments 2019-05-21 10:03:55 +00:00
table-grow-from-wasm.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
table-grow.js [wasm][respect] Avoid 'sanity check' 2020-06-19 14:32:15 +00:00
table-limits.js [wasm] Check size of tables dynamically 2020-08-06 11:50:43 +00:00
table.js [wasm] Check size of tables dynamically 2020-08-06 11:50:43 +00:00
test-wasm-module-builder.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
tier-down-to-liftoff.js [wasm] Tierup wasm module on debugger.disable 2020-03-09 17:39:37 +00:00
tier-up-testing-flag.js Revert "Reland^3 "[flags] warn about contradictory flags"" 2020-08-17 19:34:18 +00:00
trap-location.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
type-reflection-with-exnref.js [wasm] Extend type reflection to 'exnref' types. 2019-08-27 14:31:37 +00:00
type-reflection-with-externref.js [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
type-reflection-with-mv.js [wasm] Support multi-value in JS to JS wrappers 2019-10-07 13:29:31 +00:00
type-reflection.js [wasm] Prepare tests for flipping the wasm-bigint flag 2020-06-12 18:12:42 +00:00
typed-funcref.js [wasm] Implement optional init parameter for Table.grow 2020-05-19 14:09:30 +00:00
unicode-validation.js [wasm][respect] Avoid 'sanity check' 2020-06-19 14:32:15 +00:00
unicode.js [wasm][respect] Avoid 'sanity check' 2020-06-19 14:32:15 +00:00
unreachable-validation.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
unreachable.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
user-properties-common.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
user-properties-constructed.js
user-properties-exported.js [wasm] Fix capitalization of "Wasm" 2020-03-31 06:55:16 +00:00
user-properties-module.js [wasm] Fix capitalization of "Wasm" 2020-03-31 06:55:16 +00:00
user-properties-reexport.js [wasm] Fix capitalization of "Wasm" 2020-03-31 06:55:16 +00:00
verify-module-basic-errors.js
wasm-api-overloading.js [wasm] merge js constants file in module-builder 2019-01-30 22:10:34 +00:00
wasm-default.js
wasm-dynamic-tiering.js [wasm] Add priorities for function compilation 2020-08-27 13:42:55 +00:00
wasm-math-intrinsic.js [wasm] Rename {Get,Set,Tee}Local to Local{Get,Set,Tee} 2019-10-08 14:14:40 +00:00
wasm-module-builder.js [wasm-simd] Fix bounds check for load extends 2020-08-19 18:26:17 +00:00
wasm-object-api.js
worker-memory.js [d8] Update new Worker API to match the Web API 2018-09-20 00:10:28 +00:00
worker-module.js Remove "--wasm-disable-structured-cloning" flag 2020-01-22 22:24:19 +00:00