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

Side by Side Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 62443002: VM: Fix double comparisons using != and NaN in optimized code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | runtime/vm/flow_graph_compiler_ia32.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition, 1618 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition,
1619 FpuRegister left, 1619 FpuRegister left,
1620 FpuRegister right, 1620 FpuRegister right,
1621 Register result) { 1621 Register result) {
1622 DRegister dleft = EvenDRegisterOf(left); 1622 DRegister dleft = EvenDRegisterOf(left);
1623 DRegister dright = EvenDRegisterOf(right); 1623 DRegister dright = EvenDRegisterOf(right);
1624 assembler()->vcmpd(dleft, dright); 1624 assembler()->vcmpd(dleft, dright);
1625 assembler()->vmstat(); 1625 assembler()->vmstat();
1626 assembler()->LoadObject(result, Bool::False()); 1626 assembler()->LoadObject(result, Bool::False());
1627 Label done; 1627 Label done;
1628 assembler()->b(&done, VS); // NaN -> false. 1628 if (true_condition != NE) {
1629 assembler()->b(&done, VS); // x == NaN -> false, x != NaN -> true.
1630 }
1629 assembler()->LoadObject(result, Bool::True(), true_condition); 1631 assembler()->LoadObject(result, Bool::True(), true_condition);
1630 assembler()->Bind(&done); 1632 assembler()->Bind(&done);
1631 } 1633 }
1632 1634
1633 1635
1634 // Do not implement or use this function. 1636 // Do not implement or use this function.
1635 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid, 1637 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
1636 intptr_t index_scale, 1638 intptr_t index_scale,
1637 Register array, 1639 Register array,
1638 intptr_t index) { 1640 intptr_t index) {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 DRegister dreg = EvenDRegisterOf(reg); 1907 DRegister dreg = EvenDRegisterOf(reg);
1906 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1908 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1907 } 1909 }
1908 1910
1909 1911
1910 #undef __ 1912 #undef __
1911 1913
1912 } // namespace dart 1914 } // namespace dart
1913 1915
1914 #endif // defined TARGET_ARCH_ARM 1916 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698