| 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 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1470 __ j(if_smi ? ZERO : NOT_ZERO, label); | 1470 __ j(if_smi ? ZERO : NOT_ZERO, label); |
| 1471 } | 1471 } |
| 1472 | 1472 |
| 1473 | 1473 |
| 1474 void FlowGraphCompiler::EmitTestAndCallLoadCid() { | 1474 void FlowGraphCompiler::EmitTestAndCallLoadCid() { |
| 1475 __ LoadClassId(RDI, RAX); | 1475 __ LoadClassId(RDI, RAX); |
| 1476 } | 1476 } |
| 1477 | 1477 |
| 1478 | 1478 |
| 1479 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, | 1479 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, |
| 1480 const CidRangeTarget& target, | 1480 const CidRange& range, |
| 1481 int bias) { | 1481 int bias) { |
| 1482 intptr_t cid_start = target.cid_start; | 1482 intptr_t cid_start = range.cid_start; |
| 1483 intptr_t cid_end = target.cid_end; | 1483 intptr_t cid_end = range.cid_end; |
| 1484 if (cid_start == cid_end) { | 1484 if (cid_start == cid_end) { |
| 1485 __ cmpl(RDI, Immediate(cid_start - bias)); | 1485 __ cmpl(RDI, Immediate(cid_start - bias)); |
| 1486 __ j(NOT_EQUAL, next_label); | 1486 __ j(NOT_EQUAL, next_label); |
| 1487 } else { | 1487 } else { |
| 1488 __ addl(RDI, Immediate(bias - cid_start)); | 1488 __ addl(RDI, Immediate(bias - cid_start)); |
| 1489 bias = cid_start; | 1489 bias = cid_start; |
| 1490 __ cmpl(RDI, Immediate(cid_end - cid_start)); | 1490 __ cmpl(RDI, Immediate(cid_end - cid_start)); |
| 1491 __ j(ABOVE, next_label); // Unsigned higher. | 1491 __ j(ABOVE, next_label); // Unsigned higher. |
| 1492 } | 1492 } |
| 1493 return bias; | 1493 return bias; |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 __ movups(reg, Address(RSP, 0)); | 1724 __ movups(reg, Address(RSP, 0)); |
| 1725 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); | 1725 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); |
| 1726 } | 1726 } |
| 1727 | 1727 |
| 1728 | 1728 |
| 1729 #undef __ | 1729 #undef __ |
| 1730 | 1730 |
| 1731 } // namespace dart | 1731 } // namespace dart |
| 1732 | 1732 |
| 1733 #endif // defined TARGET_ARCH_X64 | 1733 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |