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

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

Issue 18123003: Adds missing case in mips double comparison. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | « runtime/tools/benchmark.py ('k') | tests/standalone/standalone.status » ('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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 BranchInstr* branch) { 1606 BranchInstr* branch) {
1607 ASSERT(branch != NULL); 1607 ASSERT(branch != NULL);
1608 __ Comment("DoubleCompareBranch"); 1608 __ Comment("DoubleCompareBranch");
1609 assembler()->cund(left, right); 1609 assembler()->cund(left, right);
1610 BlockEntryInstr* nan_result = (true_condition == NE) ? 1610 BlockEntryInstr* nan_result = (true_condition == NE) ?
1611 branch->true_successor() : branch->false_successor(); 1611 branch->true_successor() : branch->false_successor();
1612 assembler()->bc1t(GetJumpLabel(nan_result)); 1612 assembler()->bc1t(GetJumpLabel(nan_result));
1613 1613
1614 switch (true_condition) { 1614 switch (true_condition) {
1615 case EQ: assembler()->ceqd(left, right); break; 1615 case EQ: assembler()->ceqd(left, right); break;
1616 case NE: assembler()->ceqd(left, right); break;
1616 case LT: assembler()->coltd(left, right); break; 1617 case LT: assembler()->coltd(left, right); break;
1617 case LE: assembler()->coled(left, right); break; 1618 case LE: assembler()->coled(left, right); break;
1618 case GT: assembler()->coltd(right, left); break; 1619 case GT: assembler()->coltd(right, left); break;
1619 case GE: assembler()->coled(right, left); break; 1620 case GE: assembler()->coled(right, left); break;
1620 default: { 1621 default: {
1621 // Should only passing the above conditions to this function. 1622 // Should only passing the above conditions to this function.
1622 UNREACHABLE(); 1623 UNREACHABLE();
1623 break; 1624 break;
1624 } 1625 }
1625 } 1626 }
1626 1627
1627 assembler()->LoadImmediate(TMP, 1); 1628 assembler()->LoadImmediate(TMP, 1);
1628 assembler()->movf(CMPRES, TMP); 1629 if (true_condition == NE) {
1629 assembler()->movt(CMPRES, ZR); 1630 assembler()->movf(CMPRES, ZR);
1631 assembler()->movt(CMPRES, TMP);
1632 } else {
1633 assembler()->movf(CMPRES, TMP);
1634 assembler()->movt(CMPRES, ZR);
1635 }
1630 assembler()->mov(TMP, ZR); 1636 assembler()->mov(TMP, ZR);
1631 1637
1632 // EmitBranchOnCondition expects ordering to be described by CMPRES, TMP1. 1638 // EmitBranchOnCondition expects ordering to be described by CMPRES, TMP1.
1633 branch->EmitBranchOnCondition(this, EQ); 1639 branch->EmitBranchOnCondition(this, EQ);
1634 } 1640 }
1635 1641
1636 1642
1637 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition, 1643 void FlowGraphCompiler::EmitDoubleCompareBool(Condition true_condition,
1638 FpuRegister left, 1644 FpuRegister left,
1639 FpuRegister right, 1645 FpuRegister right,
1640 Register result) { 1646 Register result) {
1641 Label done; 1647 Label done;
1642 __ Comment("DoubleCompareBool"); 1648 __ Comment("DoubleCompareBool");
1643 assembler()->LoadObject(result, Bool::False()); 1649 assembler()->LoadObject(result, Bool::False());
1644 assembler()->cund(left, right); 1650 assembler()->cund(left, right);
1645 assembler()->bc1t(&done); 1651 assembler()->bc1t(&done);
1646 1652
1647 switch (true_condition) { 1653 switch (true_condition) {
1648 case EQ: assembler()->ceqd(left, right); break; 1654 case EQ: assembler()->ceqd(left, right); break;
1655 case NE: assembler()->ceqd(left, right); break;
1649 case LT: assembler()->coltd(left, right); break; 1656 case LT: assembler()->coltd(left, right); break;
1650 case LE: assembler()->coled(left, right); break; 1657 case LE: assembler()->coled(left, right); break;
1651 case GT: assembler()->coltd(right, left); break; 1658 case GT: assembler()->coltd(right, left); break;
1652 case GE: assembler()->coled(right, left); break; 1659 case GE: assembler()->coled(right, left); break;
1653 default: { 1660 default: {
1654 // Should only passing the above conditions to this function. 1661 // Should only passing the above conditions to this function.
1655 UNREACHABLE(); 1662 UNREACHABLE();
1656 break; 1663 break;
1657 } 1664 }
1658 } 1665 }
1659 1666
1660 assembler()->bc1f(&done); // False is already in result. 1667 if (true_condition == NE) {
1668 assembler()->bc1t(&done); // False is already in result.
1669 } else {
1670 assembler()->bc1f(&done);
1671 }
1661 assembler()->LoadObject(result, Bool::True()); 1672 assembler()->LoadObject(result, Bool::True());
1662 assembler()->Bind(&done); 1673 assembler()->Bind(&done);
1663 } 1674 }
1664 1675
1665 1676
1666 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid, 1677 FieldAddress FlowGraphCompiler::ElementAddressForIntIndex(intptr_t cid,
1667 intptr_t index_scale, 1678 intptr_t index_scale,
1668 Register array, 1679 Register array,
1669 intptr_t index) { 1680 intptr_t index) {
1670 UNREACHABLE(); 1681 UNREACHABLE();
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1909 __ AddImmediate(SP, kDoubleSize); 1920 __ AddImmediate(SP, kDoubleSize);
1910 } 1921 }
1911 1922
1912 1923
1913 #undef __ 1924 #undef __
1914 1925
1915 1926
1916 } // namespace dart 1927 } // namespace dart
1917 1928
1918 #endif // defined TARGET_ARCH_MIPS 1929 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/tools/benchmark.py ('k') | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698