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/mips/lithium-mips.h" | 5 #include "src/crankshaft/mips/lithium-mips.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 case kMathFloor: | 1067 case kMathFloor: |
1068 return DoMathFloor(instr); | 1068 return DoMathFloor(instr); |
1069 case kMathRound: | 1069 case kMathRound: |
1070 return DoMathRound(instr); | 1070 return DoMathRound(instr); |
1071 case kMathFround: | 1071 case kMathFround: |
1072 return DoMathFround(instr); | 1072 return DoMathFround(instr); |
1073 case kMathAbs: | 1073 case kMathAbs: |
1074 return DoMathAbs(instr); | 1074 return DoMathAbs(instr); |
1075 case kMathLog: | 1075 case kMathLog: |
1076 return DoMathLog(instr); | 1076 return DoMathLog(instr); |
| 1077 case kMathCos: |
| 1078 return DoMathCos(instr); |
| 1079 case kMathSin: |
| 1080 return DoMathSin(instr); |
1077 case kMathExp: | 1081 case kMathExp: |
1078 return DoMathExp(instr); | 1082 return DoMathExp(instr); |
1079 case kMathSqrt: | 1083 case kMathSqrt: |
1080 return DoMathSqrt(instr); | 1084 return DoMathSqrt(instr); |
1081 case kMathPowHalf: | 1085 case kMathPowHalf: |
1082 return DoMathPowHalf(instr); | 1086 return DoMathPowHalf(instr); |
1083 case kMathClz32: | 1087 case kMathClz32: |
1084 return DoMathClz32(instr); | 1088 return DoMathClz32(instr); |
1085 default: | 1089 default: |
1086 UNREACHABLE(); | 1090 UNREACHABLE(); |
1087 return NULL; | 1091 return NULL; |
1088 } | 1092 } |
1089 } | 1093 } |
1090 | 1094 |
1091 | 1095 |
1092 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { | 1096 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { |
1093 DCHECK(instr->representation().IsDouble()); | 1097 DCHECK(instr->representation().IsDouble()); |
1094 DCHECK(instr->value()->representation().IsDouble()); | 1098 DCHECK(instr->value()->representation().IsDouble()); |
1095 LOperand* input = UseFixedDouble(instr->value(), f4); | 1099 LOperand* input = UseFixedDouble(instr->value(), f4); |
1096 return MarkAsCall(DefineFixedDouble(new(zone()) LMathLog(input), f4), instr); | 1100 return MarkAsCall(DefineFixedDouble(new(zone()) LMathLog(input), f4), instr); |
1097 } | 1101 } |
1098 | 1102 |
1099 | 1103 |
1100 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { | 1104 LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) { |
1101 LOperand* input = UseRegisterAtStart(instr->value()); | 1105 LOperand* input = UseRegisterAtStart(instr->value()); |
1102 LMathClz32* result = new(zone()) LMathClz32(input); | 1106 LMathClz32* result = new(zone()) LMathClz32(input); |
1103 return DefineAsRegister(result); | 1107 return DefineAsRegister(result); |
1104 } | 1108 } |
1105 | 1109 |
| 1110 LInstruction* LChunkBuilder::DoMathCos(HUnaryMathOperation* instr) { |
| 1111 DCHECK(instr->representation().IsDouble()); |
| 1112 DCHECK(instr->value()->representation().IsDouble()); |
| 1113 LOperand* input = UseFixedDouble(instr->value(), f4); |
| 1114 return MarkAsCall(DefineFixedDouble(new (zone()) LMathCos(input), f4), instr); |
| 1115 } |
| 1116 |
| 1117 LInstruction* LChunkBuilder::DoMathSin(HUnaryMathOperation* instr) { |
| 1118 DCHECK(instr->representation().IsDouble()); |
| 1119 DCHECK(instr->value()->representation().IsDouble()); |
| 1120 LOperand* input = UseFixedDouble(instr->value(), f4); |
| 1121 return MarkAsCall(DefineFixedDouble(new (zone()) LMathSin(input), f4), instr); |
| 1122 } |
1106 | 1123 |
1107 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { | 1124 LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { |
1108 DCHECK(instr->representation().IsDouble()); | 1125 DCHECK(instr->representation().IsDouble()); |
1109 DCHECK(instr->value()->representation().IsDouble()); | 1126 DCHECK(instr->value()->representation().IsDouble()); |
1110 LOperand* input = UseFixedDouble(instr->value(), f4); | 1127 LOperand* input = UseFixedDouble(instr->value(), f4); |
1111 return MarkAsCall(DefineFixedDouble(new (zone()) LMathExp(input), f4), instr); | 1128 return MarkAsCall(DefineFixedDouble(new (zone()) LMathExp(input), f4), instr); |
1112 } | 1129 } |
1113 | 1130 |
1114 | 1131 |
1115 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { | 1132 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { |
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2445 LOperand* index = UseTempRegister(instr->index()); | 2462 LOperand* index = UseTempRegister(instr->index()); |
2446 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2463 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2447 LInstruction* result = DefineSameAsFirst(load); | 2464 LInstruction* result = DefineSameAsFirst(load); |
2448 return AssignPointerMap(result); | 2465 return AssignPointerMap(result); |
2449 } | 2466 } |
2450 | 2467 |
2451 } // namespace internal | 2468 } // namespace internal |
2452 } // namespace v8 | 2469 } // namespace v8 |
2453 | 2470 |
2454 #endif // V8_TARGET_ARCH_MIPS | 2471 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |