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

Unified Diff: src/a64/lithium-codegen-a64.cc

Issue 164793003: A64: Use a scope utility to allocate scratch registers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. 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/a64/ic-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-codegen-a64.cc
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
index 6236eb92f8fd9931a9efed3d88201736558a3dda..ea826d6ffa53c6158675fcc3f6860dae6e75bceb 100644
--- a/src/a64/lithium-codegen-a64.cc
+++ b/src/a64/lithium-codegen-a64.cc
@@ -845,7 +845,13 @@ bool LCodeGen::GenerateDeoptJumpTable() {
}
if (deopt_jump_table_[i].needs_frame) {
ASSERT(!info()->saves_caller_doubles());
- __ Mov(__ Tmp0(), Operand(ExternalReference::ForDeoptEntry(entry)));
+
+ UseScratchRegisterScope temps(masm());
+ Register stub_deopt_entry = temps.AcquireX();
+ Register stub_marker = temps.AcquireX();
+
+ __ Mov(stub_deopt_entry,
+ Operand(ExternalReference::ForDeoptEntry(entry)));
if (needs_frame.is_bound()) {
__ B(&needs_frame);
} else {
@@ -853,12 +859,11 @@ bool LCodeGen::GenerateDeoptJumpTable() {
// This variant of deopt can only be used with stubs. Since we don't
// have a function pointer to install in the stack frame that we're
// building, install a special marker there instead.
- // TODO(jochen): Revisit the use of TmpX().
ASSERT(info()->IsStub());
- __ Mov(__ Tmp1(), Operand(Smi::FromInt(StackFrame::STUB)));
- __ Push(lr, fp, cp, __ Tmp1());
+ __ Mov(stub_marker, Operand(Smi::FromInt(StackFrame::STUB)));
+ __ Push(lr, fp, cp, stub_marker);
__ Add(fp, __ StackPointer(), 2 * kPointerSize);
- __ Call(__ Tmp0());
+ __ Call(stub_deopt_entry);
}
} else {
if (info()->saves_caller_doubles()) {
« no previous file with comments | « src/a64/ic-a64.cc ('k') | src/a64/macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698