Changeset 41508 in webkit for trunk/JavaScriptCore/jit/JIT.cpp


Ignore:
Timestamp:
Mar 6, 2009, 8:58:36 PM (16 years ago)
Author:
[email protected]
Message:

2009-03-06 Gavin Barraclough <[email protected]>

Reviewed by Oliver Hunt.

When preforming an op_mov, preserve any existing register mapping.

~0.5% progression on v8 tests x86-64.

  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JIT.cpp

    r41474 r41508  
    312312                if (dst == m_lastResultBytecodeRegister)
    313313                    killLastResultRegister();
    314             } else {
     314            } else if ((src == m_lastResultBytecodeRegister) || (dst == m_lastResultBytecodeRegister)) {
     315                // If either the src or dst is the cached register go though
     316                // get/put registers to make sure we track this correctly.
    315317                emitGetVirtualRegister(src, regT0);
    316318                emitPutVirtualRegister(dst);
     319            } else {
     320                // Perform the copy via regT1; do not disturb any mapping in regT0.
     321                loadPtr(Address(callFrameRegister, src * sizeof(Register)), regT1);
     322                storePtr(regT1, Address(callFrameRegister, dst * sizeof(Register)));
    317323            }
    318324            NEXT_OPCODE(op_mov);
Note: See TracChangeset for help on using the changeset viewer.