OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 void FlowGraphCompiler::EmitTestAndCallLoadCid() { | 1480 void FlowGraphCompiler::EmitTestAndCallLoadCid() { |
1481 __ LoadClassId(R2, R0); | 1481 __ LoadClassId(R2, R0); |
1482 } | 1482 } |
1483 | 1483 |
1484 | 1484 |
1485 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, | 1485 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, |
1486 const CidRange& range, | 1486 const CidRange& range, |
1487 int bias) { | 1487 int bias) { |
1488 intptr_t cid_start = range.cid_start; | 1488 intptr_t cid_start = range.cid_start; |
1489 intptr_t cid_end = range.cid_end; | 1489 intptr_t cid_end = range.cid_end; |
1490 if (cid_start == cid_end) { | 1490 if (range.IsSingleCid()) { |
1491 __ CompareImmediate(R2, cid_start - bias); | 1491 __ CompareImmediate(R2, cid_start - bias); |
1492 __ b(next_label, NE); | 1492 __ b(next_label, NE); |
1493 } else { | 1493 } else { |
1494 __ AddImmediate(R2, bias - cid_start); | 1494 __ AddImmediate(R2, bias - cid_start); |
1495 bias = cid_start; | 1495 bias = cid_start; |
1496 __ CompareImmediate(R2, cid_end - cid_start); | 1496 __ CompareImmediate(R2, range.Extent()); |
1497 __ b(next_label, HI); // Unsigned higher. | 1497 __ b(next_label, HI); // Unsigned higher. |
1498 } | 1498 } |
1499 return bias; | 1499 return bias; |
1500 } | 1500 } |
1501 | 1501 |
1502 | 1502 |
1503 #undef __ | 1503 #undef __ |
1504 #define __ compiler_->assembler()-> | 1504 #define __ compiler_->assembler()-> |
1505 | 1505 |
1506 | 1506 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1772 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1772 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
1773 __ PopDouble(reg); | 1773 __ PopDouble(reg); |
1774 } | 1774 } |
1775 | 1775 |
1776 | 1776 |
1777 #undef __ | 1777 #undef __ |
1778 | 1778 |
1779 } // namespace dart | 1779 } // namespace dart |
1780 | 1780 |
1781 #endif // defined TARGET_ARCH_ARM64 | 1781 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |