Ignore:
Timestamp:
Mar 25, 2013, 5:36:18 PM (12 years ago)
Author:
[email protected]
Message:

Offlineasm cloop backend compiles op+branch incorrectly.
https://bugs.webkit.org/show_bug.cgi?id=113146.

Reviewed by Geoffrey Garen.

  • dfg/DFGRepatch.h:

(JSC::DFG::dfgResetGetByID):
(JSC::DFG::dfgResetPutByID):

  • These functions never return when the DFG is dsiabled, not just when asserts are enabled. Changing the attribute from NO_RETURN_DUE_TO_ASSERT to NO_RETURN.
  • llint/LLIntOfflineAsmConfig.h:
  • Added some #defines needed to get the cloop building again.
  • offlineasm/cloop.rb:
  • Fix cloopEmitOpAndBranchIfOverflow() and cloopEmitOpAndBranch() to emit code that unconditionally executes the specified operation before doing the conditional branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/cloop.rb

    r145551 r146831  
    466466    $asm.putc "{"
    467467    $asm.putc "    #{tempType} temp = #{op2} #{operator} #{op1};"
     468    $asm.putc "    #{op2} = temp;"
    468469    $asm.putc "    if (temp #{conditionTest})"
    469470    $asm.putc "        goto  #{operands[2].cLabel};"
    470     $asm.putc "    #{op2} = temp;"
    471471    $asm.putc "}"
    472472end
     
    534534    end
    535535
    536     $asm.putc "    if #{overflowTest} {"
     536    $asm.putc "    bool didOverflow = #{overflowTest};"
     537    $asm.putc "    #{operands[1].clValue(type)} = #{operands[1].clValue(type)} #{operator} #{operands[0].clValue(type)};"
     538    $asm.putc "    if (didOverflow)"
    537539    $asm.putc "        goto #{operands[2].cLabel};"
    538     $asm.putc "    }"
    539     $asm.putc "    #{operands[1].clValue(type)} = #{operands[1].clValue(type)} #{operator} #{operands[0].clValue(type)};"
    540540    $asm.putc "}"
    541541end
Note: See TracChangeset for help on using the changeset viewer.