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 void FlowGraphCompiler::EmitTestAndCallLoadCid() { | 1450 void FlowGraphCompiler::EmitTestAndCallLoadCid() { |
1451 __ LoadClassId(EDI, EAX); | 1451 __ LoadClassId(EDI, EAX); |
1452 } | 1452 } |
1453 | 1453 |
1454 | 1454 |
1455 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, | 1455 int FlowGraphCompiler::EmitTestAndCallCheckCid(Label* next_label, |
1456 const CidRange& range, | 1456 const CidRange& range, |
1457 int bias) { | 1457 int bias) { |
1458 intptr_t cid_start = range.cid_start; | 1458 intptr_t cid_start = range.cid_start; |
1459 intptr_t cid_end = range.cid_end; | 1459 intptr_t cid_end = range.cid_end; |
1460 if (cid_start == cid_end) { | 1460 if (range.IsSingleCid()) { |
1461 __ cmpl(EDI, Immediate(cid_start - bias)); | 1461 __ cmpl(EDI, Immediate(cid_start - bias)); |
1462 __ j(NOT_EQUAL, next_label); | 1462 __ j(NOT_EQUAL, next_label); |
1463 } else { | 1463 } else { |
1464 __ addl(EDI, Immediate(bias - cid_start)); | 1464 __ addl(EDI, Immediate(bias - cid_start)); |
1465 bias = cid_start; | 1465 bias = cid_start; |
1466 __ cmpl(EDI, Immediate(cid_end - cid_start)); | 1466 __ cmpl(EDI, Immediate(range.Extent())); |
1467 __ j(ABOVE, next_label); // Unsigned higher. | 1467 __ j(ABOVE, next_label); // Unsigned higher. |
1468 } | 1468 } |
1469 return bias; | 1469 return bias; |
1470 } | 1470 } |
1471 | 1471 |
1472 | 1472 |
1473 #undef __ | 1473 #undef __ |
1474 #define __ compiler_->assembler()-> | 1474 #define __ compiler_->assembler()-> |
1475 | 1475 |
1476 | 1476 |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 __ movups(reg, Address(ESP, 0)); | 1729 __ movups(reg, Address(ESP, 0)); |
1730 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1730 __ addl(ESP, Immediate(kFpuRegisterSize)); |
1731 } | 1731 } |
1732 | 1732 |
1733 | 1733 |
1734 #undef __ | 1734 #undef __ |
1735 | 1735 |
1736 } // namespace dart | 1736 } // namespace dart |
1737 | 1737 |
1738 #endif // defined TARGET_ARCH_IA32 | 1738 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |