Index: src/mips/frames-mips.h |
diff --git a/src/mips/frames-mips.h b/src/mips/frames-mips.h |
index 1899843a198d22484365dc2357bde396c918d5d4..467eec5dbf05bd94d3046a0157689d701c57b12c 100644 |
--- a/src/mips/frames-mips.h |
+++ b/src/mips/frames-mips.h |
@@ -30,7 +30,6 @@ |
#ifndef V8_MIPS_FRAMES_MIPS_H_ |
#define V8_MIPS_FRAMES_MIPS_H_ |
- |
namespace v8 { |
namespace internal { |
@@ -40,13 +39,22 @@ namespace internal { |
static const int kNumRegs = 32; |
static const RegList kJSCallerSaved = |
- 1 << 2 | // v0 |
- 1 << 4 | // a0 |
- 1 << 5 | // a1 |
- 1 << 6 | // a2 |
- 1 << 7; // a3 |
- |
-static const int kNumJSCallerSaved = 5; |
+ 1 << 2 | // v0 |
+ 1 << 3 | // v1 |
+ 1 << 4 | // a0 |
+ 1 << 5 | // a1 |
+ 1 << 6 | // a2 |
+ 1 << 7 | // a3 |
+ 1 << 8 | // t0 |
+ 1 << 9 | // t1 |
+ 1 << 10 | // t2 |
+ 1 << 11 | // t3 |
+ 1 << 12 | // t4 |
+ 1 << 13 | // t5 |
+ 1 << 14 | // t6 |
+ 1 << 15; // t7 |
+ |
+static const int kNumJSCallerSaved = 14; |
// Return the code of the n-th caller-saved register available to JavaScript |
@@ -56,19 +64,31 @@ int JSCallerSavedCode(int n); |
// Callee-saved registers preserved when switching from C to JavaScript. |
static const RegList kCalleeSaved = |
- // Saved temporaries. |
- 1 << 16 | 1 << 17 | 1 << 18 | 1 << 19 | |
- 1 << 20 | 1 << 21 | 1 << 22 | 1 << 23 | |
- // fp. |
- 1 << 30; |
+ 1 << 16 | // s0 |
+ 1 << 17 | // s1 |
+ 1 << 18 | // s2 |
+ 1 << 19 | // s3 |
+ 1 << 20 | // s4 |
+ 1 << 21 | // s5 |
+ 1 << 22 | // s6 (roots in Javascript code) |
+ 1 << 23 | // s7 (cp in Javascript code) |
+ 1 << 30; // fp/s8 |
static const int kNumCalleeSaved = 9; |
+static const RegList kCalleeSavedFPU = |
+ 1 << 20 | // f20 |
+ 1 << 22 | // f22 |
+ 1 << 24 | // f24 |
+ 1 << 26 | // f26 |
+ 1 << 28 | // f28 |
+ 1 << 30; // f30 |
+static const int kNumCalleeSavedFPU = 6; |
// Number of registers for which space is reserved in safepoints. Must be a |
// multiple of 8. |
// TODO(mips): Only 8 registers may actually be sufficient. Revisit. |
-static const int kNumSafepointRegisters = 16; |
+static const int kNumSafepointRegisters = 24; |
// Define the list of registers actually saved at safepoints. |
// Note that the number of saved registers may be smaller than the reserved |
@@ -82,37 +102,37 @@ typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved]; |
static const int kUndefIndex = -1; |
// Map with indexes on stack that corresponds to codes of saved registers. |
static const int kSafepointRegisterStackIndexMap[kNumRegs] = { |
- kUndefIndex, |
- kUndefIndex, |
- 0, // v0 |
- kUndefIndex, |
- 1, // a0 |
- 2, // a1 |
- 3, // a2 |
- 4, // a3 |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- 5, // Saved temporaries. |
- 6, |
- 7, |
- 8, |
- 9, |
- 10, |
- 11, |
- 12, |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- kUndefIndex, |
- 13, // gp |
- 14, // sp |
- 15, // fp |
+ kUndefIndex, // zero_reg |
+ kUndefIndex, // at |
+ 0, // v0 |
+ 1, // v1 |
+ 2, // a0 |
+ 3, // a1 |
+ 4, // a2 |
+ 5, // a3 |
+ 6, // t0 |
+ 7, // t1 |
+ 8, // t2 |
+ 9, // t3 |
+ 10, // t4 |
+ 11, // t5 |
+ 12, // t6 |
+ 13, // t7 |
+ 14, // s0 |
+ 15, // s1 |
+ 16, // s2 |
+ 17, // s3 |
+ 18, // s4 |
+ 19, // s5 |
+ 20, // s6 |
+ 21, // s7 |
+ kUndefIndex, // t8 |
+ kUndefIndex, // t9 |
+ kUndefIndex, // k0 |
+ kUndefIndex, // k1 |
+ kUndefIndex, // gp |
+ kUndefIndex, // sp |
+ 22, // fp |
kUndefIndex |
}; |