diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-13 16:36:36 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-03-13 16:47:44 +0000 |
commit | a8ac9130b872c080299afacf5dcaab513d13ea87 (patch) | |
tree | 2bd0a2a88cbb6e7a3ae79dff84c466bed9189eb5 /compiler/optimizing/code_generator_arm64.cc | |
parent | cc22e3946baf035c8732e9417ab132bfe663aa45 (diff) | |
download | art-a8ac9130b872c080299afacf5dcaab513d13ea87.tar.gz art-a8ac9130b872c080299afacf5dcaab513d13ea87.tar.bz2 art-a8ac9130b872c080299afacf5dcaab513d13ea87.zip |
Refactor code in preparation of correct stack maps in slow path.
Move the logic of saving/restoring live registers in slow path
in the SlowPathCode method. Also add a RecordPcInfo helper to
SlowPathCode, that will act as the placeholder of saving correct
stack maps.
Change-Id: I25c2bc7a642ef854bbc8a3eb570e5c8c8d2d030c
Diffstat (limited to 'compiler/optimizing/code_generator_arm64.cc')
-rw-r--r-- | compiler/optimizing/code_generator_arm64.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index c21084a6fe..93c4ce52b3 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -191,7 +191,7 @@ class LoadClassSlowPathARM64 : public SlowPathCodeARM64 { CodeGeneratorARM64* arm64_codegen = down_cast<CodeGeneratorARM64*>(codegen); __ Bind(GetEntryLabel()); - codegen->SaveLiveRegisters(locations); + SaveLiveRegisters(codegen, locations); InvokeRuntimeCallingConvention calling_convention; __ Mov(calling_convention.GetRegisterAt(0).W(), cls_->GetTypeIndex()); @@ -213,7 +213,7 @@ class LoadClassSlowPathARM64 : public SlowPathCodeARM64 { arm64_codegen->MoveLocation(out, calling_convention.GetReturnLocation(type), type); } - codegen->RestoreLiveRegisters(locations); + RestoreLiveRegisters(codegen, locations); __ B(GetExitLabel()); } @@ -244,7 +244,7 @@ class LoadStringSlowPathARM64 : public SlowPathCodeARM64 { CodeGeneratorARM64* arm64_codegen = down_cast<CodeGeneratorARM64*>(codegen); __ Bind(GetEntryLabel()); - codegen->SaveLiveRegisters(locations); + SaveLiveRegisters(codegen, locations); InvokeRuntimeCallingConvention calling_convention; arm64_codegen->LoadCurrentMethod(calling_convention.GetRegisterAt(1).W()); @@ -255,7 +255,7 @@ class LoadStringSlowPathARM64 : public SlowPathCodeARM64 { Primitive::Type type = instruction_->GetType(); arm64_codegen->MoveLocation(locations->Out(), calling_convention.GetReturnLocation(type), type); - codegen->RestoreLiveRegisters(locations); + RestoreLiveRegisters(codegen, locations); __ B(GetExitLabel()); } @@ -292,11 +292,11 @@ class SuspendCheckSlowPathARM64 : public SlowPathCodeARM64 { void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { CodeGeneratorARM64* arm64_codegen = down_cast<CodeGeneratorARM64*>(codegen); __ Bind(GetEntryLabel()); - codegen->SaveLiveRegisters(instruction_->GetLocations()); + SaveLiveRegisters(codegen, instruction_->GetLocations()); arm64_codegen->InvokeRuntime( QUICK_ENTRY_POINT(pTestSuspend), instruction_, instruction_->GetDexPc()); CheckEntrypointTypes<kQuickTestSuspend, void, void>(); - codegen->RestoreLiveRegisters(instruction_->GetLocations()); + RestoreLiveRegisters(codegen, instruction_->GetLocations()); if (successor_ == nullptr) { __ B(GetReturnLabel()); } else { @@ -338,7 +338,7 @@ class TypeCheckSlowPathARM64 : public SlowPathCodeARM64 { CodeGeneratorARM64* arm64_codegen = down_cast<CodeGeneratorARM64*>(codegen); __ Bind(GetEntryLabel()); - codegen->SaveLiveRegisters(locations); + SaveLiveRegisters(codegen, locations); // We're moving two locations to locations that could overlap, so we need a parallel // move resolver. @@ -360,7 +360,7 @@ class TypeCheckSlowPathARM64 : public SlowPathCodeARM64 { CheckEntrypointTypes<kQuickCheckCast, void, const mirror::Class*, const mirror::Class*>(); } - codegen->RestoreLiveRegisters(locations); + RestoreLiveRegisters(codegen, locations); __ B(GetExitLabel()); } @@ -1920,7 +1920,6 @@ void CodeGeneratorARM64::GenerateStaticOrDirectCall(HInvokeStaticOrDirect* invok __ Bl(&frame_entry_label_); } - RecordPcInfo(invoke, invoke->GetDexPc()); DCHECK(!IsLeafMethod()); } @@ -1931,6 +1930,7 @@ void InstructionCodeGeneratorARM64::VisitInvokeStaticOrDirect(HInvokeStaticOrDir Register temp = WRegisterFrom(invoke->GetLocations()->GetTemp(0)); codegen_->GenerateStaticOrDirectCall(invoke, temp); + codegen_->RecordPcInfo(invoke, invoke->GetDexPc()); } void InstructionCodeGeneratorARM64::VisitInvokeVirtual(HInvokeVirtual* invoke) { |