| OLD | NEW |
| 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 "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 } | 1551 } |
| 1552 } | 1552 } |
| 1553 | 1553 |
| 1554 | 1554 |
| 1555 void FlowGraphCompiler::EmitTestAndCallLoadCid() { | 1555 void FlowGraphCompiler::EmitTestAndCallLoadCid() { |
| 1556 __ LoadClassId(T2, T0); | 1556 __ LoadClassId(T2, T0); |
| 1557 } | 1557 } |
| 1558 | 1558 |
| 1559 | 1559 |
| 1560 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, | 1560 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, |
| 1561 const CidRangeTarget& target, | 1561 const CidRange& range, |
| 1562 int bias) { | 1562 int bias) { |
| 1563 intptr_t cid_start = target.cid_start; | 1563 intptr_t cid_start = range.cid_start; |
| 1564 intptr_t cid_end = target.cid_end; | 1564 intptr_t cid_end = range.cid_end; |
| 1565 if (cid_start == cid_end) { | 1565 if (cid_start == cid_end) { |
| 1566 __ BranchNotEqual(T2, Immediate(cid_start - bias), next_label); | 1566 __ BranchNotEqual(T2, Immediate(cid_start - bias), next_label); |
| 1567 } else { | 1567 } else { |
| 1568 __ AddImmediate(T2, T2, bias - cid_start); | 1568 __ AddImmediate(T2, T2, bias - cid_start); |
| 1569 bias = cid_start; | 1569 bias = cid_start; |
| 1570 // TODO(erikcorry): We should use sltiu instead of the temporary TMP if | 1570 // TODO(erikcorry): We should use sltiu instead of the temporary TMP if |
| 1571 // the range is small enough. | 1571 // the range is small enough. |
| 1572 __ LoadImmediate(TMP, cid_end - cid_end); | 1572 __ LoadImmediate(TMP, cid_end - cid_end); |
| 1573 // Reverse comparison so we get 1 if biased cid > tmp ie cid is out of | 1573 // Reverse comparison so we get 1 if biased cid > tmp ie cid is out of |
| 1574 // range. | 1574 // range. |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 __ AddImmediate(SP, kDoubleSize); | 1815 __ AddImmediate(SP, kDoubleSize); |
| 1816 } | 1816 } |
| 1817 | 1817 |
| 1818 | 1818 |
| 1819 #undef __ | 1819 #undef __ |
| 1820 | 1820 |
| 1821 | 1821 |
| 1822 } // namespace dart | 1822 } // namespace dart |
| 1823 | 1823 |
| 1824 #endif // defined TARGET_ARCH_MIPS | 1824 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |