Commit f1e979a9 authored by Pierre Langlois's avatar Pierre Langlois Committed by Commit Bot

[cctest] Test parallel moves with near and far ranges.

The AssembleMove and AssembleSwap tests would only perform moves on stack
parameters. This limits us to testing with slots that are likely to be in range
of loads and stores. As well as only testing memory accesses with positive
offsets relative to the frame pointer.

This patch addresses these limitations by moving half of the stack parameters
into spill slots, to then perform moves on them. Additionally, to increase
ranges, we create articial space between each spilled slot.

As a drive-by, allow giving custom names to code objects created with the
CodeAssemblerTester. It helps a lot inspecting disassembly.

And finally, this CL uncovered a bug where I had forgotten to initialize
FixedArrays, which would make the incremental marker crash.

Bug: v8:6848
Change-Id: Ic1954c1896130f6c55e09a3068bf341cc4c68670
Reviewed-on: https://chromium-review.googlesource.com/980613
Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52406}
parent e90a052e
......@@ -19,25 +19,27 @@ namespace compiler {
class CodeAssemblerTester {
public:
// Test generating code for a stub. Assumes VoidDescriptor call interface.
explicit CodeAssemblerTester(Isolate* isolate)
explicit CodeAssemblerTester(Isolate* isolate, const char* name = "test")
: zone_(isolate->allocator(), ZONE_NAME),
scope_(isolate),
state_(isolate, &zone_, VoidDescriptor(isolate), Code::STUB, "test",
state_(isolate, &zone_, VoidDescriptor(isolate), Code::STUB, name,
PoisoningMitigationLevel::kOff) {}
// Test generating code for a JS function (e.g. builtins).
CodeAssemblerTester(Isolate* isolate, int parameter_count,
Code::Kind kind = Code::BUILTIN)
Code::Kind kind = Code::BUILTIN,
const char* name = "test")
: zone_(isolate->allocator(), ZONE_NAME),
scope_(isolate),
state_(isolate, &zone_, parameter_count, kind, "test",
state_(isolate, &zone_, parameter_count, kind, name,
PoisoningMitigationLevel::kOff) {}
CodeAssemblerTester(Isolate* isolate, Code::Kind kind)
CodeAssemblerTester(Isolate* isolate, Code::Kind kind,
const char* name = "test")
: zone_(isolate->allocator(), ZONE_NAME),
scope_(isolate),
state_(isolate, &zone_, 0, kind, "test",
PoisoningMitigationLevel::kOff) {}
state_(isolate, &zone_, 0, kind, name, PoisoningMitigationLevel::kOff) {
}
CodeAssemblerTester(Isolate* isolate, CallDescriptor* call_descriptor,
const char* name = "test")
......
This diff is collapsed.
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