Revision: 9126
Author: [email protected]
Date: Mon Sep 5 02:04:32 2011
Log: MIPS: Minor cleanup change to arguments slots constants.
This is the bleeding_edge port of our crankshaft commit 41cab38.
BUG=
TEST=
Review URL: http://codereview.chromium.org/7834017
http://code.google.com/p/v8/source/detail?r=9126
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/mips/constants-mips.h
/branches/bleeding_edge/src/mips/frames-mips.h
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
/branches/bleeding_edge/src/mips/macro-assembler-mips.h
/branches/bleeding_edge/src/mips/simulator-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Thu Sep 1 08:24:26
2011
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Mon Sep 5 02:04:32
2011
@@ -3538,7 +3538,7 @@
const int kNumInstructionsToJump = 6;
masm->Addu(ra, ra, kNumInstructionsToJump * kPointerSize);
masm->sw(ra, MemOperand(sp)); // This spot was reserved in
EnterExitFrame.
- masm->Subu(sp, sp, StandardFrameConstants::kCArgsSlotsSize);
+ masm->Subu(sp, sp, kCArgsSlotsSize);
// Stack is still aligned.
// Call the C routine.
@@ -3551,7 +3551,7 @@
}
// Restore stack (remove arg slots).
- __ Addu(sp, sp, StandardFrameConstants::kCArgsSlotsSize);
+ __ Addu(sp, sp, kCArgsSlotsSize);
if (always_allocate) {
// It's okay to clobber a2 and a3 here. v0 & v1 contain result.
@@ -3707,8 +3707,7 @@
offset_to_argv += kNumCalleeSavedFPU * kDoubleSize;
}
- __ lw(s0, MemOperand(sp, offset_to_argv +
- StandardFrameConstants::kCArgsSlotsSize));
+ __ lw(s0, MemOperand(sp, offset_to_argv + kCArgsSlotsSize));
// We build an EntryFrame.
__ li(t3, Operand(-1)); // Push a bad frame pointer to fail if it is
used.
=======================================
--- /branches/bleeding_edge/src/mips/constants-mips.h Tue Jun 28 00:31:42
2011
+++ /branches/bleeding_edge/src/mips/constants-mips.h Mon Sep 5 02:04:32
2011
@@ -743,11 +743,9 @@
//
-----------------------------------------------------------------------------
// MIPS assembly various constants.
-
-static const int kArgsSlotsSize = 4 * Instruction::kInstrSize;
-static const int kArgsSlotsNum = 4;
// C/C++ argument slots size.
-static const int kCArgsSlotsSize = 4 * Instruction::kInstrSize;
+static const int kCArgSlotCount = 4;
+static const int kCArgsSlotsSize = kCArgSlotCount *
Instruction::kInstrSize;
// JS argument slots size.
static const int kJSArgsSlotsSize = 0 * Instruction::kInstrSize;
// Assembly builtins argument slots size.
=======================================
--- /branches/bleeding_edge/src/mips/frames-mips.h Thu Sep 1 00:35:33 2011
+++ /branches/bleeding_edge/src/mips/frames-mips.h Mon Sep 5 02:04:32 2011
@@ -194,9 +194,6 @@
static const int kRArgsSlotsSize = 4 * kPointerSize;
static const int kRegularArgsSlotsSize = kRArgsSlotsSize;
- // C/C++ argument slots size.
- static const int kCArgSlotCount = 4;
- static const int kCArgsSlotsSize = kCArgSlotCount * kPointerSize;
// JS argument slots size.
static const int kJSArgsSlotsSize = 0 * kPointerSize;
// Assembly builtins argument slots size.
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Thu Sep 1
00:35:33 2011
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Sep 5
02:04:32 2011
@@ -4213,11 +4213,9 @@
// mips, even though those argument slots are not normally used.
// Remaining arguments are pushed on the stack, above (higher address
than)
// the argument slots.
- ASSERT(StandardFrameConstants::kCArgsSlotsSize % kPointerSize == 0);
int stack_passed_arguments = ((num_arguments <=
kRegisterPassedArguments) ?
0 : num_arguments -
kRegisterPassedArguments) +
- (StandardFrameConstants::kCArgsSlotsSize /
- kPointerSize);
+ kCArgSlotCount;
if (frame_alignment > kPointerSize) {
// Make stack end at alignment and make room for num_arguments - 4
words
// and the original value of sp.
@@ -4289,11 +4287,9 @@
Call(function);
- ASSERT(StandardFrameConstants::kCArgsSlotsSize % kPointerSize == 0);
int stack_passed_arguments = ((num_arguments <=
kRegisterPassedArguments) ?
0 : num_arguments -
kRegisterPassedArguments) +
- (StandardFrameConstants::kCArgsSlotsSize /
- kPointerSize);
+ kCArgSlotCount;
if (OS::ActivationFrameAlignment() > kPointerSize) {
lw(sp, MemOperand(sp, stack_passed_arguments * kPointerSize));
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.h Thu Sep 1
00:35:33 2011
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.h Mon Sep 5
02:04:32 2011
@@ -1203,10 +1203,9 @@
// Generate a MemOperand for storing arguments 5..N on the stack
// when calling CallCFunction().
static inline MemOperand CFunctionArgumentOperand(int index) {
- ASSERT(index > StandardFrameConstants::kCArgSlotCount);
+ ASSERT(index > kCArgSlotCount);
// Argument 5 takes the slot just past the four Arg-slots.
- int offset =
- (index - 5) * kPointerSize + StandardFrameConstants::kCArgsSlotsSize;
+ int offset = (index - 5) * kPointerSize + kCArgsSlotsSize;
return MemOperand(sp, offset);
}
=======================================
--- /branches/bleeding_edge/src/mips/simulator-mips.cc Mon Aug 29 06:29:55
2011
+++ /branches/bleeding_edge/src/mips/simulator-mips.cc Mon Sep 5 02:04:32
2011
@@ -2716,7 +2716,7 @@
// Store remaining arguments on stack, from low to high memory.
intptr_t* stack_argument = reinterpret_cast<intptr_t*>(entry_stack);
for (int i = 4; i < argument_count; i++) {
- stack_argument[i - 4 + kArgsSlotsNum] = va_arg(parameters, int32_t);
+ stack_argument[i - 4 + kCArgSlotCount] = va_arg(parameters, int32_t);
}
va_end(parameters);
set_register(sp, entry_stack);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev