Ignore:
Timestamp:
Oct 1, 2017, 10:23:29 AM (8 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r222564.
https://bugs.webkit.org/show_bug.cgi?id=177720

"It regressed JetStream by 2% on iOS caused by a 50%
regression on the bigfib subtest" (Requested by saamyjoon on
#webkit).

Reverted changeset:

"Add Above/Below comparisons for UInt32 patterns"
https://bugs.webkit.org/show_bug.cgi?id=177281
http://trac.webkit.org/changeset/222564

File:
1 edited

Legend:

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

    r222564 r222689  
    196196
    197197    emit_compareAndJumpSlow(op1, op2, target, DoubleLessThanOrUnordered, operationCompareGreaterEq, true, iter);
    198 }
    199 
    200 void JIT::emit_op_below(Instruction* currentInstruction)
    201 {
    202     int dst = currentInstruction[1].u.operand;
    203     int op1 = currentInstruction[2].u.operand;
    204     int op2 = currentInstruction[3].u.operand;
    205     emit_compareUnsigned(dst, op1, op2, Below);
    206 }
    207 
    208 void JIT::emit_op_beloweq(Instruction* currentInstruction)
    209 {
    210     int dst = currentInstruction[1].u.operand;
    211     int op1 = currentInstruction[2].u.operand;
    212     int op2 = currentInstruction[3].u.operand;
    213     emit_compareUnsigned(dst, op1, op2, BelowOrEqual);
    214 }
    215 
    216 void JIT::emit_op_jbelow(Instruction* currentInstruction)
    217 {
    218     int op1 = currentInstruction[1].u.operand;
    219     int op2 = currentInstruction[2].u.operand;
    220     unsigned target = currentInstruction[3].u.operand;
    221 
    222     emit_compareUnsignedAndJump(op1, op2, target, Below);
    223 }
    224 
    225 void JIT::emit_op_jbeloweq(Instruction* currentInstruction)
    226 {
    227     int op1 = currentInstruction[1].u.operand;
    228     int op2 = currentInstruction[2].u.operand;
    229     unsigned target = currentInstruction[3].u.operand;
    230 
    231     emit_compareUnsignedAndJump(op1, op2, target, BelowOrEqual);
    232198}
    233199
     
    299265}
    300266
    301 void JIT::emit_compareUnsignedAndJump(int op1, int op2, unsigned target, RelationalCondition condition)
    302 {
    303     if (isOperandConstantInt(op2)) {
    304         emitGetVirtualRegister(op1, regT0);
    305         int32_t op2imm = getOperandConstantInt(op2);
    306         addJump(branch32(condition, regT0, Imm32(op2imm)), target);
    307     } else if (isOperandConstantInt(op1)) {
    308         emitGetVirtualRegister(op2, regT1);
    309         int32_t op1imm = getOperandConstantInt(op1);
    310         addJump(branch32(commute(condition), regT1, Imm32(op1imm)), target);
    311     } else {
    312         emitGetVirtualRegisters(op1, regT0, op2, regT1);
    313         addJump(branch32(condition, regT0, regT1), target);
    314     }
    315 }
    316 
    317 void JIT::emit_compareUnsigned(int dst, int op1, int op2, RelationalCondition condition)
    318 {
    319     if (isOperandConstantInt(op2)) {
    320         emitGetVirtualRegister(op1, regT0);
    321         int32_t op2imm = getOperandConstantInt(op2);
    322         compare32(condition, regT0, Imm32(op2imm), regT0);
    323     } else if (isOperandConstantInt(op1)) {
    324         emitGetVirtualRegister(op2, regT0);
    325         int32_t op1imm = getOperandConstantInt(op1);
    326         compare32(commute(condition), regT0, Imm32(op1imm), regT0);
    327     } else {
    328         emitGetVirtualRegisters(op1, regT0, op2, regT1);
    329         compare32(condition, regT0, regT1, regT0);
    330     }
    331     emitTagBool(regT0);
    332     emitPutVirtualRegister(dst);
    333 }
    334 
    335267void JIT::emit_compareAndJumpSlow(int op1, int op2, unsigned target, DoubleCondition condition, size_t (JIT_OPERATION *operation)(ExecState*, EncodedJSValue, EncodedJSValue), bool invert, Vector<SlowCaseEntry>::iterator& iter)
    336268{
Note: See TracChangeset for help on using the changeset viewer.