Chromium Code Reviews| Index: vm/intermediate_language_x64.cc |
| =================================================================== |
| --- vm/intermediate_language_x64.cc (revision 7835) |
| +++ vm/intermediate_language_x64.cc (working copy) |
| @@ -139,12 +139,52 @@ |
| } |
| +LocationSummary* LoadLocalComp::MakeLocationSummary() { |
| + return MakeSimpleLocationSummary(0, Location::RequiresRegister()); |
| +} |
| + |
| + |
| +void LoadLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| + Register result = locs()->out().reg(); |
| + __ movq(result, Address(RBP, local().index() * kWordSize)); |
| +} |
| + |
| + |
| +LocationSummary* StoreLocalComp::MakeLocationSummary() { |
| + return MakeSimpleLocationSummary(1, Location::SameAsFirstInput()); |
| +} |
| + |
| + |
| +void StoreLocalComp::EmitNativeCode(FlowGraphCompiler* compiler) { |
| + Register value = locs()->in(0).reg(); |
| + Register result = locs()->out().reg(); |
| + ASSERT(result == value); |
|
Vyacheslav Egorov (Google)
2012/05/22 02:49:20
on an unrelated note: are we planning to break-dow
Florian Schneider
2012/05/22 06:33:08
This is just to assert the register allocation doe
srdjan
2012/05/22 16:50:32
Add comment?
Florian Schneider
2012/05/22 18:28:34
Done.
|
| + __ movq(Address(RBP, local().index() * kWordSize), value); |
| +} |
| + |
| + |
| void BindInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| computation()->EmitNativeCode(compiler); |
| __ pushq(locs()->out().reg()); |
| } |
| +LocationSummary* ConstantVal::MakeLocationSummary() { |
| + return MakeSimpleLocationSummary(0, Location::RequiresRegister()); |
| +} |
| + |
| + |
| +void ConstantVal::EmitNativeCode(FlowGraphCompiler* compiler) { |
| + Register result = locs()->out().reg(); |
| + if (value().IsSmi()) { |
| + int64_t imm = reinterpret_cast<int64_t>(value().raw()); |
| + __ movq(result, Immediate(imm)); |
| + } else { |
| + __ LoadObject(result, value()); |
| + } |
| +} |
| + |
| + |
| } // namespace dart |
| #undef __ |