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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1469 | 1469 |
1470 void FlowGraphCompiler::EmitTestAndCallLoadCid() { | 1470 void FlowGraphCompiler::EmitTestAndCallLoadCid() { |
1471 __ LoadClassId(RDI, RAX); | 1471 __ LoadClassId(RDI, RAX); |
1472 } | 1472 } |
1473 | 1473 |
1474 | 1474 |
1475 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, | 1475 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, |
1476 const CidRange& range, | 1476 const CidRange& range, |
1477 int bias) { | 1477 int bias) { |
1478 intptr_t cid_start = range.cid_start; | 1478 intptr_t cid_start = range.cid_start; |
1479 intptr_t cid_end = range.cid_end; | |
1480 if (range.IsSingleCid()) { | 1479 if (range.IsSingleCid()) { |
1481 __ cmpl(RDI, Immediate(cid_start - bias)); | 1480 __ cmpl(RDI, Immediate(cid_start - bias)); |
1482 __ j(NOT_EQUAL, next_label); | 1481 __ j(NOT_EQUAL, next_label); |
1483 } else { | 1482 } else { |
1484 __ addl(RDI, Immediate(bias - cid_start)); | 1483 __ addl(RDI, Immediate(bias - cid_start)); |
1485 bias = cid_start; | 1484 bias = cid_start; |
1486 __ cmpl(RDI, Immediate(range.Extent())); | 1485 __ cmpl(RDI, Immediate(range.Extent())); |
1487 __ j(ABOVE, next_label); // Unsigned higher. | 1486 __ j(ABOVE, next_label); // Unsigned higher. |
1488 } | 1487 } |
1489 return bias; | 1488 return bias; |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 __ movups(reg, Address(RSP, 0)); | 1719 __ movups(reg, Address(RSP, 0)); |
1721 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); | 1720 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); |
1722 } | 1721 } |
1723 | 1722 |
1724 | 1723 |
1725 #undef __ | 1724 #undef __ |
1726 | 1725 |
1727 } // namespace dart | 1726 } // namespace dart |
1728 | 1727 |
1729 #endif // defined TARGET_ARCH_X64 | 1728 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |