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

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

Issue 6880010: Merge (7265, 7271] from bleeding_edge to experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 8 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
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 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1626 if (from.IsTagged()) { 1626 if (from.IsTagged()) {
1627 if (to.IsDouble()) { 1627 if (to.IsDouble()) {
1628 LOperand* value = UseRegister(instr->value()); 1628 LOperand* value = UseRegister(instr->value());
1629 LNumberUntagD* res = new LNumberUntagD(value); 1629 LNumberUntagD* res = new LNumberUntagD(value);
1630 return AssignEnvironment(DefineAsRegister(res)); 1630 return AssignEnvironment(DefineAsRegister(res));
1631 } else { 1631 } else {
1632 ASSERT(to.IsInteger32()); 1632 ASSERT(to.IsInteger32());
1633 LOperand* value = UseRegister(instr->value()); 1633 LOperand* value = UseRegister(instr->value());
1634 bool needs_check = !instr->value()->type().IsSmi(); 1634 bool needs_check = !instr->value()->type().IsSmi();
1635 if (needs_check) { 1635 if (needs_check) {
1636 CpuFeatures* cpu_features = Isolate::Current()->cpu_features();
1636 LOperand* xmm_temp = 1637 LOperand* xmm_temp =
1637 (instr->CanTruncateToInt32() && CpuFeatures::IsSupported(SSE3)) 1638 (instr->CanTruncateToInt32() && !cpu_features->IsSupported(SSE3))
1638 ? NULL 1639 ? NULL
1639 : FixedTemp(xmm1); 1640 : FixedTemp(xmm1);
1640 LTaggedToI* res = new LTaggedToI(value, xmm_temp); 1641 LTaggedToI* res = new LTaggedToI(value, xmm_temp);
1641 return AssignEnvironment(DefineSameAsFirst(res)); 1642 return AssignEnvironment(DefineSameAsFirst(res));
1642 } else { 1643 } else {
1643 return DefineSameAsFirst(new LSmiUntag(value, needs_check)); 1644 return DefineSameAsFirst(new LSmiUntag(value, needs_check));
1644 } 1645 }
1645 } 1646 }
1646 } else if (from.IsDouble()) { 1647 } else if (from.IsDouble()) {
1647 if (to.IsTagged()) { 1648 if (to.IsTagged()) {
1648 LOperand* value = UseRegister(instr->value()); 1649 LOperand* value = UseRegister(instr->value());
1649 LOperand* temp = TempRegister(); 1650 LOperand* temp = TempRegister();
1650 1651
1651 // Make sure that temp and result_temp are different registers. 1652 // Make sure that temp and result_temp are different registers.
1652 LUnallocated* result_temp = TempRegister(); 1653 LUnallocated* result_temp = TempRegister();
1653 LNumberTagD* result = new LNumberTagD(value, temp); 1654 LNumberTagD* result = new LNumberTagD(value, temp);
1654 return AssignPointerMap(Define(result, result_temp)); 1655 return AssignPointerMap(Define(result, result_temp));
1655 } else { 1656 } else {
1656 ASSERT(to.IsInteger32()); 1657 ASSERT(to.IsInteger32());
1657 bool needs_temp = instr->CanTruncateToInt32() && 1658 bool needs_temp = instr->CanTruncateToInt32() &&
1658 !CpuFeatures::IsSupported(SSE3); 1659 !Isolate::Current()->cpu_features()->IsSupported(SSE3);
1659 LOperand* value = needs_temp ? 1660 LOperand* value = needs_temp ?
1660 UseTempRegister(instr->value()) : UseRegister(instr->value()); 1661 UseTempRegister(instr->value()) : UseRegister(instr->value());
1661 LOperand* temp = needs_temp ? TempRegister() : NULL; 1662 LOperand* temp = needs_temp ? TempRegister() : NULL;
1662 return AssignEnvironment(DefineAsRegister(new LDoubleToI(value, temp))); 1663 return AssignEnvironment(DefineAsRegister(new LDoubleToI(value, temp)));
1663 } 1664 }
1664 } else if (from.IsInteger32()) { 1665 } else if (from.IsInteger32()) {
1665 if (to.IsTagged()) { 1666 if (to.IsTagged()) {
1666 HValue* val = instr->value(); 1667 HValue* val = instr->value();
1667 LOperand* value = UseRegister(val); 1668 LOperand* value = UseRegister(val);
1668 if (val->HasRange() && val->range()->IsInSmiRange()) { 1669 if (val->HasRange() && val->range()->IsInSmiRange()) {
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
2101 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2102 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2102 HEnvironment* outer = current_block_->last_environment()->outer(); 2103 HEnvironment* outer = current_block_->last_environment()->outer();
2103 current_block_->UpdateEnvironment(outer); 2104 current_block_->UpdateEnvironment(outer);
2104 return NULL; 2105 return NULL;
2105 } 2106 }
2106 2107
2107 2108
2108 } } // namespace v8::internal 2109 } } // namespace v8::internal
2109 2110
2110 #endif // V8_TARGET_ARCH_IA32 2111 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698