Changeset 38009 in webkit for trunk/JavaScriptCore/VM/CTI.cpp


Ignore:
Timestamp:
Oct 30, 2008, 2:16:46 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-30 Cameron Zwarich <[email protected]>

Reviewed by Sam Weinig.

Bug 21985: Opcodes should use eax as their destination register whenever possible
<https://bugs.webkit.org/show_bug.cgi?id=21985>

Change more opcodes to use eax as the register for their final result,
and change calls to emitPutResult() that pass eax to rely on the default
value of eax.

  • VM/CTI.cpp: (JSC::CTI::privateCompileMainPass):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CTI.cpp

    r37991 r38009  
    10121012            unsigned src = instruction[i + 2].u.operand;
    10131013            if (isConstant(src))
    1014                 m_jit.movl_i32r(asInteger(getConstant(m_callFrame, src)), X86::edx);
     1014                m_jit.movl_i32r(asInteger(getConstant(m_callFrame, src)), X86::eax);
    10151015            else
    1016                 emitGetArg(src, X86::edx);
    1017             emitPutResult(instruction[i + 1].u.operand, X86::edx);
     1016                emitGetArg(src, X86::eax);
     1017            emitPutResult(instruction[i + 1].u.operand);
    10181018            i += 3;
    10191019            break;
     
    10721072            m_jit.addl_i8r(getDeTaggedConstantImmediate(JSImmediate::oneImmediate()), X86::eax);
    10731073            m_slowCases.append(SlowCaseEntry(m_jit.emitUnlinkedJo(), i));
    1074             emitPutResult(srcDst, X86::eax);
     1074            emitPutResult(srcDst);
    10751075            i += 2;
    10761076            break;
     
    13061306            m_jit.movl_i32r(asInteger(globalObject), X86::eax);
    13071307            emitGetVariableObjectRegister(X86::eax, instruction[i + 3].u.operand, X86::eax);
    1308             emitPutResult(instruction[i + 1].u.operand, X86::eax);
     1308            emitPutResult(instruction[i + 1].u.operand);
    13091309            i += 4;
    13101310            break;
     
    14081408
    14091409            m_jit.link(isImmediate, m_jit.label());
    1410             emitGetArg(instruction[i + 2].u.operand, X86::ecx);
    1411             emitPutResult(instruction[i + 1].u.operand, X86::ecx);
     1410            emitGetArg(instruction[i + 2].u.operand, X86::eax);
     1411            emitPutResult(instruction[i + 1].u.operand);
    14121412            m_jit.link(isObject, m_jit.label());
    14131413
     
    16041604            m_jit.subl_i8r(getDeTaggedConstantImmediate(JSImmediate::oneImmediate()), X86::eax);
    16051605            m_slowCases.append(SlowCaseEntry(m_jit.emitUnlinkedJo(), i));
    1606             emitPutResult(srcDst, X86::eax);
     1606            emitPutResult(srcDst);
    16071607            i += 2;
    16081608            break;
Note: See TracChangeset for help on using the changeset viewer.