[x64][windows] Reuse kRegisterPassArguments on win

The shadow stack space is == the number of register arguments
saved on stack, so reuse the same constant that is already defined.

Bug: v8:11879
Change-Id: I576c26770660de63c85089d658fcddc14bd5a08f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2997927
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75538}
This commit is contained in:
Ng Zhi An 2021-06-30 15:00:19 -07:00 committed by V8 LUCI CQ
parent c24f67d984
commit 32f169f893

View File

@ -3234,12 +3234,17 @@ void MacroAssembler::EnterExitFramePrologue(Register saved_rax_reg,
rbx);
}
#ifdef V8_TARGET_OS_WIN
static const int kRegisterPassedArguments = 4;
#else
static const int kRegisterPassedArguments = 6;
#endif
void MacroAssembler::EnterExitFrameEpilogue(int arg_stack_space,
bool save_doubles) {
ASM_CODE_COMMENT(this);
#ifdef V8_TARGET_OS_WIN
const int kShadowSpace = 4;
arg_stack_space += kShadowSpace;
arg_stack_space += kRegisterPassedArguments;
#endif
// Optionally save all XMM registers.
if (save_doubles) {
@ -3347,12 +3352,6 @@ void MacroAssembler::LeaveExitFrameEpilogue() {
Move(c_entry_fp_operand, 0);
}
#ifdef V8_TARGET_OS_WIN
static const int kRegisterPassedArguments = 4;
#else
static const int kRegisterPassedArguments = 6;
#endif
void MacroAssembler::LoadNativeContextSlot(Register dst, int index) {
ASM_CODE_COMMENT(this);
// Load native context.