Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: runtime/vm/flow_graph_compiler_x64.cc

Issue 2891713002: Cleanup: Make CheckClassId instruction more general so it (Closed)
Patch Set: Feedback from Martin Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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; 1479 intptr_t cid_end = range.cid_end;
1480 if (cid_start == cid_end) { 1480 if (range.IsSingleCid()) {
1481 __ cmpl(RDI, Immediate(cid_start - bias)); 1481 __ cmpl(RDI, Immediate(cid_start - bias));
1482 __ j(NOT_EQUAL, next_label); 1482 __ j(NOT_EQUAL, next_label);
1483 } else { 1483 } else {
1484 __ addl(RDI, Immediate(bias - cid_start)); 1484 __ addl(RDI, Immediate(bias - cid_start));
1485 bias = cid_start; 1485 bias = cid_start;
1486 __ cmpl(RDI, Immediate(cid_end - cid_start)); 1486 __ cmpl(RDI, Immediate(range.Extent()));
1487 __ j(ABOVE, next_label); // Unsigned higher. 1487 __ j(ABOVE, next_label); // Unsigned higher.
1488 } 1488 }
1489 return bias; 1489 return bias;
1490 } 1490 }
1491 1491
1492 1492
1493 #undef __ 1493 #undef __
1494 #define __ compiler_->assembler()-> 1494 #define __ compiler_->assembler()->
1495 1495
1496 1496
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 __ movups(reg, Address(RSP, 0)); 1720 __ movups(reg, Address(RSP, 0));
1721 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); 1721 __ AddImmediate(RSP, Immediate(kFpuRegisterSize));
1722 } 1722 }
1723 1723
1724 1724
1725 #undef __ 1725 #undef __
1726 1726
1727 } // namespace dart 1727 } // namespace dart
1728 1728
1729 #endif // defined TARGET_ARCH_X64 1729 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698