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

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

Issue 9296045: MIPS: Improve register allocation for Lithium representation changes on ARM (Closed)
Patch Set: rebased on r10562 Created 8 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
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1621 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1622 Representation from = instr->from(); 1622 Representation from = instr->from();
1623 Representation to = instr->to(); 1623 Representation to = instr->to();
1624 if (from.IsTagged()) { 1624 if (from.IsTagged()) {
1625 if (to.IsDouble()) { 1625 if (to.IsDouble()) {
1626 LOperand* value = UseRegister(instr->value()); 1626 LOperand* value = UseRegister(instr->value());
1627 LNumberUntagD* res = new LNumberUntagD(value); 1627 LNumberUntagD* res = new LNumberUntagD(value);
1628 return AssignEnvironment(DefineAsRegister(res)); 1628 return AssignEnvironment(DefineAsRegister(res));
1629 } else { 1629 } else {
1630 ASSERT(to.IsInteger32()); 1630 ASSERT(to.IsInteger32());
1631 LOperand* value = UseRegister(instr->value()); 1631 LOperand* value = UseRegisterAtStart(instr->value());
1632 bool needs_check = !instr->value()->type().IsSmi(); 1632 bool needs_check = !instr->value()->type().IsSmi();
1633 LInstruction* res = NULL; 1633 LInstruction* res = NULL;
1634 if (!needs_check) { 1634 if (!needs_check) {
1635 res = DefineSameAsFirst(new LSmiUntag(value, needs_check)); 1635 res = DefineAsRegister(new LSmiUntag(value, needs_check));
1636 } else { 1636 } else {
1637 LOperand* temp1 = TempRegister(); 1637 LOperand* temp1 = TempRegister();
1638 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() 1638 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
1639 : NULL; 1639 : NULL;
1640 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(f22) 1640 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(f22)
1641 : NULL; 1641 : NULL;
1642 res = DefineSameAsFirst(new LTaggedToI(value, temp1, temp2, temp3)); 1642 res = DefineSameAsFirst(new LTaggedToI(value, temp1, temp2, temp3));
1643 res = AssignEnvironment(res); 1643 res = AssignEnvironment(res);
1644 } 1644 }
1645 return res; 1645 return res;
(...skipping 15 matching lines...) Expand all
1661 LOperand* value = UseRegister(instr->value()); 1661 LOperand* value = UseRegister(instr->value());
1662 LDoubleToI* res = 1662 LDoubleToI* res =
1663 new LDoubleToI(value, 1663 new LDoubleToI(value,
1664 TempRegister(), 1664 TempRegister(),
1665 instr->CanTruncateToInt32() ? TempRegister() : NULL); 1665 instr->CanTruncateToInt32() ? TempRegister() : NULL);
1666 return AssignEnvironment(DefineAsRegister(res)); 1666 return AssignEnvironment(DefineAsRegister(res));
1667 } 1667 }
1668 } else if (from.IsInteger32()) { 1668 } else if (from.IsInteger32()) {
1669 if (to.IsTagged()) { 1669 if (to.IsTagged()) {
1670 HValue* val = instr->value(); 1670 HValue* val = instr->value();
1671 LOperand* value = UseRegister(val); 1671 LOperand* value = UseRegisterAtStart(val);
1672 if (val->HasRange() && val->range()->IsInSmiRange()) { 1672 if (val->HasRange() && val->range()->IsInSmiRange()) {
1673 return DefineSameAsFirst(new LSmiTag(value)); 1673 return DefineAsRegister(new LSmiTag(value));
1674 } else { 1674 } else {
1675 LNumberTagI* result = new LNumberTagI(value); 1675 LNumberTagI* result = new LNumberTagI(value);
1676 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); 1676 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1677 } 1677 }
1678 } else { 1678 } else {
1679 ASSERT(to.IsDouble()); 1679 ASSERT(to.IsDouble());
1680 LOperand* value = Use(instr->value()); 1680 LOperand* value = Use(instr->value());
1681 return DefineAsRegister(new LInteger32ToDouble(value)); 1681 return DefineAsRegister(new LInteger32ToDouble(value));
1682 } 1682 }
1683 } 1683 }
1684 UNREACHABLE(); 1684 UNREACHABLE();
1685 return NULL; 1685 return NULL;
1686 } 1686 }
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2268 2268
2269 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2269 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2270 LOperand* key = UseRegisterAtStart(instr->key()); 2270 LOperand* key = UseRegisterAtStart(instr->key());
2271 LOperand* object = UseRegisterAtStart(instr->object()); 2271 LOperand* object = UseRegisterAtStart(instr->object());
2272 LIn* result = new LIn(key, object); 2272 LIn* result = new LIn(key, object);
2273 return MarkAsCall(DefineFixed(result, v0), instr); 2273 return MarkAsCall(DefineFixed(result, v0), instr);
2274 } 2274 }
2275 2275
2276 2276
2277 } } // namespace v8::internal 2277 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698