Commit 53d25795 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[ia32,root] Port ContinueToBuiltin variants

Bug: v8:6666
Change-Id: I54ee5bcaef729d1a4b9edbae3157951df135df90
Reviewed-on: https://chromium-review.googlesource.com/1238239
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56147}
parent 27decab0
......@@ -1354,7 +1354,13 @@ namespace {
void Generate_ContinueToBuiltinHelper(MacroAssembler* masm,
bool java_script_builtin,
bool with_result) {
#ifdef V8_EMBEDDED_BUILTINS
// TODO(v8:6666): Fold into Default config once root is fully supported.
const RegisterConfiguration* config(
RegisterConfiguration::PreserveRootIA32());
#else
const RegisterConfiguration* config(RegisterConfiguration::Default());
#endif
int allocatable_register_count = config->num_allocatable_general_registers();
if (with_result) {
// Overwrite the hole inserted by the deoptimizer with the return value from
......@@ -1384,20 +1390,36 @@ void Generate_ContinueToBuiltinHelper(MacroAssembler* masm,
} // namespace
void Builtins::Generate_ContinueToCodeStubBuiltin(MacroAssembler* masm) {
#ifdef V8_EMBEDDED_BUILTINS
// TODO(v8:6666): Remove the ifdef once root is preserved by default.
Assembler::SupportsRootRegisterScope supports_root_register(masm);
#endif
Generate_ContinueToBuiltinHelper(masm, false, false);
}
void Builtins::Generate_ContinueToCodeStubBuiltinWithResult(
MacroAssembler* masm) {
#ifdef V8_EMBEDDED_BUILTINS
// TODO(v8:6666): Remove the ifdef once root is preserved by default.
Assembler::SupportsRootRegisterScope supports_root_register(masm);
#endif
Generate_ContinueToBuiltinHelper(masm, false, true);
}
void Builtins::Generate_ContinueToJavaScriptBuiltin(MacroAssembler* masm) {
#ifdef V8_EMBEDDED_BUILTINS
// TODO(v8:6666): Remove the ifdef once root is preserved by default.
Assembler::SupportsRootRegisterScope supports_root_register(masm);
#endif
Generate_ContinueToBuiltinHelper(masm, true, false);
}
void Builtins::Generate_ContinueToJavaScriptBuiltinWithResult(
MacroAssembler* masm) {
#ifdef V8_EMBEDDED_BUILTINS
// TODO(v8:6666): Remove the ifdef once root is preserved by default.
Assembler::SupportsRootRegisterScope supports_root_register(masm);
#endif
Generate_ContinueToBuiltinHelper(masm, true, true);
}
......
......@@ -1476,7 +1476,13 @@ void Deoptimizer::DoComputeBuiltinContinuation(
const bool must_handle_result =
!is_topmost || deopt_kind_ == DeoptimizeKind::kLazy;
#if defined(V8_TARGET_ARCH_IA32) && defined(V8_EMBEDDED_BUILTINS)
// TODO(v8:6666): Fold into Default config once root is fully supported.
const RegisterConfiguration* config(
RegisterConfiguration::PreserveRootIA32());
#else
const RegisterConfiguration* config(RegisterConfiguration::Default());
#endif
const int allocatable_register_count =
config->num_allocatable_general_registers();
const int padding_slot_count =
......
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