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

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

Issue 10800037: New linear scan allocator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 456 }
457 EmitGenericEqualityCompare(compiler, this); 457 EmitGenericEqualityCompare(compiler, this);
458 } 458 }
459 459
460 460
461 LocationSummary* RelationalOpComp::MakeLocationSummary() const { 461 LocationSummary* RelationalOpComp::MakeLocationSummary() const {
462 if (operands_class_id() == kSmi || operands_class_id() == kDouble) { 462 if (operands_class_id() == kSmi || operands_class_id() == kDouble) {
463 const intptr_t kNumInputs = 2; 463 const intptr_t kNumInputs = 2;
464 const intptr_t kNumTemps = 1; 464 const intptr_t kNumTemps = 1;
465 LocationSummary* summary = new LocationSummary(kNumInputs, 465 LocationSummary* summary = new LocationSummary(kNumInputs,
466 kNumTemps, 466 kNumTemps);
467 LocationSummary::kCall);
468 summary->set_in(0, Location::RequiresRegister()); 467 summary->set_in(0, Location::RequiresRegister());
469 summary->set_in(1, Location::RequiresRegister()); 468 summary->set_in(1, Location::RequiresRegister());
470 if (!is_fused_with_branch()) { 469 if (!is_fused_with_branch()) {
471 summary->set_out(Location::RequiresRegister()); 470 summary->set_out(Location::RequiresRegister());
472 } 471 }
473 summary->set_temp(0, Location::RequiresRegister()); 472 summary->set_temp(0, Location::RequiresRegister());
474 return summary; 473 return summary;
475 } 474 }
476 ASSERT(!is_fused_with_branch()); 475 ASSERT(!is_fused_with_branch());
477 ASSERT(operands_class_id() == kObject); 476 ASSERT(operands_class_id() == kObject);
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 } 1364 }
1366 1365
1367 1366
1368 LocationSummary* CheckStackOverflowComp::MakeLocationSummary() const { 1367 LocationSummary* CheckStackOverflowComp::MakeLocationSummary() const {
1369 const intptr_t kNumInputs = 0; 1368 const intptr_t kNumInputs = 0;
1370 const intptr_t kNumTemps = 1; 1369 const intptr_t kNumTemps = 1;
1371 // TODO(vegorov): spilling is required only on an infrequently executed path. 1370 // TODO(vegorov): spilling is required only on an infrequently executed path.
1372 LocationSummary* summary = new LocationSummary(kNumInputs, 1371 LocationSummary* summary = new LocationSummary(kNumInputs,
1373 kNumTemps, 1372 kNumTemps,
1374 LocationSummary::kCall); 1373 LocationSummary::kCall);
1375 summary->set_temp(0, Location::RequiresRegister()); 1374 summary->set_temp(0, Location::RegisterLocation(R10));
srdjan 2012/07/19 22:54:39 Document why R10.
Vyacheslav Egorov (Google) 2012/07/24 12:26:41 Done.
1376 return summary; 1375 return summary;
1377 } 1376 }
1378 1377
1379 1378
1380 void CheckStackOverflowComp::EmitNativeCode(FlowGraphCompiler* compiler) { 1379 void CheckStackOverflowComp::EmitNativeCode(FlowGraphCompiler* compiler) {
1381 Register temp = locs()->temp(0).reg(); 1380 Register temp = locs()->temp(0).reg();
1382 // Generate stack overflow check. 1381 // Generate stack overflow check.
1383 __ movq(temp, Immediate(Isolate::Current()->stack_limit_address())); 1382 __ movq(temp, Immediate(Isolate::Current()->stack_limit_address()));
1384 __ cmpq(RSP, Address(temp, 0)); 1383 __ cmpq(RSP, Address(temp, 0));
1385 Label no_stack_overflow; 1384 Label no_stack_overflow;
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 } 1978 }
1980 __ Bind(&done); 1979 __ Bind(&done);
1981 } 1980 }
1982 1981
1983 1982
1984 } // namespace dart 1983 } // namespace dart
1985 1984
1986 #undef __ 1985 #undef __
1987 1986
1988 #endif // defined TARGET_ARCH_X64 1987 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698