Commit b453a10d authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[ia32,root] Preserve kRootRegister (ebx) in CallBoundFunction

Bug: v8:6666
Change-Id: I5c75eda044312bba6be1ce6bf71afbfe94534afc
Reviewed-on: https://chromium-review.googlesource.com/1233674Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56075}
parent 03936bcf
...@@ -39,6 +39,9 @@ void Builtins::Generate_CallFunction_ReceiverIsAny(MacroAssembler* masm) { ...@@ -39,6 +39,9 @@ void Builtins::Generate_CallFunction_ReceiverIsAny(MacroAssembler* masm) {
} }
void Builtins::Generate_CallBoundFunction(MacroAssembler* masm) { void Builtins::Generate_CallBoundFunction(MacroAssembler* masm) {
#ifdef V8_TARGET_ARCH_IA32
Assembler::SupportsRootRegisterScope supports_root_register(masm);
#endif
Generate_CallBoundFunctionImpl(masm); Generate_CallBoundFunctionImpl(masm);
} }
......
...@@ -2070,6 +2070,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) { ...@@ -2070,6 +2070,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
// static // static
void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm) { void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm) {
Assembler::SupportsRootRegisterScope supports_root_register(masm);
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- eax : the number of arguments (not including the receiver) // -- eax : the number of arguments (not including the receiver)
// -- edi : the function to call (checked to be a JSBoundFunction) // -- edi : the function to call (checked to be a JSBoundFunction)
...@@ -2077,8 +2078,8 @@ void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm) { ...@@ -2077,8 +2078,8 @@ void Builtins::Generate_CallBoundFunctionImpl(MacroAssembler* masm) {
__ AssertBoundFunction(edi); __ AssertBoundFunction(edi);
// Patch the receiver to [[BoundThis]]. // Patch the receiver to [[BoundThis]].
__ mov(ebx, FieldOperand(edi, JSBoundFunction::kBoundThisOffset)); __ mov(ecx, FieldOperand(edi, JSBoundFunction::kBoundThisOffset));
__ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ebx); __ mov(Operand(esp, eax, times_pointer_size, kPointerSize), ecx);
// Push the [[BoundArguments]] onto the stack. // Push the [[BoundArguments]] onto the stack.
Generate_PushBoundArguments(masm); Generate_PushBoundArguments(masm);
......
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