OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 ASSERT(instr->left()->representation().IsTagged()); | 837 ASSERT(instr->left()->representation().IsTagged()); |
838 ASSERT(instr->right()->representation().IsTagged()); | 838 ASSERT(instr->right()->representation().IsTagged()); |
839 | 839 |
840 LOperand* left = UseFixed(instr->left(), rdx); | 840 LOperand* left = UseFixed(instr->left(), rdx); |
841 LOperand* right = UseFixed(instr->right(), rax); | 841 LOperand* right = UseFixed(instr->right(), rax); |
842 LArithmeticT* result = new LArithmeticT(op, left, right); | 842 LArithmeticT* result = new LArithmeticT(op, left, right); |
843 return MarkAsCall(DefineFixed(result, rax), instr); | 843 return MarkAsCall(DefineFixed(result, rax), instr); |
844 } | 844 } |
845 | 845 |
846 ASSERT(instr->representation().IsInteger32()); | 846 ASSERT(instr->representation().IsInteger32()); |
847 ASSERT(instr->OperandAt(0)->representation().IsInteger32()); | 847 ASSERT(instr->left()->representation().IsInteger32()); |
848 ASSERT(instr->OperandAt(1)->representation().IsInteger32()); | 848 ASSERT(instr->right()->representation().IsInteger32()); |
849 LOperand* left = UseRegisterAtStart(instr->OperandAt(0)); | 849 LOperand* left = UseRegisterAtStart(instr->left()); |
850 | 850 |
851 HValue* right_value = instr->OperandAt(1); | 851 HValue* right_value = instr->right(); |
852 LOperand* right = NULL; | 852 LOperand* right = NULL; |
853 int constant_value = 0; | 853 int constant_value = 0; |
854 if (right_value->IsConstant()) { | 854 if (right_value->IsConstant()) { |
855 HConstant* constant = HConstant::cast(right_value); | 855 HConstant* constant = HConstant::cast(right_value); |
856 right = chunk_->DefineConstantOperand(constant); | 856 right = chunk_->DefineConstantOperand(constant); |
857 constant_value = constant->Integer32Value() & 0x1f; | 857 constant_value = constant->Integer32Value() & 0x1f; |
858 } else { | 858 } else { |
859 right = UseFixed(right_value, rcx); | 859 right = UseFixed(right_value, rcx); |
860 } | 860 } |
861 | 861 |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 LOperand* left = UseFixed(instr->left(), rax); | 1140 LOperand* left = UseFixed(instr->left(), rax); |
1141 LOperand* right = UseFixed(instr->right(), rdx); | 1141 LOperand* right = UseFixed(instr->right(), rdx); |
1142 LInstanceOf* result = new LInstanceOf(left, right); | 1142 LInstanceOf* result = new LInstanceOf(left, right); |
1143 return MarkAsCall(DefineFixed(result, rax), instr); | 1143 return MarkAsCall(DefineFixed(result, rax), instr); |
1144 } | 1144 } |
1145 | 1145 |
1146 | 1146 |
1147 LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( | 1147 LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( |
1148 HInstanceOfKnownGlobal* instr) { | 1148 HInstanceOfKnownGlobal* instr) { |
1149 LInstanceOfKnownGlobal* result = | 1149 LInstanceOfKnownGlobal* result = |
1150 new LInstanceOfKnownGlobal(UseFixed(instr->value(), rax), | 1150 new LInstanceOfKnownGlobal(UseFixed(instr->left(), rax), |
1151 FixedTemp(rdi)); | 1151 FixedTemp(rdi)); |
1152 return MarkAsCall(DefineFixed(result, rax), instr); | 1152 return MarkAsCall(DefineFixed(result, rax), instr); |
1153 } | 1153 } |
1154 | 1154 |
1155 | 1155 |
1156 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { | 1156 LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) { |
1157 LOperand* function = UseFixed(instr->function(), rdi); | 1157 LOperand* function = UseFixed(instr->function(), rdi); |
1158 LOperand* receiver = UseFixed(instr->receiver(), rax); | 1158 LOperand* receiver = UseFixed(instr->receiver(), rax); |
1159 LOperand* length = UseFixed(instr->length(), rbx); | 1159 LOperand* length = UseFixed(instr->length(), rbx); |
1160 LOperand* elements = UseFixed(instr->elements(), rcx); | 1160 LOperand* elements = UseFixed(instr->elements(), rcx); |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 LOperand* key = UseOrConstantAtStart(instr->key()); | 2227 LOperand* key = UseOrConstantAtStart(instr->key()); |
2228 LOperand* object = UseOrConstantAtStart(instr->object()); | 2228 LOperand* object = UseOrConstantAtStart(instr->object()); |
2229 LIn* result = new LIn(key, object); | 2229 LIn* result = new LIn(key, object); |
2230 return MarkAsCall(DefineFixed(result, rax), instr); | 2230 return MarkAsCall(DefineFixed(result, rax), instr); |
2231 } | 2231 } |
2232 | 2232 |
2233 | 2233 |
2234 } } // namespace v8::internal | 2234 } } // namespace v8::internal |
2235 | 2235 |
2236 #endif // V8_TARGET_ARCH_X64 | 2236 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |