Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Side by Side Diff: src/mips64/lithium-mips64.cc

Issue 425053002: MIPS: Inline Math.fround in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove .low()'s. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips64/lithium-mips64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/hydrogen-osr.h" 7 #include "src/hydrogen-osr.h"
8 #include "src/lithium-allocator-inl.h" 8 #include "src/lithium-allocator-inl.h"
9 #include "src/mips64/lithium-codegen-mips64.h" 9 #include "src/mips64/lithium-codegen-mips64.h"
10 #include "src/mips64/lithium-mips64.h" 10 #include "src/mips64/lithium-mips64.h"
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) { 1106 LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
1107 LOperand* context = UseFixed(instr->context(), cp); 1107 LOperand* context = UseFixed(instr->context(), cp);
1108 LOperand* function = UseFixed(instr->function(), a1); 1108 LOperand* function = UseFixed(instr->function(), a1);
1109 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function); 1109 LInvokeFunction* result = new(zone()) LInvokeFunction(context, function);
1110 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1110 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1111 } 1111 }
1112 1112
1113 1113
1114 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1114 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1115 switch (instr->op()) { 1115 switch (instr->op()) {
1116 case kMathFloor: return DoMathFloor(instr); 1116 case kMathFloor:
1117 case kMathRound: return DoMathRound(instr); 1117 return DoMathFloor(instr);
1118 case kMathAbs: return DoMathAbs(instr); 1118 case kMathRound:
1119 case kMathLog: return DoMathLog(instr); 1119 return DoMathRound(instr);
1120 case kMathExp: return DoMathExp(instr); 1120 case kMathFround:
1121 case kMathSqrt: return DoMathSqrt(instr); 1121 return DoMathFround(instr);
1122 case kMathPowHalf: return DoMathPowHalf(instr); 1122 case kMathAbs:
1123 case kMathClz32: return DoMathClz32(instr); 1123 return DoMathAbs(instr);
1124 case kMathLog:
1125 return DoMathLog(instr);
1126 case kMathExp:
1127 return DoMathExp(instr);
1128 case kMathSqrt:
1129 return DoMathSqrt(instr);
1130 case kMathPowHalf:
1131 return DoMathPowHalf(instr);
1132 case kMathClz32:
1133 return DoMathClz32(instr);
1124 default: 1134 default:
1125 UNREACHABLE(); 1135 UNREACHABLE();
1126 return NULL; 1136 return NULL;
1127 } 1137 }
1128 } 1138 }
1129 1139
1130 1140
1131 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) { 1141 LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) {
1132 ASSERT(instr->representation().IsDouble()); 1142 ASSERT(instr->representation().IsDouble());
1133 ASSERT(instr->value()->representation().IsDouble()); 1143 ASSERT(instr->value()->representation().IsDouble());
(...skipping 23 matching lines...) Expand all
1157 1167
1158 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { 1168 LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) {
1159 // Input cannot be the same as the result, see LCodeGen::DoMathPowHalf. 1169 // Input cannot be the same as the result, see LCodeGen::DoMathPowHalf.
1160 LOperand* input = UseFixedDouble(instr->value(), f8); 1170 LOperand* input = UseFixedDouble(instr->value(), f8);
1161 LOperand* temp = TempDoubleRegister(); 1171 LOperand* temp = TempDoubleRegister();
1162 LMathPowHalf* result = new(zone()) LMathPowHalf(input, temp); 1172 LMathPowHalf* result = new(zone()) LMathPowHalf(input, temp);
1163 return DefineFixedDouble(result, f4); 1173 return DefineFixedDouble(result, f4);
1164 } 1174 }
1165 1175
1166 1176
1177 LInstruction* LChunkBuilder::DoMathFround(HUnaryMathOperation* instr) {
1178 LOperand* input = UseRegister(instr->value());
1179 LMathFround* result = new (zone()) LMathFround(input);
1180 return DefineAsRegister(result);
1181 }
1182
1183
1167 LInstruction* LChunkBuilder::DoMathAbs(HUnaryMathOperation* instr) { 1184 LInstruction* LChunkBuilder::DoMathAbs(HUnaryMathOperation* instr) {
1168 Representation r = instr->value()->representation(); 1185 Representation r = instr->value()->representation();
1169 LOperand* context = (r.IsDouble() || r.IsSmiOrInteger32()) 1186 LOperand* context = (r.IsDouble() || r.IsSmiOrInteger32())
1170 ? NULL 1187 ? NULL
1171 : UseFixed(instr->context(), cp); 1188 : UseFixed(instr->context(), cp);
1172 LOperand* input = UseRegister(instr->value()); 1189 LOperand* input = UseRegister(instr->value());
1173 LInstruction* result = 1190 LInstruction* result =
1174 DefineAsRegister(new(zone()) LMathAbs(context, input)); 1191 DefineAsRegister(new(zone()) LMathAbs(context, input));
1175 if (!r.IsDouble() && !r.IsSmiOrInteger32()) result = AssignPointerMap(result); 1192 if (!r.IsDouble() && !r.IsSmiOrInteger32()) result = AssignPointerMap(result);
1176 if (!r.IsDouble()) result = AssignEnvironment(result); 1193 if (!r.IsDouble()) result = AssignEnvironment(result);
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2549 HAllocateBlockContext* instr) { 2566 HAllocateBlockContext* instr) {
2550 LOperand* context = UseFixed(instr->context(), cp); 2567 LOperand* context = UseFixed(instr->context(), cp);
2551 LOperand* function = UseRegisterAtStart(instr->function()); 2568 LOperand* function = UseRegisterAtStart(instr->function());
2552 LAllocateBlockContext* result = 2569 LAllocateBlockContext* result =
2553 new(zone()) LAllocateBlockContext(context, function); 2570 new(zone()) LAllocateBlockContext(context, function);
2554 return MarkAsCall(DefineFixed(result, cp), instr); 2571 return MarkAsCall(DefineFixed(result, cp), instr);
2555 } 2572 }
2556 2573
2557 2574
2558 } } // namespace v8::internal 2575 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/lithium-mips64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698