Index: src/x64/regexp-macro-assembler-x64.h |
=================================================================== |
--- src/x64/regexp-macro-assembler-x64.h (revision 15486) |
+++ src/x64/regexp-macro-assembler-x64.h (working copy) |
@@ -135,8 +135,13 @@ |
// Offsets from rbp of function parameters and stored registers. |
static const int kFramePointer = 0; |
// Above the frame pointer - function parameters and return address. |
+#ifndef V8_TARGET_ARCH_X32 |
static const int kReturn_eip = kFramePointer + kPointerSize; |
static const int kFrameAlign = kReturn_eip + kPointerSize; |
+#else |
+ static const int kReturn_eip = kFramePointer + kHWRegSize; |
+ static const int kFrameAlign = kReturn_eip + kHWRegSize; |
+#endif |
#ifdef _WIN64 |
// Parameters (first four passed as registers, but with room on stack). |
@@ -162,19 +167,34 @@ |
// In AMD64 ABI Calling Convention, the first six integer parameters |
// are passed as registers, and caller must allocate space on the stack |
// if it wants them stored. We push the parameters after the frame pointer. |
+#ifndef V8_TARGET_ARCH_X32 |
static const int kInputString = kFramePointer - kPointerSize; |
static const int kStartIndex = kInputString - kPointerSize; |
static const int kInputStart = kStartIndex - kPointerSize; |
static const int kInputEnd = kInputStart - kPointerSize; |
static const int kRegisterOutput = kInputEnd - kPointerSize; |
+#else |
+ static const int kInputString = kFramePointer - kHWRegSize; |
+ static const int kStartIndex = kInputString - kHWRegSize; |
+ static const int kInputStart = kStartIndex - kHWRegSize; |
+ static const int kInputEnd = kInputStart - kHWRegSize; |
+ static const int kRegisterOutput = kInputEnd - kHWRegSize; |
+#endif |
// For the case of global regular expression, we have room to store at least |
// one set of capture results. For the case of non-global regexp, we ignore |
// this value. |
+#ifndef V8_TARGET_ARCH_X32 |
static const int kNumOutputRegisters = kRegisterOutput - kPointerSize; |
static const int kStackHighEnd = kFrameAlign; |
static const int kDirectCall = kStackHighEnd + kPointerSize; |
static const int kIsolate = kDirectCall + kPointerSize; |
+#else |
+ static const int kNumOutputRegisters = kRegisterOutput - kHWRegSize; |
+ static const int kStackHighEnd = kFrameAlign; |
+ static const int kDirectCall = kStackHighEnd + kHWRegSize; |
+ static const int kIsolate = kDirectCall + kHWRegSize; |
#endif |
+#endif |
#ifdef _WIN64 |
// Microsoft calling convention has three callee-saved registers |
@@ -187,7 +207,11 @@ |
// AMD64 Calling Convention has only one callee-save register that |
// we use. We push this after the frame pointer (and after the |
// parameters). |
+#ifndef V8_TARGET_ARCH_X32 |
static const int kBackup_rbx = kNumOutputRegisters - kPointerSize; |
+#else |
+ static const int kBackup_rbx = kNumOutputRegisters - kHWRegSize; |
+#endif |
static const int kLastCalleeSaveRegister = kBackup_rbx; |
#endif |