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

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

Issue 46883008: ia32: Fix comparisons of two constant double operands when exactly one of them is in new space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | test/mjsunit/regress/regress-compare-constant-doubles.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 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 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 ASSERT(instr->right()->representation().Equals(r)); 1721 ASSERT(instr->right()->representation().Equals(r));
1722 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1722 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1723 LOperand* right = UseOrConstantAtStart(instr->right()); 1723 LOperand* right = UseOrConstantAtStart(instr->right());
1724 return new(zone()) LCompareNumericAndBranch(left, right); 1724 return new(zone()) LCompareNumericAndBranch(left, right);
1725 } else { 1725 } else {
1726 ASSERT(r.IsDouble()); 1726 ASSERT(r.IsDouble());
1727 ASSERT(instr->left()->representation().IsDouble()); 1727 ASSERT(instr->left()->representation().IsDouble());
1728 ASSERT(instr->right()->representation().IsDouble()); 1728 ASSERT(instr->right()->representation().IsDouble());
1729 LOperand* left; 1729 LOperand* left;
1730 LOperand* right; 1730 LOperand* right;
1731 if (instr->left()->IsConstant() && instr->right()->IsConstant()) { 1731 if (CanBeImmediateConstant(instr->left()) &&
1732 left = UseRegisterOrConstantAtStart(instr->left()); 1732 CanBeImmediateConstant(instr->right())) {
1733 right = UseRegisterOrConstantAtStart(instr->right()); 1733 // The code generator requires either both inputs to be constant
1734 // operands, or neither.
1735 left = UseConstant(instr->left());
1736 right = UseConstant(instr->right());
1734 } else { 1737 } else {
1735 left = UseRegisterAtStart(instr->left()); 1738 left = UseRegisterAtStart(instr->left());
1736 right = UseRegisterAtStart(instr->right()); 1739 right = UseRegisterAtStart(instr->right());
1737 } 1740 }
1738 return new(zone()) LCompareNumericAndBranch(left, right); 1741 return new(zone()) LCompareNumericAndBranch(left, right);
1739 } 1742 }
1740 } 1743 }
1741 1744
1742 1745
1743 LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch( 1746 LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2732 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2735 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2733 LOperand* object = UseRegister(instr->object()); 2736 LOperand* object = UseRegister(instr->object());
2734 LOperand* index = UseTempRegister(instr->index()); 2737 LOperand* index = UseTempRegister(instr->index());
2735 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2738 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2736 } 2739 }
2737 2740
2738 2741
2739 } } // namespace v8::internal 2742 } } // namespace v8::internal
2740 2743
2741 #endif // V8_TARGET_ARCH_IA32 2744 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-compare-constant-doubles.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698