Chromium Code Reviews| Index: runtime/vm/intermediate_language_arm.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language_arm.cc (revision 39909) |
| +++ runtime/vm/intermediate_language_arm.cc (working copy) |
| @@ -63,7 +63,7 @@ |
| } else { |
| ASSERT(value.IsStackSlot()); |
| const intptr_t value_offset = value.ToStackSlotOffset(); |
| - __ LoadFromOffset(kWord, IP, FP, value_offset); |
| + __ LoadFromOffset(kWord, IP, value.base_reg(), value_offset); |
| __ Push(IP); |
| } |
| } |
| @@ -87,6 +87,13 @@ |
| void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| const Register result = locs()->in(0).reg(); |
| ASSERT(result == R0); |
| + |
| + if (compiler->intrinsic_mode()) { |
| + // Intrinsics don't have a frame. |
| + __ Ret(); |
| + return; |
| + } |
| + |
| #if defined(DEBUG) |
| Label stack_ok; |
| __ Comment("Stack Check"); |
| @@ -1837,10 +1844,12 @@ |
| public: |
| BoxAllocationSlowPath(Instruction* instruction, |
| const Class& cls, |
| - Register result) |
| + Register result, |
| + bool is_intrinsic) |
| : instruction_(instruction), |
| cls_(cls), |
| - result_(result) { } |
| + result_(result), |
| + is_intrinsic_(is_intrinsic) { } |
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) { |
| Isolate* isolate = compiler->isolate(); |
| @@ -1853,6 +1862,10 @@ |
| } |
| __ Bind(entry_label()); |
| + if (is_intrinsic_) { |
| + __ EnterStubFrame(true); |
| + } |
| + |
| const Code& stub = |
| Code::Handle(isolate, stub_code->GetAllocationStubForClass(cls_)); |
| const ExternalLabel label(stub.EntryPoint()); |
| @@ -1869,6 +1882,9 @@ |
| __ MoveRegister(result_, R0); |
| compiler->RestoreLiveRegisters(locs); |
| + if (is_intrinsic_) { |
| + __ LeaveStubFrame(); |
| + } |
| __ b(exit_label()); |
| } |
| @@ -1878,7 +1894,8 @@ |
| Register result, |
| Register temp) { |
| BoxAllocationSlowPath* slow_path = |
| - new BoxAllocationSlowPath(instruction, cls, result); |
| + new BoxAllocationSlowPath(instruction, cls, result, |
| + compiler->intrinsic_mode()); |
| compiler->AddSlowPathCode(slow_path); |
| __ TryAllocate(cls, |
| @@ -1892,6 +1909,7 @@ |
| Instruction* instruction_; |
| const Class& cls_; |
| Register result_; |
| + bool is_intrinsic_; |
|
srdjan
2014/09/08 17:34:07
const (also for result_)
Florian Schneider
2014/09/09 09:57:08
Done.
|
| }; |