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

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

Issue 2044353002: [crankshaft] do not sign-extend int32 immediate in DoMathMinMax. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-495493.js » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1772 Register left_reg = ToRegister(left); 1772 Register left_reg = ToRegister(left);
1773 if (right->IsConstantOperand()) { 1773 if (right->IsConstantOperand()) {
1774 Immediate right_imm = Immediate( 1774 Immediate right_imm = Immediate(
1775 ToRepresentation(LConstantOperand::cast(right), 1775 ToRepresentation(LConstantOperand::cast(right),
1776 instr->hydrogen()->right()->representation())); 1776 instr->hydrogen()->right()->representation()));
1777 DCHECK(SmiValuesAre32Bits() 1777 DCHECK(SmiValuesAre32Bits()
1778 ? !instr->hydrogen()->representation().IsSmi() 1778 ? !instr->hydrogen()->representation().IsSmi()
1779 : SmiValuesAre31Bits()); 1779 : SmiValuesAre31Bits());
1780 __ cmpl(left_reg, right_imm); 1780 __ cmpl(left_reg, right_imm);
1781 __ j(condition, &return_left, Label::kNear); 1781 __ j(condition, &return_left, Label::kNear);
1782 __ movp(left_reg, right_imm); 1782 __ movl(left_reg, right_imm);
1783 } else if (right->IsRegister()) { 1783 } else if (right->IsRegister()) {
1784 Register right_reg = ToRegister(right); 1784 Register right_reg = ToRegister(right);
1785 if (instr->hydrogen_value()->representation().IsSmi()) { 1785 if (instr->hydrogen_value()->representation().IsSmi()) {
1786 __ cmpp(left_reg, right_reg); 1786 __ cmpp(left_reg, right_reg);
1787 } else { 1787 } else {
1788 __ cmpl(left_reg, right_reg); 1788 __ cmpl(left_reg, right_reg);
1789 } 1789 }
1790 __ j(condition, &return_left, Label::kNear); 1790 __ j(condition, &return_left, Label::kNear);
1791 __ movp(left_reg, right_reg); 1791 __ movp(left_reg, right_reg);
1792 } else { 1792 } else {
(...skipping 3832 matching lines...) Expand 10 before | Expand all | Expand 10 after
5625 __ bind(deferred->exit()); 5625 __ bind(deferred->exit());
5626 __ bind(&done); 5626 __ bind(&done);
5627 } 5627 }
5628 5628
5629 #undef __ 5629 #undef __
5630 5630
5631 } // namespace internal 5631 } // namespace internal
5632 } // namespace v8 5632 } // namespace v8
5633 5633
5634 #endif // V8_TARGET_ARCH_X64 5634 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-495493.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698