Reviewers: Michael Starzinger, danno, balazs.kilvady, akos.palfi.imgtec,
Message:
ptal
Description:
MIPS: Remove frame pointer from StackHandler.
Port 36e69a916f2a88664887d2b62f0eaf8400edb182
Original commit message:
This reduces the size of the StackHandler by yet another word. We no
longer need to keep track of the frame pointer, as the stack walk will
be able to recalculate it.
BUG=
Please review this at https://codereview.chromium.org/997663002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+12, -16 lines):
M src/mips/macro-assembler-mips.cc
M src/mips64/macro-assembler-mips64.cc
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc
b/src/mips/macro-assembler-mips.cc
index
10932e65d73c6421502288ffdfc8a306171b6557..983f5491c862d9a2a675a6c1437a5fd875ecda96
100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -3238,11 +3238,10 @@ void MacroAssembler::DebugBreak() {
void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
int handler_index) {
// Adjust this code if not the case.
- STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize);
+ STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
- STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
// For the JSEntry handler, we must preserve a0-a3 and s0.
// t1-t3 are available. We will build up the handler from the bottom by
@@ -3253,15 +3252,14 @@ void
MacroAssembler::PushTryHandler(StackHandler::Kind kind,
StackHandler::KindField::encode(kind);
li(t2, Operand(state));
- // Push the frame pointer, context, and state.
+ // Push the context and state.
if (kind == StackHandler::JS_ENTRY) {
- DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
- // The second zero_reg indicates no context.
- // The first zero_reg is the NULL frame pointer.
+ DCHECK(Smi::FromInt(0) == 0);
+ // The zero_reg indicates no context.
// The operands are reversed to match the order of MultiPush/Pop.
- Push(zero_reg, zero_reg, t2);
+ Push(zero_reg, t2);
} else {
- MultiPush(t2.bit() | cp.bit() | fp.bit());
+ MultiPush(t2.bit() | cp.bit());
}
// Link the current handler as the next handler.
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc
b/src/mips64/macro-assembler-mips64.cc
index
d6398f24c8da27d680002c1d8fd9f3c2c3967cc3..79083646acd1a21abe2802216524207575448405
100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -3225,11 +3225,10 @@ void MacroAssembler::DebugBreak() {
void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
int handler_index) {
// Adjust this code if not the case.
- STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize);
+ STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
- STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
// For the JSEntry handler, we must preserve a0-a3 and s0.
// a5-a7 are available. We will build up the handler from the bottom by
@@ -3241,15 +3240,14 @@ void
MacroAssembler::PushTryHandler(StackHandler::Kind kind,
li(a5, Operand(CodeObject()), CONSTANT_SIZE);
li(a6, Operand(state));
- // Push the frame pointer, context, and state.
+ // Push the context and state.
if (kind == StackHandler::JS_ENTRY) {
- DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
- // The second zero_reg indicates no context.
- // The first zero_reg is the NULL frame pointer.
+ DCHECK(Smi::FromInt(0) == 0);
+ // The zero_reg indicates no context.
// The operands are reversed to match the order of MultiPush/Pop.
- Push(zero_reg, zero_reg, a6);
+ Push(zero_reg, a6);
} else {
- MultiPush(a6.bit() | cp.bit() | fp.bit());
+ MultiPush(a6.bit() | cp.bit());
}
// Link the current handler as the next handler.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.