Ignore:
Timestamp:
May 7, 2009, 1:42:59 PM (16 years ago)
Author:
[email protected]
Message:

2009-05-07 Maciej Stachowiak <[email protected]>

Reviewed by Sam Weinig.


  • optimize various cases of branch-fused less


1% speedup on SunSpider overall
13% speedup on math-cordic

  • jit/JIT.cpp: (JSC::JIT::privateCompileMainPass): op_loop_if_less: Optimize case of constant as first operand, just as case of constant as second operand. op_jnless: Factored out into compileFastArith_op_jnless. (JSC::JIT::privateCompileSlowCases): op_jnless: Factored out into compileFastArithSlow_op_jnless.
  • jit/JIT.h:
  • jit/JITArithmetic.cpp: (JSC::JIT::compileFastArith_op_jnless): Factored out from main compile loop.
  • Generate inline code for comparison of constant immediate int as first operand to another immediate int, as for loop_if_less

(JSC::JIT::compileFastArithSlow_op_jnless):

  • Generate inline code for comparing two floating point numbers.
  • Generate code for both cases of comparing a floating point number to a constant immediate int.
  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): Fix dumping of op_jnless (tangentially related bugfix).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecode/CodeBlock.cpp

    r43331 r43363  
    898898        case op_jnless: {
    899899            int r0 = (++it)->u.operand;
    900             JSValue function = JSValue((++it)->u.jsCell);
     900            int r1 = (++it)->u.operand;
    901901            int offset = (++it)->u.operand;
    902             printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), valueToSourceString(exec, function).ascii(), offset, locationForOffset(begin, it, offset));
     902            printf("[%4d] jnless\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, locationForOffset(begin, it, offset));
    903903            break;
    904904        }
Note: See TracChangeset for help on using the changeset viewer.