| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/ppc/lithium-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-ppc.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/lithium-inl.h" | 10 #include "src/crankshaft/lithium-inl.h" |
| (...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 DefineAsRegister(new (zone()) LMathAbs(context, input)); | 1139 DefineAsRegister(new (zone()) LMathAbs(context, input)); |
| 1140 if (!r.IsDouble() && !r.IsSmiOrInteger32()) result = AssignPointerMap(result); | 1140 if (!r.IsDouble() && !r.IsSmiOrInteger32()) result = AssignPointerMap(result); |
| 1141 if (!r.IsDouble()) result = AssignEnvironment(result); | 1141 if (!r.IsDouble()) result = AssignEnvironment(result); |
| 1142 return result; | 1142 return result; |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 | 1145 |
| 1146 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { | 1146 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { |
| 1147 DCHECK(instr->representation().IsDouble()); | 1147 DCHECK(instr->representation().IsDouble()); |
| 1148 DCHECK(instr->value()->representation().IsDouble()); | 1148 DCHECK(instr->value()->representation().IsDouble()); |
| 1149 LOperand* input = UseFixedDouble(instr->value(), d1); | 1149 LOperand* input = UseFixedDouble(instr->value(), d0); |
| 1150 return MarkAsCall(DefineFixedDouble(new (zone()) LMathLog(input), d1), instr); | 1150 return MarkAsCall(DefineFixedDouble(new (zone()) LMathLog(input), d0), instr); |
| 1151 } | 1151 } |
| 1152 | 1152 |
| 1153 | 1153 |
| 1154 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { | 1154 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { |
| 1155 LOperand* input = UseRegisterAtStart(instr->value()); | 1155 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1156 LMathClz32* result = new (zone()) LMathClz32(input); | 1156 LMathClz32* result = new (zone()) LMathClz32(input); |
| 1157 return DefineAsRegister(result); | 1157 return DefineAsRegister(result); |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 | 1160 |
| 1161 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { | 1161 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { |
| 1162 DCHECK(instr->representation().IsDouble()); | 1162 DCHECK(instr->representation().IsDouble()); |
| 1163 DCHECK(instr->value()->representation().IsDouble()); | 1163 DCHECK(instr->value()->representation().IsDouble()); |
| 1164 LOperand* input = UseRegister(instr->value()); | 1164 LOperand* input = UseFixedDouble(instr->value(), d0); |
| 1165 LOperand* temp1 = TempRegister(); | 1165 return MarkAsCall(DefineFixedDouble(new (zone()) LMathExp(input), d0), instr); |
| 1166 LOperand* temp2 = TempRegister(); | |
| 1167 LOperand* double_temp = TempDoubleRegister(); | |
| 1168 LMathExp* result = new (zone()) LMathExp(input, double_temp, temp1, temp2); | |
| 1169 return DefineAsRegister(result); | |
| 1170 } | 1166 } |
| 1171 | 1167 |
| 1172 | 1168 |
| 1173 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { | 1169 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { |
| 1174 LOperand* input = UseRegisterAtStart(instr->value()); | 1170 LOperand* input = UseRegisterAtStart(instr->value()); |
| 1175 LMathSqrt* result = new (zone()) LMathSqrt(input); | 1171 LMathSqrt* result = new (zone()) LMathSqrt(input); |
| 1176 return DefineAsRegister(result); | 1172 return DefineAsRegister(result); |
| 1177 } | 1173 } |
| 1178 | 1174 |
| 1179 | 1175 |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2468 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2464 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2469 LOperand* object = UseRegister(instr->object()); | 2465 LOperand* object = UseRegister(instr->object()); |
| 2470 LOperand* index = UseTempRegister(instr->index()); | 2466 LOperand* index = UseTempRegister(instr->index()); |
| 2471 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2467 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
| 2472 LInstruction* result = DefineSameAsFirst(load); | 2468 LInstruction* result = DefineSameAsFirst(load); |
| 2473 return AssignPointerMap(result); | 2469 return AssignPointerMap(result); |
| 2474 } | 2470 } |
| 2475 | 2471 |
| 2476 } // namespace internal | 2472 } // namespace internal |
| 2477 } // namespace v8 | 2473 } // namespace v8 |
| OLD | NEW |