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/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 Loading... |
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_address_reg = locs()->temp_slot(0)->reg(); | 6584 Register target_reg = locs()->temp_slot(0)->reg(); |
6585 | 6585 |
6586 // Load from [current frame pointer] + kPcMarkerSlotFromFp. | 6586 // Load code object from frame. |
6587 __ movl(target_address_reg, Address(EBP, kPcMarkerSlotFromFp * kWordSize)); | 6587 __ movl(target_reg, Address(EBP, kPcMarkerSlotFromFp * kWordSize)); |
| 6588 // Load instructions entry point. |
| 6589 __ movl(target_reg, FieldAddress(target_reg, Code::entry_point_offset())); |
6588 | 6590 |
6589 // Add the offset. | 6591 // Add the offset. |
6590 Register offset_reg = locs()->in(0).reg(); | 6592 Register offset_reg = locs()->in(0).reg(); |
6591 if (offset()->definition()->representation() == kTagged) { | 6593 if (offset()->definition()->representation() == kTagged) { |
6592 __ SmiUntag(offset_reg); | 6594 __ SmiUntag(offset_reg); |
6593 } | 6595 } |
6594 __ addl(target_address_reg, offset_reg); | 6596 __ addl(target_reg, offset_reg); |
6595 | 6597 |
6596 // Jump to the absolute address. | 6598 // Jump to the absolute address. |
6597 __ jmp(target_address_reg); | 6599 __ jmp(target_reg); |
6598 } | 6600 } |
6599 | 6601 |
6600 | 6602 |
6601 LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone, | 6603 LocationSummary* StrictCompareInstr::MakeLocationSummary(Zone* zone, |
6602 bool opt) const { | 6604 bool opt) const { |
6603 const intptr_t kNumInputs = 2; | 6605 const intptr_t kNumInputs = 2; |
6604 const intptr_t kNumTemps = 0; | 6606 const intptr_t kNumTemps = 0; |
6605 if (needs_number_check()) { | 6607 if (needs_number_check()) { |
6606 LocationSummary* locs = new(zone) LocationSummary( | 6608 LocationSummary* locs = new(zone) LocationSummary( |
6607 zone, kNumInputs, kNumTemps, LocationSummary::kCall); | 6609 zone, kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6868 __ Drop(1); | 6870 __ Drop(1); |
6869 __ popl(result); | 6871 __ popl(result); |
6870 } | 6872 } |
6871 | 6873 |
6872 | 6874 |
6873 } // namespace dart | 6875 } // namespace dart |
6874 | 6876 |
6875 #undef __ | 6877 #undef __ |
6876 | 6878 |
6877 #endif // defined TARGET_ARCH_IA32 | 6879 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |