v8/test/cctest/compiler
Predrag Rudic 7352b3f897 MIPS[64] Port:"[cctest] Support testing Simd128 moves and swaps"
Port 0761b55d21

Original Commit Message:

"Extend the code-generator tests to cover AssembleMove and AssembleSwap with
Simd128 registers and stack slots, for targets that support them.

For this to work however, we need support for passing Simd128 stack parameters
in TurboFan which this patch implements for Arm and x86. PPC and S390 both do
not support the Simd128 representation and it appears MIPS and MIPS64's
implementation of AssembleMove and AssembleSwap do not support it either.

As per the design of the tests, the set of values to perform moves on are
represented in a FixedArray of Smis (for kTagged) and HeapNumbers (for kFloat32
and kFloat64). They are converted to raw values for the moves to be performed
on, to be then converted back into a FixedArray. For the kSimd128
representation, we represent values as a FixedArray of 4 Smis, each representing
a lane. They are converted to a raw Simd128 vector using the `I32x4ReplaceLane`
and `I32x4ExtractLane` operations.

Finally, these tests need Simd128 variables mixed with the CodeStubAssembler
which is not a use-case officially supported. And as a result, the `RecordWrite`
stub does not guarantee to preserve Simd128 registers. To get around this, we
have to be careful to skip write barriers when dealing with Simd128 parameters
inside the "teardown" function, and we've had to move all allocations to the
"setup" function.

Thanks to this, we are able to catch bugs such as this one
https://bugs.chromium.org/p/v8/issues/detail?id=6843."

Change-Id: If867dedf4a2c72cb75c58effda93e3eec432fd67
Reviewed-on: https://chromium-review.googlesource.com/906469
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#51142}
2018-02-07 12:53:57 +00:00
..
c-signature.h [test] Fix usages of std::array initializer lists. 2018-01-16 17:14:29 +00:00
call-tester.h Replace CALL_GENERATED_CODE by GeneratedCode wrapper 2018-01-09 10:33:36 +00:00
code-assembler-tester.h Reland "[arm64] Preparation for padding of arguments" 2017-12-20 13:50:36 +00:00
codegen-tester.cc Enable clang's -Wunreachable-code warning. 2017-12-04 13:09:25 +00:00
codegen-tester.h [test] Fix usages of std::array initializer lists. 2018-01-16 17:14:29 +00:00
function-tester.cc [compile] Remove AST numbering 2018-01-24 17:15:55 +00:00
function-tester.h [cleanup] Add templatized FunctionTester::CallChecked(...) helpers 2017-07-18 14:25:21 +00:00
graph-builder-tester.h [test] Fix usages of std::array initializer lists. 2018-01-16 17:14:29 +00:00
test-basic-block-profiler.cc [iwyu] Pre-work for removing unallowed include macro-assembler.h -> assembler-inl.h 2017-02-23 12:10:21 +00:00
test-branch-combine.cc [iwyu] Pre-work for removing unallowed include macro-assembler.h -> assembler-inl.h 2017-02-23 12:10:21 +00:00
test-code-assembler.cc [csa] fix variable merge for switch default label 2017-09-26 12:31:29 +00:00
test-code-generator.cc MIPS[64] Port:"[cctest] Support testing Simd128 moves and swaps" 2018-02-07 12:53:57 +00:00
test-gap-resolver.cc Add bound checking to RegisterConfiguration accessors function. 2017-08-18 09:24:31 +00:00
test-graph-visualizer.cc Use nullptr instead of NULL where possible 2017-10-13 17:21:49 +00:00
test-instruction.cc Use nullptr instead of NULL where possible 2017-10-13 17:21:49 +00:00
test-js-constant-cache.cc [iwyu] Remove stale TODOs about objects-inl.h inclusion. 2017-10-09 11:14:59 +00:00
test-js-context-specialization.cc [compiler][modules] Constant-fold loads of module cells. 2017-05-04 11:09:19 +00:00
test-js-typed-lowering.cc [turbofan] Introduce NumberToString operator. 2018-01-17 06:30:08 +00:00
test-jump-threading.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
test-linkage.cc [Compiler] Remove isolate from CompilationInfo. 2017-11-15 15:40:55 +00:00
test-loop-analysis.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
test-machine-operator-reducer.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
test-multiple-return.cc [x64][turbofan] Pass the slot index for the peek instruction by operand 2018-01-15 15:22:27 +00:00
test-node.cc Use nullptr instead of NULL where possible 2017-10-13 17:21:49 +00:00
test-operator.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
test-representation-change.cc [turbofan] Thread feedback through simplified lowering 2018-01-23 08:57:15 +00:00
test-run-bytecode-graph-builder.cc [Compiler] Remove isolate from CompilationInfo. 2017-11-15 15:40:55 +00:00
test-run-calls-to-external-references.cc [iwyu] Pre-work for removing unallowed include macro-assembler.h -> assembler-inl.h 2017-02-23 12:10:21 +00:00
test-run-deopt.cc [fullcodegen] Remove --stress-fullcodegen flag. 2017-08-10 09:52:49 +00:00
test-run-intrinsics.cc [cleanup] Limit Token usage to Parser, AST, BytecodeGenerator 2017-10-25 18:15:26 +00:00
test-run-jsbranches.cc [turbofan] Remove for-in support from the AstGraphBuilder. 2017-02-08 06:41:42 +00:00
test-run-jscalls.cc include fixing: api.h shouldn't include objects-inl.h 2017-01-09 13:43:28 +00:00
test-run-jsexceptions.cc [fullcodegen] Remove --stress-fullcodegen flag. 2017-08-10 09:52:49 +00:00
test-run-jsobjects.cc [iwyu] Remove stale TODOs about objects-inl.h inclusion. 2017-10-09 11:14:59 +00:00
test-run-jsops.cc Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00
test-run-load-store.cc [turbofan] Remove CheckedLoad operation 2018-01-02 08:47:01 +00:00
test-run-machops.cc [cleanup] Refactor CSignature helper 2018-01-16 10:01:13 +00:00
test-run-native-calls.cc [cleanup] Refactor CSignature helper 2018-01-16 10:01:13 +00:00
test-run-retpoline.cc [jumbo] add namespaces to avoid CreateDescriptorForStackArguments collision 2018-01-16 20:56:28 +00:00
test-run-stackcheck.cc [fullcodegen] Remove --stress-fullcodegen flag. 2017-08-10 09:52:49 +00:00
test-run-stubs.cc [Compiler] Remove isolate from CompilationInfo. 2017-11-15 15:40:55 +00:00
test-run-tail-calls.cc [jumbo] add namespaces to avoid CreateDescriptorForStackArguments collision 2018-01-16 20:56:28 +00:00
test-run-unwinding-info.cc [turbofan] Replace uninitialized JSCall nodes with SOFT deopt. 2017-06-27 03:57:13 +00:00
test-run-variables.cc Use nullptr instead of NULL where possible 2017-10-13 17:21:49 +00:00
test-run-wasm-machops.cc [wasm] Simplify init by adding SetRawMemory() to WasmContext. 2017-12-15 20:33:16 +00:00
value-helper.cc Reland "[test] Avoid unnecessary std::vector allocations" 2017-10-19 08:47:31 +00:00
value-helper.h Normalize casing of hexadecimal digits 2017-12-02 01:24:40 +00:00