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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 case kMathFloor: | 1073 case kMathFloor: |
1074 return DoMathFloor(instr); | 1074 return DoMathFloor(instr); |
1075 case kMathRound: | 1075 case kMathRound: |
1076 return DoMathRound(instr); | 1076 return DoMathRound(instr); |
1077 case kMathFround: | 1077 case kMathFround: |
1078 return DoMathFround(instr); | 1078 return DoMathFround(instr); |
1079 case kMathAbs: | 1079 case kMathAbs: |
1080 return DoMathAbs(instr); | 1080 return DoMathAbs(instr); |
1081 case kMathLog: | 1081 case kMathLog: |
1082 return DoMathLog(instr); | 1082 return DoMathLog(instr); |
| 1083 case kMathCos: |
| 1084 return DoMathCos(instr); |
| 1085 case kMathSin: |
| 1086 return DoMathSin(instr); |
1083 case kMathExp: | 1087 case kMathExp: |
1084 return DoMathExp(instr); | 1088 return DoMathExp(instr); |
1085 case kMathSqrt: | 1089 case kMathSqrt: |
1086 return DoMathSqrt(instr); | 1090 return DoMathSqrt(instr); |
1087 case kMathPowHalf: | 1091 case kMathPowHalf: |
1088 return DoMathPowHalf(instr); | 1092 return DoMathPowHalf(instr); |
1089 case kMathClz32: | 1093 case kMathClz32: |
1090 return DoMathClz32(instr); | 1094 return DoMathClz32(instr); |
1091 default: | 1095 default: |
1092 UNREACHABLE(); | 1096 UNREACHABLE(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 return MarkAsCall(DefineFixedDouble(new (zone()) LMathLog(input), d0), instr); | 1154 return MarkAsCall(DefineFixedDouble(new (zone()) LMathLog(input), d0), instr); |
1151 } | 1155 } |
1152 | 1156 |
1153 | 1157 |
1154 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { | 1158 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { |
1155 LOperand* input = UseRegisterAtStart(instr->value()); | 1159 LOperand* input = UseRegisterAtStart(instr->value()); |
1156 LMathClz32* result = new (zone()) LMathClz32(input); | 1160 LMathClz32* result = new (zone()) LMathClz32(input); |
1157 return DefineAsRegister(result); | 1161 return DefineAsRegister(result); |
1158 } | 1162 } |
1159 | 1163 |
| 1164 LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) { |
| 1165 DCHECK(instr->representation().IsDouble()); |
| 1166 DCHECK(instr->value()->representation().IsDouble()); |
| 1167 LOperand* input = UseFixedDouble(instr->value(), d0); |
| 1168 return MarkAsCall(DefineFixedDouble(new (zone()) LMathCos(input), d0), instr); |
| 1169 } |
| 1170 |
| 1171 LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) { |
| 1172 DCHECK(instr->representation().IsDouble()); |
| 1173 DCHECK(instr->value()->representation().IsDouble()); |
| 1174 LOperand* input = UseFixedDouble(instr->value(), d0); |
| 1175 return MarkAsCall(DefineFixedDouble(new (zone()) LMathSin(input), d0), instr); |
| 1176 } |
1160 | 1177 |
1161 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { | 1178 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { |
1162 DCHECK(instr->representation().IsDouble()); | 1179 DCHECK(instr->representation().IsDouble()); |
1163 DCHECK(instr->value()->representation().IsDouble()); | 1180 DCHECK(instr->value()->representation().IsDouble()); |
1164 LOperand* input = UseFixedDouble(instr->value(), d0); | 1181 LOperand* input = UseFixedDouble(instr->value(), d0); |
1165 return MarkAsCall(DefineFixedDouble(new (zone()) LMathExp(input), d0), instr); | 1182 return MarkAsCall(DefineFixedDouble(new (zone()) LMathExp(input), d0), instr); |
1166 } | 1183 } |
1167 | 1184 |
1168 | 1185 |
1169 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { | 1186 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { |
(...skipping 1294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2464 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2481 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2465 LOperand* object = UseRegister(instr->object()); | 2482 LOperand* object = UseRegister(instr->object()); |
2466 LOperand* index = UseTempRegister(instr->index()); | 2483 LOperand* index = UseTempRegister(instr->index()); |
2467 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); | 2484 LLoadFieldByIndex* load = new (zone()) LLoadFieldByIndex(object, index); |
2468 LInstruction* result = DefineSameAsFirst(load); | 2485 LInstruction* result = DefineSameAsFirst(load); |
2469 return AssignPointerMap(result); | 2486 return AssignPointerMap(result); |
2470 } | 2487 } |
2471 | 2488 |
2472 } // namespace internal | 2489 } // namespace internal |
2473 } // namespace v8 | 2490 } // namespace v8 |
OLD | NEW |