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

Unified Diff: src/ppc/macro-assembler-ppc.cc

Issue 1035533004: PPC: Switch full-codegen from StackHandlers to handler table. (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/macro-assembler-ppc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/macro-assembler-ppc.cc
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc
index 60971096f00ca2f5ec5abb91a2c9e93ef21bc271..2f56d39c927a05c945b2070c709139456d92f9c4 100644
--- a/src/ppc/macro-assembler-ppc.cc
+++ b/src/ppc/macro-assembler-ppc.cc
@@ -1086,41 +1086,28 @@ void MacroAssembler::DebugBreak() {
}
-void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
- int handler_index) {
+void MacroAssembler::PushStackHandler() {
// Adjust this code if not the case.
- STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize);
+ STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
- STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
- STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
-
- // For the JSEntry handler, we must preserve r1-r7, r0,r8-r12 are available.
- // We want the stack to look like
- // sp -> NextOffset
- // index
- // context
// Link the current handler as the next handler.
+ // Preserve r3-r7.
mov(r8, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
LoadP(r0, MemOperand(r8));
- StorePU(r0, MemOperand(sp, -StackHandlerConstants::kSize));
+ push(r0);
+
// Set this new handler as the current one.
StoreP(sp, MemOperand(r8));
-
- mov(r8, Operand(handler_index));
- if (kind == StackHandler::JS_ENTRY) {
- LoadSmiLiteral(cp, Smi::FromInt(0)); // Indicates no context.
- }
- StoreP(r8, MemOperand(sp, StackHandlerConstants::kStateOffset));
- StoreP(cp, MemOperand(sp, StackHandlerConstants::kContextOffset));
}
-void MacroAssembler::PopTryHandler() {
+void MacroAssembler::PopStackHandler() {
+ STATIC_ASSERT(StackHandlerConstants::kSize == 1 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
+
pop(r4);
mov(ip, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
- addi(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
StoreP(r4, MemOperand(ip));
}
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698