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

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

Issue 1343373003: Revert "VM: New calling convention for generated code." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.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_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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 6563 matching lines...) Expand 10 before | Expand all | Expand 10 after
6574 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); 6574 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
6575 6575
6576 summary->set_in(0, Location::RequiresRegister()); 6576 summary->set_in(0, Location::RequiresRegister());
6577 summary->set_temp(0, Location::RequiresRegister()); 6577 summary->set_temp(0, Location::RequiresRegister());
6578 6578
6579 return summary; 6579 return summary;
6580 } 6580 }
6581 6581
6582 6582
6583 void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6583 void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6584 Register target_reg = locs()->temp_slot(0)->reg(); 6584 Register target_address_reg = locs()->temp_slot(0)->reg();
6585 6585
6586 // Load code object from frame. 6586 // Load from [current frame pointer] + kPcMarkerSlotFromFp.
6587 __ movl(target_reg, Address(EBP, kPcMarkerSlotFromFp * kWordSize)); 6587 __ movl(target_address_reg, Address(EBP, kPcMarkerSlotFromFp * kWordSize));
6588 // Load instructions entry point.
6589 __ movl(target_reg, FieldAddress(target_reg, Code::entry_point_offset()));
6590 6588
6591 // Add the offset. 6589 // Add the offset.
6592 Register offset_reg = locs()->in(0).reg(); 6590 Register offset_reg = locs()->in(0).reg();
6593 if (offset()->definition()->representation() == kTagged) { 6591 if (offset()->definition()->representation() == kTagged) {
6594 __ SmiUntag(offset_reg); 6592 __ SmiUntag(offset_reg);
6595 } 6593 }
6596 __ addl(target_reg, offset_reg); 6594 __ addl(target_address_reg, offset_reg);
6597 6595
6598 // Jump to the absolute address. 6596 // Jump to the absolute address.
6599 __ jmp(target_reg); 6597 __ jmp(target_address_reg);
6600 } 6598 }
6601 6599
6602 6600
6603 LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone, 6601 LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone,
6604 bool opt) const { 6602 bool opt) const {
6605 const intptr_t kNumInputs = 2; 6603 const intptr_t kNumInputs = 2;
6606 const intptr_t kNumTemps = 0; 6604 const intptr_t kNumTemps = 0;
6607 if (needs_number_check()) { 6605 if (needs_number_check()) {
6608 LocationSummary* locs = new(zone) LocationSummary( 6606 LocationSummary* locs = new(zone) LocationSummary(
6609 zone, kNumInputs, kNumTemps, LocationSummary::kCall); 6607 zone, kNumInputs, kNumTemps, LocationSummary::kCall);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
6870 __ Drop(1); 6868 __ Drop(1);
6871 __ popl(result); 6869 __ popl(result);
6872 } 6870 }
6873 6871
6874 6872
6875 } // namespace dart 6873 } // namespace dart
6876 6874
6877 #undef __ 6875 #undef __
6878 6876
6879 #endif // defined TARGET_ARCH_IA32 6877 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698