[webkit-reviews] review granted: [Bug 21985] Opcodes should use eax as their destination register whenever possible : [Attachment 24778] Proposed patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Oct 30 13:56:40 PDT 2008
Maciej Stachowiak <mjs at apple.com> has granted Cameron Zwarich (cpst)
<cwzwarich at uwaterloo.ca>'s request for review:
Bug 21985: Opcodes should use eax as their destination register whenever
possible
https://bugs.webkit.org/show_bug.cgi?id=21985
Attachment 24778: Proposed patch
https://bugs.webkit.org/attachment.cgi?id=24778&action=edit
------- Additional Comments from Maciej Stachowiak <mjs at apple.com>
r=me
> Index: ChangeLog
> ===================================================================
> --- ChangeLog (revision 38005)
> +++ ChangeLog (working copy)
> @@ -1,3 +1,17 @@
> +2008-10-30 Cameron Zwarich <zwarich at apple.com>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + 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):
> +
> 2008-10-30 Alp Toker <alp at nuanti.com>
>
> Build fix attempt for older gcc on the trunk-mac-intel build bot
> Index: VM/CTI.cpp
> ===================================================================
> --- VM/CTI.cpp (revision 38001)
> +++ VM/CTI.cpp (working copy)
> @@ -1011,10 +1011,10 @@ void CTI::privateCompileMainPass()
> case op_mov: {
> unsigned src = instruction[i + 2].u.operand;
> if (isConstant(src))
> - m_jit.movl_i32r(asInteger(getConstant(m_callFrame, src)),
X86::edx);
> + m_jit.movl_i32r(asInteger(getConstant(m_callFrame, src)),
X86::eax);
> else
> - emitGetArg(src, X86::edx);
> - emitPutResult(instruction[i + 1].u.operand, X86::edx);
> + emitGetArg(src, X86::eax);
> + emitPutResult(instruction[i + 1].u.operand);
> i += 3;
> break;
> }
> @@ -1071,7 +1071,7 @@ void CTI::privateCompileMainPass()
> emitJumpSlowCaseIfNotImmNum(X86::eax, i);
>
m_jit.addl_i8r(getDeTaggedConstantImmediate(JSImmediate::oneImmediate()),
X86::eax);
> m_slowCases.append(SlowCaseEntry(m_jit.emitUnlinkedJo(), i));
> - emitPutResult(srcDst, X86::eax);
> + emitPutResult(srcDst);
> i += 2;
> break;
> }
> @@ -1305,7 +1305,7 @@ void CTI::privateCompileMainPass()
> JSVariableObject* globalObject =
static_cast<JSVariableObject*>(instruction[i + 2].u.jsCell);
> m_jit.movl_i32r(asInteger(globalObject), X86::eax);
> emitGetVariableObjectRegister(X86::eax, instruction[i +
3].u.operand, X86::eax);
> - emitPutResult(instruction[i + 1].u.operand, X86::eax);
> + emitPutResult(instruction[i + 1].u.operand);
> i += 4;
> break;
> }
> @@ -1407,8 +1407,8 @@ void CTI::privateCompileMainPass()
> X86Assembler::JmpSrc isObject = m_jit.emitUnlinkedJe();
>
> m_jit.link(isImmediate, m_jit.label());
> - emitGetArg(instruction[i + 2].u.operand, X86::ecx);
> - emitPutResult(instruction[i + 1].u.operand, X86::ecx);
> + emitGetArg(instruction[i + 2].u.operand, X86::eax);
> + emitPutResult(instruction[i + 1].u.operand, X86::eax);
> m_jit.link(isObject, m_jit.label());
>
> i += 3;
> @@ -1603,7 +1603,7 @@ void CTI::privateCompileMainPass()
> emitJumpSlowCaseIfNotImmNum(X86::eax, i);
>
m_jit.subl_i8r(getDeTaggedConstantImmediate(JSImmediate::oneImmediate()),
X86::eax);
> m_slowCases.append(SlowCaseEntry(m_jit.emitUnlinkedJo(), i));
> - emitPutResult(srcDst, X86::eax);
> + emitPutResult(srcDst);
> i += 2;
> break;
> }
More information about the webkit-reviews
mailing list