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

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

Issue 7043003: Version 3.3.8 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 7 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') | src/x64/macro-assembler-x64.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 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 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 return NULL; 1641 return NULL;
1642 } 1642 }
1643 1643
1644 1644
1645 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { 1645 LInstruction* LChunkBuilder::DoThrow(HThrow* instr) {
1646 LOperand* value = UseFixed(instr->value(), rax); 1646 LOperand* value = UseFixed(instr->value(), rax);
1647 return MarkAsCall(new LThrow(value), instr); 1647 return MarkAsCall(new LThrow(value), instr);
1648 } 1648 }
1649 1649
1650 1650
1651 LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) {
1652 // All HForceRepresentation instructions should be eliminated in the
1653 // representation change phase of Hydrogen.
1654 UNREACHABLE();
1655 return NULL;
1656 }
1657
1658
1651 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1659 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1652 Representation from = instr->from(); 1660 Representation from = instr->from();
1653 Representation to = instr->to(); 1661 Representation to = instr->to();
1654 if (from.IsTagged()) { 1662 if (from.IsTagged()) {
1655 if (to.IsDouble()) { 1663 if (to.IsDouble()) {
1656 LOperand* value = UseRegister(instr->value()); 1664 LOperand* value = UseRegister(instr->value());
1657 LNumberUntagD* res = new LNumberUntagD(value); 1665 LNumberUntagD* res = new LNumberUntagD(value);
1658 return AssignEnvironment(DefineAsRegister(res)); 1666 return AssignEnvironment(DefineAsRegister(res));
1659 } else { 1667 } else {
1660 ASSERT(to.IsInteger32()); 1668 ASSERT(to.IsInteger32());
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 } 1743 }
1736 1744
1737 1745
1738 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { 1746 LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) {
1739 LOperand* value = UseRegisterAtStart(instr->value()); 1747 LOperand* value = UseRegisterAtStart(instr->value());
1740 LCheckMap* result = new LCheckMap(value); 1748 LCheckMap* result = new LCheckMap(value);
1741 return AssignEnvironment(result); 1749 return AssignEnvironment(result);
1742 } 1750 }
1743 1751
1744 1752
1753 LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
1754 HValue* value = instr->value();
1755 Representation input_rep = value->representation();
1756 LOperand* reg = UseRegister(value);
1757 if (input_rep.IsDouble()) {
1758 return DefineAsRegister(new LClampDToUint8(reg,
1759 TempRegister()));
1760 } else if (input_rep.IsInteger32()) {
1761 return DefineSameAsFirst(new LClampIToUint8(reg));
1762 } else {
1763 ASSERT(input_rep.IsTagged());
1764 // Register allocator doesn't (yet) support allocation of double
1765 // temps. Reserve xmm1 explicitly.
1766 LClampTToUint8* result = new LClampTToUint8(reg,
1767 TempRegister(),
1768 FixedTemp(xmm1));
1769 return AssignEnvironment(DefineSameAsFirst(result));
1770 }
1771 }
1772
1773
1745 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { 1774 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1746 return new LReturn(UseFixed(instr->value(), rax)); 1775 return new LReturn(UseFixed(instr->value(), rax));
1747 } 1776 }
1748 1777
1749 1778
1750 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { 1779 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
1751 Representation r = instr->representation(); 1780 Representation r = instr->representation();
1752 if (r.IsInteger32()) { 1781 if (r.IsInteger32()) {
1753 return DefineAsRegister(new LConstantI); 1782 return DefineAsRegister(new LConstantI);
1754 } else if (r.IsDouble()) { 1783 } else if (r.IsDouble()) {
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 LOperand* key = UseOrConstantAtStart(instr->key()); 2206 LOperand* key = UseOrConstantAtStart(instr->key());
2178 LOperand* object = UseOrConstantAtStart(instr->object()); 2207 LOperand* object = UseOrConstantAtStart(instr->object());
2179 LIn* result = new LIn(key, object); 2208 LIn* result = new LIn(key, object);
2180 return MarkAsCall(DefineFixed(result, rax), instr); 2209 return MarkAsCall(DefineFixed(result, rax), instr);
2181 } 2210 }
2182 2211
2183 2212
2184 } } // namespace v8::internal 2213 } } // namespace v8::internal
2185 2214
2186 #endif // V8_TARGET_ARCH_X64 2215 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698