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

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

Issue 17448005: x64: LAddI must use LEAL, not LEAQ (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 | 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 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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 } 1710 }
1711 1711
1712 1712
1713 void LCodeGen::DoAddI(LAddI* instr) { 1713 void LCodeGen::DoAddI(LAddI* instr) {
1714 LOperand* left = instr->left(); 1714 LOperand* left = instr->left();
1715 LOperand* right = instr->right(); 1715 LOperand* right = instr->right();
1716 1716
1717 if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) { 1717 if (LAddI::UseLea(instr->hydrogen()) && !left->Equals(instr->result())) {
1718 if (right->IsConstantOperand()) { 1718 if (right->IsConstantOperand()) {
1719 int32_t offset = ToInteger32(LConstantOperand::cast(right)); 1719 int32_t offset = ToInteger32(LConstantOperand::cast(right));
1720 __ lea(ToRegister(instr->result()), MemOperand(ToRegister(left), offset)); 1720 __ leal(ToRegister(instr->result()),
1721 MemOperand(ToRegister(left), offset));
1721 } else { 1722 } else {
1722 Operand address(ToRegister(left), ToRegister(right), times_1, 0); 1723 Operand address(ToRegister(left), ToRegister(right), times_1, 0);
1723 __ lea(ToRegister(instr->result()), address); 1724 __ leal(ToRegister(instr->result()), address);
1724 } 1725 }
1725 } else { 1726 } else {
1726 if (right->IsConstantOperand()) { 1727 if (right->IsConstantOperand()) {
1727 __ addl(ToRegister(left), 1728 __ addl(ToRegister(left),
1728 Immediate(ToInteger32(LConstantOperand::cast(right)))); 1729 Immediate(ToInteger32(LConstantOperand::cast(right))));
1729 } else if (right->IsRegister()) { 1730 } else if (right->IsRegister()) {
1730 __ addl(ToRegister(left), ToRegister(right)); 1731 __ addl(ToRegister(left), ToRegister(right));
1731 } else { 1732 } else {
1732 __ addl(ToRegister(left), ToOperand(right)); 1733 __ addl(ToRegister(left), ToOperand(right));
1733 } 1734 }
(...skipping 3870 matching lines...) Expand 10 before | Expand all | Expand 10 after
5604 FixedArray::kHeaderSize - kPointerSize)); 5605 FixedArray::kHeaderSize - kPointerSize));
5605 __ bind(&done); 5606 __ bind(&done);
5606 } 5607 }
5607 5608
5608 5609
5609 #undef __ 5610 #undef __
5610 5611
5611 } } // namespace v8::internal 5612 } } // namespace v8::internal
5612 5613
5613 #endif // V8_TARGET_ARCH_X64 5614 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698