Ignore:
Timestamp:
Dec 6, 2009, 2:30:32 AM (15 years ago)
Author:
[email protected]
Message:

Not reviewed, build fix.

Actually tested 64-bit *and* 32-bit build this time.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_loop_if_false):

File:
1 edited

Legend:

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

    r51738 r51739  
    746746void JIT::emit_op_loop_if_false(Instruction* currentInstruction)
    747747{
     748    unsigned cond = currentInstruction[1].u.operand;
     749    unsigned target = currentInstruction[2].u.operand;
     750
    748751    emitTimeoutCheck();
    749752
    750     unsigned target = currentInstruction[2].u.operand;
    751     emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
    752 
    753     addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsNumber(m_globalData, 0)))), target);
    754     Jump isNonZero = emitJumpIfImmediateInteger(regT0);
    755 
    756     addJump(branchPtr(Equal, regT0, ImmPtr(JSValue::encode(jsBoolean(false)))), target);
    757     addSlowCase(branchPtr(NotEqual, regT0, ImmPtr(JSValue::encode(jsBoolean(true)))));
    758 
    759     isNonZero.link(this);
    760     RECORD_JUMP_TARGET(target);
     753    emitLoad(cond, regT1, regT0);
     754
     755    Jump isTrue = branch32(Equal, regT1, Imm32(JSValue::TrueTag));
     756    addJump(branch32(Equal, regT1, Imm32(JSValue::FalseTag)), target);
     757
     758    Jump isNotInteger = branch32(NotEqual, regT1, Imm32(JSValue::Int32Tag));
     759    Jump isTrue2 = branch32(NotEqual, regT0, Imm32(0));
     760    addJump(jump(), target);
     761
     762    if (supportsFloatingPoint()) {
     763        isNotInteger.link(this);
     764
     765        addSlowCase(branch32(Above, regT1, Imm32(JSValue::LowestTag)));
     766
     767        zeroDouble(fpRegT0);
     768        emitLoadDouble(cond, fpRegT1);
     769        addJump(branchDouble(DoubleEqualOrUnordered, fpRegT0, fpRegT1), target);
     770    } else
     771        addSlowCase(isNotInteger);
     772
     773    isTrue.link(this);
     774    isTrue2.link(this);
    761775}
    762776
Note: See TracChangeset for help on using the changeset viewer.