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

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

Issue 6551009: X64 Crankshaft: Implement DoubleToI in optimizing compiler. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 10 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/x64/lithium-x64.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 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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 if (to.IsTagged()) { 1570 if (to.IsTagged()) {
1571 LOperand* value = UseRegister(instr->value()); 1571 LOperand* value = UseRegister(instr->value());
1572 LOperand* temp = TempRegister(); 1572 LOperand* temp = TempRegister();
1573 1573
1574 // Make sure that temp and result_temp are different registers. 1574 // Make sure that temp and result_temp are different registers.
1575 LUnallocated* result_temp = TempRegister(); 1575 LUnallocated* result_temp = TempRegister();
1576 LNumberTagD* result = new LNumberTagD(value, temp); 1576 LNumberTagD* result = new LNumberTagD(value, temp);
1577 return AssignPointerMap(Define(result, result_temp)); 1577 return AssignPointerMap(Define(result, result_temp));
1578 } else { 1578 } else {
1579 ASSERT(to.IsInteger32()); 1579 ASSERT(to.IsInteger32());
1580 bool needs_temp = instr->CanTruncateToInt32() && 1580 LOperand* value = UseRegister(instr->value());
1581 !CpuFeatures::IsSupported(SSE3); 1581 return AssignEnvironment(DefineAsRegister(new LDoubleToI(value)));
1582 LOperand* value = needs_temp ?
1583 UseTempRegister(instr->value()) : UseRegister(instr->value());
1584 LOperand* temp = needs_temp ? TempRegister() : NULL;
1585 return AssignEnvironment(DefineAsRegister(new LDoubleToI(value, temp)));
1586 } 1582 }
1587 } else if (from.IsInteger32()) { 1583 } else if (from.IsInteger32()) {
1588 if (to.IsTagged()) { 1584 if (to.IsTagged()) {
1589 HValue* val = instr->value(); 1585 HValue* val = instr->value();
1590 LOperand* value = UseRegister(val); 1586 LOperand* value = UseRegister(val);
1591 if (val->HasRange() && val->range()->IsInSmiRange()) { 1587 if (val->HasRange() && val->range()->IsInSmiRange()) {
1592 return DefineSameAsFirst(new LSmiTag(value)); 1588 return DefineSameAsFirst(new LSmiTag(value));
1593 } else { 1589 } else {
1594 LNumberTagI* result = new LNumberTagI(value); 1590 LNumberTagI* result = new LNumberTagI(value);
1595 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); 1591 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 1981
1986 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 1982 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
1987 HEnvironment* outer = current_block_->last_environment()->outer(); 1983 HEnvironment* outer = current_block_->last_environment()->outer();
1988 current_block_->UpdateEnvironment(outer); 1984 current_block_->UpdateEnvironment(outer);
1989 return NULL; 1985 return NULL;
1990 } 1986 }
1991 1987
1992 } } // namespace v8::internal 1988 } } // namespace v8::internal
1993 1989
1994 #endif // V8_TARGET_ARCH_X64 1990 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698