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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
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 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1450 __ j(if_smi ? ZERO : NOT_ZERO, label); | 1450 __ j(if_smi ? ZERO : NOT_ZERO, label); |
1451 } | 1451 } |
1452 | 1452 |
1453 | 1453 |
1454 void FlowGraphCompiler::EmitTestAndCallLoadCid() { | 1454 void FlowGraphCompiler::EmitTestAndCallLoadCid() { |
1455 __ LoadClassId(EDI, EAX); | 1455 __ LoadClassId(EDI, EAX); |
1456 } | 1456 } |
1457 | 1457 |
1458 | 1458 |
1459 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, | 1459 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, |
1460 const CidRangeTarget& target, | 1460 const CidRange& range, |
1461 int bias) { | 1461 int bias) { |
1462 intptr_t cid_start = target.cid_start; | 1462 intptr_t cid_start = range.cid_start; |
1463 intptr_t cid_end = target.cid_end; | 1463 intptr_t cid_end = range.cid_end; |
1464 if (cid_start == cid_end) { | 1464 if (cid_start == cid_end) { |
1465 __ cmpl(EDI, Immediate(cid_start - bias)); | 1465 __ cmpl(EDI, Immediate(cid_start - bias)); |
1466 __ j(NOT_EQUAL, next_label); | 1466 __ j(NOT_EQUAL, next_label); |
1467 } else { | 1467 } else { |
1468 __ addl(EDI, Immediate(bias - cid_start)); | 1468 __ addl(EDI, Immediate(bias - cid_start)); |
1469 bias = cid_start; | 1469 bias = cid_start; |
1470 __ cmpl(EDI, Immediate(cid_end - cid_start)); | 1470 __ cmpl(EDI, Immediate(cid_end - cid_start)); |
1471 __ j(ABOVE, next_label); // Unsigned higher. | 1471 __ j(ABOVE, next_label); // Unsigned higher. |
1472 } | 1472 } |
1473 return bias; | 1473 return bias; |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1733 __ movups(reg, Address(ESP, 0)); | 1733 __ movups(reg, Address(ESP, 0)); |
1734 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1734 __ addl(ESP, Immediate(kFpuRegisterSize)); |
1735 } | 1735 } |
1736 | 1736 |
1737 | 1737 |
1738 #undef __ | 1738 #undef __ |
1739 | 1739 |
1740 } // namespace dart | 1740 } // namespace dart |
1741 | 1741 |
1742 #endif // defined TARGET_ARCH_IA32 | 1742 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |