Ignore:
Timestamp:
Oct 3, 2011, 6:16:46 PM (14 years ago)
Author:
[email protected]
Message:

On X86, switch bucketCount into a register, timeoutCheck into memory
https://bugs.webkit.org/show_bug.cgi?id=69299

Reviewed by Geoff Garen.

We don't have sufficient registers to keep both in registers, and DFG JIT will trample esi;
it doesn't matter if the bucketCount gets stomped on (in fact it may add to randomness!),
but it if the timeoutCheck gets trashed we may make calls out to the timout_check stub
function too frequently (regressing performance). This patch has no perf impact on sunspider.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssemblerX86.h:

(JSC::MacroAssemblerX86::branchAdd32):
(JSC::MacroAssemblerX86::branchSub32):

  • Added branchSub32 with AbsoluteAddress.
  • jit/JIT.cpp:

(JSC::JIT::emitTimeoutCheck):

  • Keep timeout count in memory on X86.
  • jit/JITInlineMethods.h:

(JSC::JIT::emitValueProfilingSite):

  • remove X86 specific code, switch bucket count back into a register.
  • jit/JITStubs.cpp:
    • Stop initializing esi (it is no longer the timeoutCheck!)
  • jit/JSInterfaceJIT.h:
    • change definition of esi to be the bucketCountRegister.
  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::JSGlobalData):

  • runtime/JSGlobalData.h:
    • Add timeoutCount as a property to global data (the counter should be per-thread).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITStubs.cpp

    r96527 r96563  
    132132    "pushl %ebx" "\n"
    133133    "subl $0x3c, %esp" "\n"
    134     "movl $512, %esi" "\n"
    135134    "movl 0x58(%esp), %edi" "\n"
    136135    "call *0x50(%esp)" "\n"
     
    262261            push ebx;
    263262            sub esp, 0x3c;
    264             mov esi, 512;
    265263            mov ecx, esp;
    266264            mov edi, [esp + 0x58];
Note: See TracChangeset for help on using the changeset viewer.