Changeset 149247 in webkit for trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp
- Timestamp:
- Apr 27, 2013, 4:14:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp
r144137 r149247 630 630 } 631 631 632 void JIT::emit_op_post_inc(Instruction* currentInstruction) 633 { 634 unsigned result = currentInstruction[1].u.operand; 635 unsigned srcDst = currentInstruction[2].u.operand; 636 637 emitGetVirtualRegister(srcDst, regT0); 638 move(regT0, regT1); 639 emitJumpSlowCaseIfNotImmediateInteger(regT0); 640 addSlowCase(branchAdd32(Overflow, TrustedImm32(1), regT1)); 641 emitFastArithIntToImmNoCheck(regT1, regT1); 642 emitPutVirtualRegister(srcDst, regT1); 643 emitPutVirtualRegister(result); 644 if (canBeOptimizedOrInlined()) 645 killLastResultRegister(); 646 } 647 648 void JIT::emitSlow_op_post_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 649 { 650 unsigned result = currentInstruction[1].u.operand; 651 unsigned srcDst = currentInstruction[2].u.operand; 652 653 linkSlowCase(iter); 654 linkSlowCase(iter); 655 JITStubCall stubCall(this, cti_op_post_inc); 656 stubCall.addArgument(regT0); 657 stubCall.addArgument(Imm32(srcDst)); 658 stubCall.call(result); 659 } 660 661 void JIT::emit_op_post_dec(Instruction* currentInstruction) 662 { 663 unsigned result = currentInstruction[1].u.operand; 664 unsigned srcDst = currentInstruction[2].u.operand; 665 666 emitGetVirtualRegister(srcDst, regT0); 667 move(regT0, regT1); 668 emitJumpSlowCaseIfNotImmediateInteger(regT0); 669 addSlowCase(branchSub32(Overflow, TrustedImm32(1), regT1)); 670 emitFastArithIntToImmNoCheck(regT1, regT1); 671 emitPutVirtualRegister(srcDst, regT1); 672 emitPutVirtualRegister(result); 673 if (canBeOptimizedOrInlined()) 674 killLastResultRegister(); 675 } 676 677 void JIT::emitSlow_op_post_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 678 { 679 unsigned result = currentInstruction[1].u.operand; 680 unsigned srcDst = currentInstruction[2].u.operand; 681 682 linkSlowCase(iter); 683 linkSlowCase(iter); 684 JITStubCall stubCall(this, cti_op_post_dec); 685 stubCall.addArgument(regT0); 686 stubCall.addArgument(Imm32(srcDst)); 687 stubCall.call(result); 688 } 689 690 void JIT::emit_op_pre_inc(Instruction* currentInstruction) 632 void JIT::emit_op_inc(Instruction* currentInstruction) 691 633 { 692 634 unsigned srcDst = currentInstruction[1].u.operand; … … 699 641 } 700 642 701 void JIT::emitSlow_op_ pre_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)643 void JIT::emitSlow_op_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 702 644 { 703 645 unsigned srcDst = currentInstruction[1].u.operand; … … 707 649 emitGetVirtualRegister(srcDst, regT0); 708 650 notImm.link(this); 709 JITStubCall stubCall(this, cti_op_ pre_inc);651 JITStubCall stubCall(this, cti_op_inc); 710 652 stubCall.addArgument(regT0); 711 653 stubCall.call(srcDst); 712 654 } 713 655 714 void JIT::emit_op_ pre_dec(Instruction* currentInstruction)656 void JIT::emit_op_dec(Instruction* currentInstruction) 715 657 { 716 658 unsigned srcDst = currentInstruction[1].u.operand; … … 723 665 } 724 666 725 void JIT::emitSlow_op_ pre_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)667 void JIT::emitSlow_op_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter) 726 668 { 727 669 unsigned srcDst = currentInstruction[1].u.operand; … … 731 673 emitGetVirtualRegister(srcDst, regT0); 732 674 notImm.link(this); 733 JITStubCall stubCall(this, cti_op_ pre_dec);675 JITStubCall stubCall(this, cti_op_dec); 734 676 stubCall.addArgument(regT0); 735 677 stubCall.call(srcDst);
Note:
See TracChangeset
for help on using the changeset viewer.