OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/arm/lithium-arm.h" | 5 #include "src/crankshaft/arm/lithium-arm.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm/lithium-codegen-arm.h" | 9 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 case kMathFloor: | 1062 case kMathFloor: |
1063 return DoMathFloor(instr); | 1063 return DoMathFloor(instr); |
1064 case kMathRound: | 1064 case kMathRound: |
1065 return DoMathRound(instr); | 1065 return DoMathRound(instr); |
1066 case kMathFround: | 1066 case kMathFround: |
1067 return DoMathFround(instr); | 1067 return DoMathFround(instr); |
1068 case kMathAbs: | 1068 case kMathAbs: |
1069 return DoMathAbs(instr); | 1069 return DoMathAbs(instr); |
1070 case kMathLog: | 1070 case kMathLog: |
1071 return DoMathLog(instr); | 1071 return DoMathLog(instr); |
| 1072 case kMathCos: |
| 1073 return DoMathCos(instr); |
| 1074 case kMathSin: |
| 1075 return DoMathSin(instr); |
1072 case kMathExp: | 1076 case kMathExp: |
1073 return DoMathExp(instr); | 1077 return DoMathExp(instr); |
1074 case kMathSqrt: | 1078 case kMathSqrt: |
1075 return DoMathSqrt(instr); | 1079 return DoMathSqrt(instr); |
1076 case kMathPowHalf: | 1080 case kMathPowHalf: |
1077 return DoMathPowHalf(instr); | 1081 return DoMathPowHalf(instr); |
1078 case kMathClz32: | 1082 case kMathClz32: |
1079 return DoMathClz32(instr); | 1083 return DoMathClz32(instr); |
1080 default: | 1084 default: |
1081 UNREACHABLE(); | 1085 UNREACHABLE(); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 return MarkAsCall(DefineFixedDouble(new(zone()) LMathLog(input), d0), instr); | 1131 return MarkAsCall(DefineFixedDouble(new(zone()) LMathLog(input), d0), instr); |
1128 } | 1132 } |
1129 | 1133 |
1130 | 1134 |
1131 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { | 1135 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { |
1132 LOperand* input = UseRegisterAtStart(instr->value()); | 1136 LOperand* input = UseRegisterAtStart(instr->value()); |
1133 LMathClz32* result = new(zone()) LMathClz32(input); | 1137 LMathClz32* result = new(zone()) LMathClz32(input); |
1134 return DefineAsRegister(result); | 1138 return DefineAsRegister(result); |
1135 } | 1139 } |
1136 | 1140 |
| 1141 LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) { |
| 1142 DCHECK(instr->representation().IsDouble()); |
| 1143 DCHECK(instr->value()->representation().IsDouble()); |
| 1144 LOperand* input = UseFixedDouble(instr->value(), d0); |
| 1145 return MarkAsCall(DefineFixedDouble(new (zone()) LMathCos(input), d0), instr); |
| 1146 } |
| 1147 |
| 1148 LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) { |
| 1149 DCHECK(instr->representation().IsDouble()); |
| 1150 DCHECK(instr->value()->representation().IsDouble()); |
| 1151 LOperand* input = UseFixedDouble(instr->value(), d0); |
| 1152 return MarkAsCall(DefineFixedDouble(new (zone()) LMathSin(input), d0), instr); |
| 1153 } |
1137 | 1154 |
1138 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { | 1155 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { |
1139 DCHECK(instr->representation().IsDouble()); | 1156 DCHECK(instr->representation().IsDouble()); |
1140 DCHECK(instr->value()->representation().IsDouble()); | 1157 DCHECK(instr->value()->representation().IsDouble()); |
1141 LOperand* input = UseFixedDouble(instr->value(), d0); | 1158 LOperand* input = UseFixedDouble(instr->value(), d0); |
1142 return MarkAsCall(DefineFixedDouble(new (zone()) LMathExp(input), d0), instr); | 1159 return MarkAsCall(DefineFixedDouble(new (zone()) LMathExp(input), d0), instr); |
1143 } | 1160 } |
1144 | 1161 |
1145 | 1162 |
1146 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { | 1163 LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { |
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2513 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2497 LOperand* object = UseRegister(instr->object()); | 2514 LOperand* object = UseRegister(instr->object()); |
2498 LOperand* index = UseTempRegister(instr->index()); | 2515 LOperand* index = UseTempRegister(instr->index()); |
2499 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2516 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2500 LInstruction* result = DefineSameAsFirst(load); | 2517 LInstruction* result = DefineSameAsFirst(load); |
2501 return AssignPointerMap(result); | 2518 return AssignPointerMap(result); |
2502 } | 2519 } |
2503 | 2520 |
2504 } // namespace internal | 2521 } // namespace internal |
2505 } // namespace v8 | 2522 } // namespace v8 |
OLD | NEW |