Changeset 148899 in webkit for trunk/Source/JavaScriptCore/jit


Ignore:
Timestamp:
Apr 22, 2013, 11:40:58 AM (12 years ago)
Author:
[email protected]
Message:

Fix broken 32-bit build to green the bots.
https://bugs.webkit.org/show_bug.cgi?id=114968.

Unreviewed.

Basically, I moved a JIT::emit_op_loop_hint() and JIT::emitSlow_op_loop_hint()
into common code where they belong, instead of the 64-bit specific section.

Also fixed some SH4 assertions failures which were also caused by
https://bugs.webkit.org/show_bug.cgi?id=114963. Thanks to Julien Brianceau
for pointing this out.

  • assembler/MacroAssemblerSH4.h:

(JSC::MacroAssemblerSH4::branchAdd32):

  • jit/JITOpcodes.cpp:

(JSC):
(JSC::JIT::emit_op_loop_hint):
(JSC::JIT::emitSlow_op_loop_hint):

File:
1 edited

Legend:

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

    r148893 r148899  
    482482}
    483483
    484 void JIT::emit_op_loop_hint(Instruction*)
    485 {
    486     // Emit the watchdog timer check:
    487     if (m_vm->watchdog.isEnabled())
    488         addSlowCase(branchTest8(NonZero, AbsoluteAddress(m_vm->watchdog.timerDidFireAddress())));
    489 
    490     // Emit the JIT optimization check:
    491     if (canBeOptimized())
    492         addSlowCase(branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()),
    493             AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())));
    494 }
    495 
    496 void JIT::emitSlow_op_loop_hint(Instruction*, Vector<SlowCaseEntry>::iterator& iter)
    497 {
    498     // Emit the slow path of the watchdog timer check:
    499     if (m_vm->watchdog.isEnabled()) {
    500         linkSlowCase(iter);
    501 
    502         JITStubCall stubCall(this, cti_handle_watchdog_timer);
    503         stubCall.call();
    504 
    505 #if ENABLE(DFG_JIT)
    506         if (canBeOptimized()) {
    507             Jump doOptimize = branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()),
    508                 AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter()));
    509             emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));
    510             doOptimize.link(this);
    511         } else
    512 #endif
    513             emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));
    514     }
    515 
    516 #if ENABLE(DFG_JIT)
    517     // Emit the slow path for the JIT optimization check:
    518     if (canBeOptimized()) {
    519         linkSlowCase(iter);
    520 
    521         JITStubCall stubCall(this, cti_optimize);
    522         stubCall.addArgument(TrustedImm32(m_bytecodeOffset));
    523         stubCall.call();
    524 
    525         emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));
    526     }
    527 #endif
    528 }
    529 
    530484void JIT::emit_op_neq(Instruction* currentInstruction)
    531485{
     
    13231277
    13241278#endif // USE(JSVALUE64)
     1279
     1280void JIT::emit_op_loop_hint(Instruction*)
     1281{
     1282    // Emit the watchdog timer check:
     1283    if (m_vm->watchdog.isEnabled())
     1284        addSlowCase(branchTest8(NonZero, AbsoluteAddress(m_vm->watchdog.timerDidFireAddress())));
     1285
     1286    // Emit the JIT optimization check:
     1287    if (canBeOptimized())
     1288        addSlowCase(branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()),
     1289            AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())));
     1290}
     1291
     1292void JIT::emitSlow_op_loop_hint(Instruction*, Vector<SlowCaseEntry>::iterator& iter)
     1293{
     1294    // Emit the slow path of the watchdog timer check:
     1295    if (m_vm->watchdog.isEnabled()) {
     1296        linkSlowCase(iter);
     1297
     1298        JITStubCall stubCall(this, cti_handle_watchdog_timer);
     1299        stubCall.call();
     1300
     1301#if ENABLE(DFG_JIT)
     1302        if (canBeOptimized()) {
     1303            Jump doOptimize = branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()),
     1304                AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter()));
     1305            emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));
     1306            doOptimize.link(this);
     1307        } else
     1308#endif
     1309            emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));
     1310    }
     1311
     1312#if ENABLE(DFG_JIT)
     1313    // Emit the slow path for the JIT optimization check:
     1314    if (canBeOptimized()) {
     1315        linkSlowCase(iter);
     1316
     1317        JITStubCall stubCall(this, cti_optimize);
     1318        stubCall.addArgument(TrustedImm32(m_bytecodeOffset));
     1319        stubCall.call();
     1320
     1321        emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));
     1322    }
     1323#endif
     1324}
    13251325
    13261326void JIT::emit_resolve_operations(ResolveOperations* resolveOperations, const int* baseVR, const int* valueVR)
Note: See TracChangeset for help on using the changeset viewer.