[ia32] Enable restricted register allocation for CSA-generated builtins
This switches on a restricted register allocation for all CSA-generated builtins on ia32, which treats the kRootRegister (=ebx) as unallocatable. A few builtins are explicitly excluded. These still need to be fixed in follow-up CLs. But I'd like to bake this in now to ensure we don't add more code that cannot handle restricted allocation. All of this is still behind the (disabled-by-default on ia32) v8_embedded_builtins configuration. Bug: v8:6666 Change-Id: If5268aa00439406e1f4e0f7ee18496715a95fdd2 Reviewed-on: https://chromium-review.googlesource.com/1206874 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#55654}
This commit is contained in:
parent
34625fdb5a
commit
2b1ca9781a
@ -2441,7 +2441,16 @@ bool PipelineImpl::SelectInstructions(Linkage* linkage) {
|
||||
AllocateRegisters(RegisterConfiguration::Poisoning(), call_descriptor,
|
||||
run_verifier);
|
||||
#if defined(V8_TARGET_ARCH_IA32) && defined(V8_EMBEDDED_BUILTINS)
|
||||
} else if (data_->assembler_options().isolate_independent_code) {
|
||||
// TODO(v8:6666): For explicitly listed builtins, register allocation fails
|
||||
// due to register pressure when kRootRegister is not allocatable. Either
|
||||
// refactor these builtins or fix register allocation in these cases.
|
||||
} else if (Builtins::IsBuiltinId(data->info()->builtin_index()) &&
|
||||
data->info()->builtin_index() != Builtins::kWasmArgumentsAdaptor &&
|
||||
data->info()->builtin_index() != Builtins::kCopyFromTempArray &&
|
||||
data->info()->builtin_index() != Builtins::kCopyWithinSortArray &&
|
||||
data->info()->builtin_index() != Builtins::kBinaryInsertionSort &&
|
||||
data->info()->builtin_index() != Builtins::kMergeAt &&
|
||||
data->info()->builtin_index() != Builtins::kArrayTimSort) {
|
||||
// TODO(v8:6666): Extend support to user code. Ensure that
|
||||
// it is mutually exclusive with the Poisoning configuration above; and that
|
||||
// it cooperates with restricted allocatable registers above.
|
||||
@ -2451,7 +2460,7 @@ bool PipelineImpl::SelectInstructions(Linkage* linkage) {
|
||||
CHECK_IMPLIES(FLAG_embedded_builtins, !FLAG_untrusted_code_mitigations);
|
||||
AllocateRegisters(RegisterConfiguration::PreserveRootIA32(),
|
||||
call_descriptor, run_verifier);
|
||||
#endif // V8_TARGET_ARCH_IA32
|
||||
#endif // defined(V8_TARGET_ARCH_IA32) && defined(V8_EMBEDDED_BUILTINS)
|
||||
} else {
|
||||
AllocateRegisters(RegisterConfiguration::Default(), call_descriptor,
|
||||
run_verifier);
|
||||
|
Loading…
Reference in New Issue
Block a user