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
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc
index c73f092..2064b18 100644
--- a/compiler/optimizing/intrinsics_x86_64.cc
+++ b/compiler/optimizing/intrinsics_x86_64.cc
@@ -134,12 +134,13 @@
CodeGeneratorX86_64* codegen = down_cast<CodeGeneratorX86_64*>(codegen_in);
__ Bind(GetEntryLabel());
- codegen->SaveLiveRegisters(invoke_->GetLocations());
+ SaveLiveRegisters(codegen, invoke_->GetLocations());
MoveArguments(invoke_, codegen->GetGraph()->GetArena(), codegen);
if (invoke_->IsInvokeStaticOrDirect()) {
codegen->GenerateStaticOrDirectCall(invoke_->AsInvokeStaticOrDirect(), CpuRegister(RDI));
+ RecordPcInfo(codegen, invoke_, invoke_->GetDexPc());
} else {
UNIMPLEMENTED(FATAL) << "Non-direct intrinsic slow-path not yet implemented";
UNREACHABLE();
@@ -153,7 +154,7 @@
MoveFromReturnRegister(out, invoke_->GetType(), codegen);
}
- codegen->RestoreLiveRegisters(invoke_->GetLocations());
+ RestoreLiveRegisters(codegen, invoke_->GetLocations());
__ jmp(GetExitLabel());
}