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

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

Issue 62133002: Cleanup of branch code generation (no change in functionality). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased 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 | « runtime/vm/flow_graph_compiler.h ('k') | 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 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 __ Drop(argument_count); 1592 __ Drop(argument_count);
1593 if (!is_last_check) { 1593 if (!is_last_check) {
1594 assembler()->b(&match_found); 1594 assembler()->b(&match_found);
1595 } 1595 }
1596 assembler()->Bind(&next_test); 1596 assembler()->Bind(&next_test);
1597 } 1597 }
1598 assembler()->Bind(&match_found); 1598 assembler()->Bind(&match_found);
1599 } 1599 }
1600 1600
1601 1601
1602 void FlowGraphCompiler::EmitDoubleCompareBranch(Condition true_condition,
1603 FpuRegister left,
1604 FpuRegister right,
1605 BranchInstr* branch) {
1606 ASSERT(branch != NULL);
1607 DRegister dleft = EvenDRegisterOf(left);
1608 DRegister dright = EvenDRegisterOf(right);
1609 assembler()->vcmpd(dleft, dright);
1610 assembler()->vmstat();
1611 BlockEntryInstr* nan_result = (true_condition == NE) ?
1612 branch->true_successor() : branch->false_successor();
1613 assembler()->b(GetJumpLabel(nan_result), VS);
1614 branch->EmitBranchOnCondition(this, true_condition);
1615 }
1616
1617
1618 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition,
1619 FpuRegister left,
1620 FpuRegister right,
1621 Register result) {
1622 DRegister dleft = EvenDRegisterOf(left);
1623 DRegister dright = EvenDRegisterOf(right);
1624 assembler()->vcmpd(dleft, dright);
1625 assembler()->vmstat();
1626 assembler()->LoadObject(result, Bool::False());
1627 Label done;
1628 if (true_condition != NE) {
1629 assembler()->b(&done, VS); // x == NaN -> false, x != NaN -> true.
1630 }
1631 assembler()->LoadObject(result, Bool::True(), true_condition);
1632 assembler()->Bind(&done);
1633 }
1634
1635
1636 // Do not implement or use this function. 1602 // Do not implement or use this function.
1637 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid, 1603 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
1638 intptr_t index_scale, 1604 intptr_t index_scale,
1639 Register array, 1605 Register array,
1640 intptr_t index) { 1606 intptr_t index) {
1641 UNREACHABLE(); 1607 UNREACHABLE();
1642 return FieldAddress(array, index); 1608 return FieldAddress(array, index);
1643 } 1609 }
1644 1610
1645 1611
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 DRegister dreg = EvenDRegisterOf(reg); 1873 DRegister dreg = EvenDRegisterOf(reg);
1908 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex)); 1874 __ vldrd(dreg, Address(SP, kDoubleSize, Address::PostIndex));
1909 } 1875 }
1910 1876
1911 1877
1912 #undef __ 1878 #undef __
1913 1879
1914 } // namespace dart 1880 } // namespace dart
1915 1881
1916 #endif // defined TARGET_ARCH_ARM 1882 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698