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

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

Issue 8822014: MIPS: Fixing MathPowHalf on ARM. (Closed)
Patch Set: Created 9 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1145 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY); 1145 return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY);
1146 } 1146 }
1147 1147
1148 1148
1149 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1149 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1150 BuiltinFunctionId op = instr->op(); 1150 BuiltinFunctionId op = instr->op();
1151 if (op == kMathLog || op == kMathSin || op == kMathCos) { 1151 if (op == kMathLog || op == kMathSin || op == kMathCos) {
1152 LOperand* input = UseFixedDouble(instr->value(), f4); 1152 LOperand* input = UseFixedDouble(instr->value(), f4);
1153 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL); 1153 LUnaryMathOperation* result = new LUnaryMathOperation(input, NULL);
1154 return MarkAsCall(DefineFixedDouble(result, f4), instr); 1154 return MarkAsCall(DefineFixedDouble(result, f4), instr);
1155 } else if (op == kMathPowHalf) {
1156 // Input cannot be the same as the result.
1157 // See lithium-codegen-mips.cc::DoMathPowHalf.
1158 LOperand* input = UseFixedDouble(instr->value(), f8);
1159 LOperand* temp = FixedTemp(f6);
1160 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp);
1161 return DefineFixedDouble(result, f4);
1155 } else { 1162 } else {
1156 LOperand* input = UseRegisterAtStart(instr->value()); 1163 LOperand* input = UseRegisterAtStart(instr->value());
1157 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL; 1164 LOperand* temp = (op == kMathFloor) ? TempRegister() : NULL;
1158 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp); 1165 LUnaryMathOperation* result = new LUnaryMathOperation(input, temp);
1159 switch (op) { 1166 switch (op) {
1160 case kMathAbs: 1167 case kMathAbs:
1161 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 1168 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1162 case kMathFloor: 1169 case kMathFloor:
1163 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result))); 1170 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1164 case kMathSqrt: 1171 case kMathSqrt:
1165 return DefineAsRegister(result); 1172 return DefineAsRegister(result);
1166 case kMathRound: 1173 case kMathRound:
1167 return AssignEnvironment(DefineAsRegister(result)); 1174 return AssignEnvironment(DefineAsRegister(result));
1168 case kMathPowHalf:
1169 return DefineAsRegister(result);
1170 default: 1175 default:
1171 UNREACHABLE(); 1176 UNREACHABLE();
1172 return NULL; 1177 return NULL;
1173 } 1178 }
1174 } 1179 }
1175 } 1180 }
1176 1181
1177 1182
1178 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { 1183 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
1179 ASSERT(instr->key()->representation().IsTagged()); 1184 ASSERT(instr->key()->representation().IsTagged());
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 2239
2235 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2240 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2236 LOperand* key = UseRegisterAtStart(instr->key()); 2241 LOperand* key = UseRegisterAtStart(instr->key());
2237 LOperand* object = UseRegisterAtStart(instr->object()); 2242 LOperand* object = UseRegisterAtStart(instr->object());
2238 LIn* result = new LIn(key, object); 2243 LIn* result = new LIn(key, object);
2239 return MarkAsCall(DefineFixed(result, v0), instr); 2244 return MarkAsCall(DefineFixed(result, v0), instr);
2240 } 2245 }
2241 2246
2242 2247
2243 } } // namespace v8::internal 2248 } } // namespace v8::internal
OLDNEW
« src/mips/lithium-codegen-mips.cc ('K') | « src/mips/lithium-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698