From d04d06c7356f7c919f808427e21b87bcedd16ebe Mon Sep 17 00:00:00 2001 From: Guilherme Ottoni Date: Tue, 21 May 2013 21:56:22 -0700 Subject: [PATCH] Increase spill area Bump it from 8 to 16 Cells. --- hphp/runtime/vm/translator/abi-x64.h | 4 ++-- hphp/runtime/vm/translator/hopt/linearscan.h | 2 +- hphp/runtime/vm/translator/translator-asm-helpers.S | 4 ++-- hphp/runtime/vm/translator/translator-x64.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hphp/runtime/vm/translator/abi-x64.h b/hphp/runtime/vm/translator/abi-x64.h index 70d4054dd..2fc54c78c 100644 --- a/hphp/runtime/vm/translator/abi-x64.h +++ b/hphp/runtime/vm/translator/abi-x64.h @@ -335,8 +335,8 @@ const RegSet kAllX64Regs = RegSet(kAllRegs).add(reg::r10) * address). It is used as spill locations by HHIR (see LinearScan), * and for MInstrState in both HHIR and translator-x64-vector.cpp. */ -const size_t kReservedRSPScratchSpace = 0x100; -const size_t kReservedRSPSpillSpace = 0x80; +const size_t kReservedRSPScratchSpace = 0x180; +const size_t kReservedRSPSpillSpace = 0x100; ////////////////////////////////////////////////////////////////////// diff --git a/hphp/runtime/vm/translator/hopt/linearscan.h b/hphp/runtime/vm/translator/hopt/linearscan.h index d86306332..014f320ca 100644 --- a/hphp/runtime/vm/translator/hopt/linearscan.h +++ b/hphp/runtime/vm/translator/hopt/linearscan.h @@ -29,7 +29,7 @@ class IRFactory; // This value must be consistent with the number of pre-allocated // bytes for spill locations in __enterTCHelper in translator-x64.cpp. // Be careful when changing this value. -const int NumPreAllocatedSpillLocs = 16; +const int NumPreAllocatedSpillLocs = 32; struct UseInfo { UseInfo() : lastUse(0), count(0) {} diff --git a/hphp/runtime/vm/translator/translator-asm-helpers.S b/hphp/runtime/vm/translator/translator-asm-helpers.S index 51bacfc85..4cb0b64df 100644 --- a/hphp/runtime/vm/translator/translator-asm-helpers.S +++ b/hphp/runtime/vm/translator/translator-asm-helpers.S @@ -45,7 +45,7 @@ enterTCHelper: * 16-byte aligned. */ - sub $0x100, %rsp // kReservedRSPScratchSpace + sub $0x180, %rsp // kReservedRSPScratchSpace /* * If returning from a BIND_CALL request, push the return IP saved @@ -63,7 +63,7 @@ enterTCHelper: call *%rdx .LenterTCHelper$serviceReqLabel: - add $0x100, %rsp // kReservedRSPScratchSpace + add $0x180, %rsp // kReservedRSPScratchSpace // Restore infoPtr into %rbx pop %rbx .cfi_adjust_cfa_offset -8 diff --git a/hphp/runtime/vm/translator/translator-x64.cpp b/hphp/runtime/vm/translator/translator-x64.cpp index 74d2a1ee5..79858cab6 100644 --- a/hphp/runtime/vm/translator/translator-x64.cpp +++ b/hphp/runtime/vm/translator/translator-x64.cpp @@ -2851,7 +2851,7 @@ static_assert(rVmSp == rbx && rVmTl == r12 && rStashedAR == r15, "__enterTCHelper needs to be modified to use the correct ABI"); -static_assert(kReservedRSPScratchSpace == 0x100, +static_assert(kReservedRSPScratchSpace == 0x180, "enterTCHelper needs to be updated for changes to " "kReservedRSPScratchSpace"); static_assert(REQ_BIND_CALL == 0x1,