Changeset 193795 in webkit for trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
- Timestamp:
- Dec 8, 2015, 4:30:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r193793 r193795 2785 2785 2786 2786 blessedBooleanResult(scratchReg, node); 2787 } 2788 2789 void SpeculativeJIT::compileBitwiseOp(Node* node) 2790 { 2791 NodeType op = node->op(); 2792 Edge& leftChild = node->child1(); 2793 Edge& rightChild = node->child2(); 2794 2795 if (leftChild->isInt32Constant()) { 2796 SpeculateInt32Operand op2(this, rightChild); 2797 GPRTemporary result(this, Reuse, op2); 2798 2799 bitOp(op, leftChild->asInt32(), op2.gpr(), result.gpr()); 2800 2801 int32Result(result.gpr(), node); 2802 2803 } else if (rightChild->isInt32Constant()) { 2804 SpeculateInt32Operand op1(this, leftChild); 2805 GPRTemporary result(this, Reuse, op1); 2806 2807 bitOp(op, rightChild->asInt32(), op1.gpr(), result.gpr()); 2808 2809 int32Result(result.gpr(), node); 2810 2811 } else { 2812 SpeculateInt32Operand op1(this, leftChild); 2813 SpeculateInt32Operand op2(this, rightChild); 2814 GPRTemporary result(this, Reuse, op1, op2); 2815 2816 GPRReg reg1 = op1.gpr(); 2817 GPRReg reg2 = op2.gpr(); 2818 bitOp(op, reg1, reg2, result.gpr()); 2819 2820 int32Result(result.gpr(), node); 2821 } 2822 } 2823 2824 void SpeculativeJIT::compileShiftOp(Node* node) 2825 { 2826 NodeType op = node->op(); 2827 Edge& leftChild = node->child1(); 2828 Edge& rightChild = node->child2(); 2829 2830 if (rightChild->isInt32Constant()) { 2831 SpeculateInt32Operand op1(this, leftChild); 2832 GPRTemporary result(this, Reuse, op1); 2833 2834 shiftOp(op, op1.gpr(), rightChild->asInt32() & 0x1f, result.gpr()); 2835 2836 int32Result(result.gpr(), node); 2837 } else { 2838 // Do not allow shift amount to be used as the result, MacroAssembler does not permit this. 2839 SpeculateInt32Operand op1(this, leftChild); 2840 SpeculateInt32Operand op2(this, rightChild); 2841 GPRTemporary result(this, Reuse, op1); 2842 2843 GPRReg reg1 = op1.gpr(); 2844 GPRReg reg2 = op2.gpr(); 2845 shiftOp(op, reg1, reg2, result.gpr()); 2846 2847 int32Result(result.gpr(), node); 2848 } 2787 2849 } 2788 2850
Note:
See TracChangeset
for help on using the changeset viewer.