+2009-12-07 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ op_loop_if_less JIT codegen is broken for 64-bit
+ https://bugs.webkit.org/show_bug.cgi?id=32221
+
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_loop_if_false): Fix codegen in this version - test was backwards.
+
2009-12-07 Oliver Hunt <oliver@apple.com>
Reviewed by Maciej Stachowiak.
{
emitTimeoutCheck();
+
unsigned target = currentInstruction[2].u.operand;
emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
- Jump isZero = branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0))));
- addJump(emitJumpIfImmediateInteger(regT0), target);
+ addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))), target);
+ Jump isNonZero = emitJumpIfImmediateInteger(regT0);
- addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))), target);
- addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))));
+ addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))), target);
+ addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))));
- isZero.link(this);
+ isNonZero.link(this);
+ RECORD_JUMP_TARGET(target);
};
void JIT::emit_op_resolve_base(Instruction* currentInstruction)