Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: src/arm64/lithium-codegen-arm64.h

Issue 209933003: ARM64: push/pop registers in stubs for safepoints (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review fix Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/lithium-codegen-arm64.h
diff --git a/src/arm64/lithium-codegen-arm64.h b/src/arm64/lithium-codegen-arm64.h
index f4213051870e05e2f2589c07d2a2ae629dcd61a5..d98e89ca180aeaa79d027d8021f5b5257d858d50 100644
--- a/src/arm64/lithium-codegen-arm64.h
+++ b/src/arm64/lithium-codegen-arm64.h
@@ -377,14 +377,23 @@ class LCodeGen: public LCodeGenBase {
ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple);
codegen_->expected_safepoint_kind_ = kind;
+ UseScratchRegisterScope temps(codegen_->masm_);
+ // Preserve the value of lr which must be saved on the stack (the call to
+ // the stub will clobber it).
+ Register to_be_pushed_lr =
+ temps.UnsafeAcquire(StoreRegistersStateStub::to_be_pushed_lr());
+ codegen_->masm_->Mov(to_be_pushed_lr, lr);
switch (codegen_->expected_safepoint_kind_) {
- case Safepoint::kWithRegisters:
- codegen_->masm_->PushSafepointRegisters();
+ case Safepoint::kWithRegisters: {
+ StoreRegistersStateStub stub(kDontSaveFPRegs);
+ codegen_->masm_->CallStub(&stub);
break;
- case Safepoint::kWithRegistersAndDoubles:
- codegen_->masm_->PushSafepointRegisters();
- codegen_->masm_->PushSafepointFPRegisters();
+ }
+ case Safepoint::kWithRegistersAndDoubles: {
+ StoreRegistersStateStub stub(kSaveFPRegs);
+ codegen_->masm_->CallStub(&stub);
break;
+ }
default:
UNREACHABLE();
}
@@ -394,13 +403,16 @@ class LCodeGen: public LCodeGenBase {
Safepoint::Kind kind = codegen_->expected_safepoint_kind_;
ASSERT((kind & Safepoint::kWithRegisters) != 0);
switch (kind) {
- case Safepoint::kWithRegisters:
- codegen_->masm_->PopSafepointRegisters();
+ case Safepoint::kWithRegisters: {
+ RestoreRegistersStateStub stub(kDontSaveFPRegs);
+ codegen_->masm_->CallStub(&stub);
break;
- case Safepoint::kWithRegistersAndDoubles:
- codegen_->masm_->PopSafepointFPRegisters();
- codegen_->masm_->PopSafepointRegisters();
+ }
+ case Safepoint::kWithRegistersAndDoubles: {
+ RestoreRegistersStateStub stub(kSaveFPRegs);
+ codegen_->masm_->CallStub(&stub);
break;
+ }
default:
UNREACHABLE();
}
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698