[ia32] Unalias kRootRegister and kJavaScriptCallExtraArg1Register

In preparation for kRootRegister support on ia32.

Bug: v8:6666
Change-Id: I6bbc87734d189bb8cde5d057a54f8155606d142d
Reviewed-on: https://chromium-review.googlesource.com/1188319
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55406}
This commit is contained in:
jgruber 2018-08-24 13:49:39 +02:00 committed by Commit Bot
parent 136ecbb9bf
commit a839bd42bd
2 changed files with 11 additions and 1 deletions

View File

@ -1115,6 +1115,9 @@ void Builtins::Generate_InterpreterPushArgsThenConstructImpl(
// Tail call to the array construct stub (still in the caller
// context at this point).
__ AssertFunction(edi);
// TODO(v8:6666): When rewriting ia32 ASM builtins to not clobber the
// kRootRegister ebx, this useless move can be removed.
__ Move(kJavaScriptCallExtraArg1Register, ebx);
Handle<Code> code = BUILTIN_CODE(masm->isolate(), ArrayConstructorImpl);
__ Jump(code, RelocInfo::CODE_TARGET);
} else if (mode == InterpreterPushArgsMode::kWithFinalSpread) {
@ -2840,6 +2843,9 @@ void GenerateInternalArrayConstructorCase(MacroAssembler* masm,
RelocInfo::CODE_TARGET);
__ bind(&not_one_case);
// TODO(v8:6666): When rewriting ia32 ASM builtins to not clobber the
// kRootRegister ebx, this useless move can be removed.
__ Move(kJavaScriptCallExtraArg1Register, ebx);
Handle<Code> code = BUILTIN_CODE(masm->isolate(), ArrayNArgumentsConstructor);
__ Jump(code, RelocInfo::CODE_TARGET);
}

View File

@ -31,7 +31,11 @@ constexpr Register kJavaScriptCallArgCountRegister = eax;
constexpr Register kJavaScriptCallCodeStartRegister = ecx;
constexpr Register kJavaScriptCallTargetRegister = kJSFunctionRegister;
constexpr Register kJavaScriptCallNewTargetRegister = edx;
constexpr Register kJavaScriptCallExtraArg1Register = ebx;
// The ExtraArg1Register not part of the real JS calling convention and is
// mostly there to simplify consistent interface descriptor definitions across
// platforms. Note that on ia32 it aliases kJavaScriptCallCodeStartRegister.
constexpr Register kJavaScriptCallExtraArg1Register = ecx;
// The off-heap trampoline does not need a register on ia32 (it uses a
// pc-relative call instead).