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

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

Issue 217083003: Smi immediates are not supported on x64. Do not use it. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: m8 x64.debug.check Created 6 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
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1813 1813
1814 void LCodeGen::DoAddI(LAddI* instr) { 1814 void LCodeGen::DoAddI(LAddI* instr) {
1815 LOperand* left = instr->left(); 1815 LOperand* left = instr->left();
1816 LOperand* right = instr->right(); 1816 LOperand* right = instr->right();
1817 1817
1818 Representation target_rep = instr->hydrogen()->representation(); 1818 Representation target_rep = instr->hydrogen()->representation();
1819 bool is_p = target_rep.IsSmi() || target_rep.IsExternal(); 1819 bool is_p = target_rep.IsSmi() || target_rep.IsExternal();
1820 1820
1821 if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) { 1821 if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) {
1822 if (right->IsConstantOperand()) { 1822 if (right->IsConstantOperand()) {
1823 ASSERT(!target_rep.IsSmi()); // No support for smi-immediates.
1823 int32_t offset = ToInteger32(LConstantOperand::cast(right)); 1824 int32_t offset = ToInteger32(LConstantOperand::cast(right));
1824 if (is_p) { 1825 if (is_p) {
1825 __ leap(ToRegister(instr->result()), 1826 __ leap(ToRegister(instr->result()),
1826 MemOperand(ToRegister(left), offset)); 1827 MemOperand(ToRegister(left), offset));
1827 } else { 1828 } else {
1828 __ leal(ToRegister(instr->result()), 1829 __ leal(ToRegister(instr->result()),
1829 MemOperand(ToRegister(left), offset)); 1830 MemOperand(ToRegister(left), offset));
1830 } 1831 }
1831 } else { 1832 } else {
1832 Operand address(ToRegister(left), ToRegister(right), times_1, 0); 1833 Operand address(ToRegister(left), ToRegister(right), times_1, 0);
1833 if (is_p) { 1834 if (is_p) {
1834 __ leap(ToRegister(instr->result()), address); 1835 __ leap(ToRegister(instr->result()), address);
1835 } else { 1836 } else {
1836 __ leal(ToRegister(instr->result()), address); 1837 __ leal(ToRegister(instr->result()), address);
1837 } 1838 }
1838 } 1839 }
1839 } else { 1840 } else {
1840 if (right->IsConstantOperand()) { 1841 if (right->IsConstantOperand()) {
1842 ASSERT(!target_rep.IsSmi()); // No support for smi-immediates.
1841 if (is_p) { 1843 if (is_p) {
1842 __ addp(ToRegister(left), 1844 __ addp(ToRegister(left),
1843 Immediate(ToInteger32(LConstantOperand::cast(right)))); 1845 Immediate(ToInteger32(LConstantOperand::cast(right))));
1844 } else { 1846 } else {
1845 __ addl(ToRegister(left), 1847 __ addl(ToRegister(left),
1846 Immediate(ToInteger32(LConstantOperand::cast(right)))); 1848 Immediate(ToInteger32(LConstantOperand::cast(right))));
1847 } 1849 }
1848 } else if (right->IsRegister()) { 1850 } else if (right->IsRegister()) {
1849 if (is_p) { 1851 if (is_p) {
1850 __ addp(ToRegister(left), ToRegister(right)); 1852 __ addp(ToRegister(left), ToRegister(right));
(...skipping 3827 matching lines...) Expand 10 before | Expand all | Expand 10 after
5678 __ bind(deferred->exit()); 5680 __ bind(deferred->exit());
5679 __ bind(&done); 5681 __ bind(&done);
5680 } 5682 }
5681 5683
5682 5684
5683 #undef __ 5685 #undef __
5684 5686
5685 } } // namespace v8::internal 5687 } } // namespace v8::internal
5686 5688
5687 #endif // V8_TARGET_ARCH_X64 5689 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698