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

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

Issue 5726008: Reapply change 5989, adding untagged double calls to Math.pow, with problem i... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/math.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 1348
1349 LInstruction* LChunkBuilder::DoCallConstantFunction( 1349 LInstruction* LChunkBuilder::DoCallConstantFunction(
1350 HCallConstantFunction* instr) { 1350 HCallConstantFunction* instr) {
1351 argument_count_ -= instr->argument_count(); 1351 argument_count_ -= instr->argument_count();
1352 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr); 1352 return MarkAsCall(DefineFixed(new LCallConstantFunction, eax), instr);
1353 } 1353 }
1354 1354
1355 1355
1356 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) { 1356 LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
1357 MathFunctionId op = instr->op(); 1357 MathFunctionId op = instr->op();
1358 LOperand* input = UseRegisterAtStart(instr->value()); 1358 if (op == kMathLog) {
1359 LInstruction* result = new LUnaryMathOperation(input); 1359 LOperand* input = UseFixedDouble(instr->value(), xmm1);
1360 switch (op) { 1360 LInstruction* result = new LUnaryMathOperation(input);
1361 case kMathAbs: 1361 return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1362 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); 1362 } else {
1363 case kMathFloor: 1363 LOperand* input = UseRegisterAtStart(instr->value());
1364 return AssignEnvironment(DefineAsRegister(result)); 1364 LInstruction* result = new LUnaryMathOperation(input);
1365 case kMathRound: 1365 switch (op) {
1366 return AssignEnvironment(DefineAsRegister(result)); 1366 case kMathAbs:
1367 case kMathSqrt: 1367 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
1368 return DefineSameAsFirst(result); 1368 case kMathFloor:
1369 case kMathPowHalf: 1369 return AssignEnvironment(DefineAsRegister(result));
1370 return AssignEnvironment(DefineSameAsFirst(result)); 1370 case kMathRound:
1371 default: 1371 return AssignEnvironment(DefineAsRegister(result));
1372 UNREACHABLE(); 1372 case kMathSqrt:
1373 return NULL; 1373 return DefineSameAsFirst(result);
1374 case kMathPowHalf:
1375 return AssignEnvironment(DefineSameAsFirst(result));
1376 default:
1377 UNREACHABLE();
1378 return NULL;
1379 }
1374 } 1380 }
1375 } 1381 }
1376 1382
1377 1383
1378 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) { 1384 LInstruction* LChunkBuilder::DoCallKeyed(HCallKeyed* instr) {
1379 ASSERT(instr->key()->representation().IsTagged()); 1385 ASSERT(instr->key()->representation().IsTagged());
1380 argument_count_ -= instr->argument_count(); 1386 argument_count_ -= instr->argument_count();
1381 UseFixed(instr->key(), ecx); 1387 UseFixed(instr->key(), ecx);
1382 return MarkAsCall(DefineFixed(new LCallKeyed, eax), instr); 1388 return MarkAsCall(DefineFixed(new LCallKeyed, eax), instr);
1383 } 1389 }
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 void LPointerMap::PrintTo(StringStream* stream) const { 2105 void LPointerMap::PrintTo(StringStream* stream) const {
2100 stream->Add("{"); 2106 stream->Add("{");
2101 for (int i = 0; i < pointer_operands_.length(); ++i) { 2107 for (int i = 0; i < pointer_operands_.length(); ++i) {
2102 if (i != 0) stream->Add(";"); 2108 if (i != 0) stream->Add(";");
2103 pointer_operands_[i]->PrintTo(stream); 2109 pointer_operands_[i]->PrintTo(stream);
2104 } 2110 }
2105 stream->Add("} @%d", position()); 2111 stream->Add("} @%d", position());
2106 } 2112 }
2107 2113
2108 } } // namespace v8::internal 2114 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698