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

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

Issue 994533004: Contribution of PowerPC port (continuation of 422063005) - uplevel (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/ppc/full-codegen-ppc.cc ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/lithium-codegen-ppc.cc
diff --git a/src/ppc/lithium-codegen-ppc.cc b/src/ppc/lithium-codegen-ppc.cc
index e7b2ac55115ac7687dfa97e249b381db0d0f3f43..706ab20520a06355ef307f8b6a0996137d52b3fb 100644
--- a/src/ppc/lithium-codegen-ppc.cc
+++ b/src/ppc/lithium-codegen-ppc.cc
@@ -337,49 +337,37 @@ bool LCodeGen::GenerateJumpTable() {
if (table_entry->needs_frame) {
DCHECK(!info()->saves_caller_doubles());
- if (needs_frame.is_bound()) {
- __ b(&needs_frame);
- } else {
- __ bind(&needs_frame);
- Comment(";;; call deopt with frame");
- // 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.
- DCHECK(info()->IsStub());
- __ LoadSmiLiteral(ip, Smi::FromInt(StackFrame::STUB));
- __ PushFixedFrame(ip);
- __ addi(fp, sp,
- Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
- __ bind(&call_deopt_entry);
- // Add the base address to the offset previously loaded in
- // entry_offset.
- __ mov(ip, Operand(ExternalReference::ForDeoptEntry(base)));
- __ add(ip, entry_offset, ip);
- __ Call(ip);
- }
+ Comment(";;; call deopt with frame");
+ __ PushFixedFrame();
+ __ b(&needs_frame, SetLK);
} else {
- // The last entry can fall through into `call_deopt_entry`, avoiding a
- // branch.
- bool need_branch = ((i + 1) != length) || call_deopt_entry.is_bound();
-
- if (need_branch) __ b(&call_deopt_entry);
+ __ b(&call_deopt_entry, SetLK);
}
}
- if (!call_deopt_entry.is_bound()) {
- Comment(";;; call deopt");
- __ bind(&call_deopt_entry);
+ if (needs_frame.is_linked()) {
+ __ bind(&needs_frame);
+ // 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.
+ DCHECK(info()->IsStub());
+ __ LoadSmiLiteral(ip, Smi::FromInt(StackFrame::STUB));
+ __ push(ip);
+ __ addi(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
+ }
- if (info()->saves_caller_doubles()) {
- DCHECK(info()->IsStub());
- RestoreCallerDoubles();
- }
+ Comment(";;; call deopt");
+ __ bind(&call_deopt_entry);
- // Add the base address to the offset previously loaded in entry_offset.
- __ mov(ip, Operand(ExternalReference::ForDeoptEntry(base)));
- __ add(ip, entry_offset, ip);
- __ Call(ip);
+ if (info()->saves_caller_doubles()) {
+ DCHECK(info()->IsStub());
+ RestoreCallerDoubles();
}
+
+ // Add the base address to the offset previously loaded in entry_offset.
+ __ mov(ip, Operand(ExternalReference::ForDeoptEntry(base)));
+ __ add(ip, entry_offset, ip);
+ __ Jump(ip);
}
// The deoptimization jump table is the last part of the instruction
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698