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

Unified Diff: src/regexp/s390/regexp-macro-assembler-s390.h

Issue 1768383002: S390: Initial impl of regexp (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase to master and sort file in alphabetic ordering Created 4 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/regexp/regexp-macro-assembler.h ('k') | src/regexp/s390/regexp-macro-assembler-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp/s390/regexp-macro-assembler-s390.h
diff --git a/src/regexp/ppc/regexp-macro-assembler-ppc.h b/src/regexp/s390/regexp-macro-assembler-s390.h
similarity index 86%
copy from src/regexp/ppc/regexp-macro-assembler-ppc.h
copy to src/regexp/s390/regexp-macro-assembler-s390.h
index d2813872c487e6e786a8ad0b9e08e46a8668ff82..60ca890f12b8bfad0c383913efe626f309a0889f 100644
--- a/src/regexp/ppc/regexp-macro-assembler-ppc.h
+++ b/src/regexp/s390/regexp-macro-assembler-s390.h
@@ -1,25 +1,24 @@
-// Copyright 2014 the V8 project authors. All rights reserved.
+// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_
-#define V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_
+#ifndef V8_S390_REGEXP_MACRO_ASSEMBLER_S390_H_
+#define V8_S390_REGEXP_MACRO_ASSEMBLER_S390_H_
#include "src/macro-assembler.h"
-#include "src/ppc/assembler-ppc.h"
-#include "src/ppc/frames-ppc.h"
#include "src/regexp/regexp-macro-assembler.h"
+#include "src/s390/assembler-s390.h"
+#include "src/s390/frames-s390.h"
namespace v8 {
namespace internal {
-
#ifndef V8_INTERPRETED_REGEXP
-class RegExpMacroAssemblerPPC : public NativeRegExpMacroAssembler {
+class RegExpMacroAssemblerS390 : public NativeRegExpMacroAssembler {
public:
- RegExpMacroAssemblerPPC(Isolate* isolate, Zone* zone, Mode mode,
- int registers_to_save);
- virtual ~RegExpMacroAssemblerPPC();
+ RegExpMacroAssemblerS390(Isolate* isolate, Zone* zone, Mode mode,
+ int registers_to_save);
+ virtual ~RegExpMacroAssemblerS390();
virtual int stack_limit_slack();
virtual void AdvanceCurrentPosition(int by);
virtual void AdvanceRegister(int reg, int by);
@@ -91,14 +90,15 @@ class RegExpMacroAssemblerPPC : public NativeRegExpMacroAssembler {
static const int kFramePointer = 0;
// Above the frame pointer - Stored registers and stack passed parameters.
- // Register 25..31.
+ // Register 6-15(sp)
static const int kStoredRegisters = kFramePointer;
- // Return address (stored from link register, read into pc on return).
- static const int kReturnAddress = kStoredRegisters + 7 * kPointerSize;
- static const int kCallerFrame = kReturnAddress + kPointerSize;
+ static const int kCallerFrame =
+ kStoredRegisters + kCalleeRegisterSaveAreaSize;
// Stack parameters placed by caller.
- static const int kSecondaryReturnAddress =
- kCallerFrame + kStackFrameExtraParamSlot * kPointerSize;
+ static const int kCaptureArraySize = kCallerFrame;
+ static const int kStackAreaBase = kCallerFrame + kPointerSize;
+ // kDirectCall again
+ static const int kSecondaryReturnAddress = kStackAreaBase + 2 * kPointerSize;
static const int kIsolate = kSecondaryReturnAddress + kPointerSize;
// Below the frame pointer.
@@ -130,7 +130,7 @@ class RegExpMacroAssemblerPPC : public NativeRegExpMacroAssembler {
// Check whether we are exceeding the stack limit on the backtrack stack.
void CheckStackLimit();
-
+ void CallCFunctionUsingStub(ExternalReference function, int num_arguments);
// Generate a call to CheckStackGuardState.
void CallCheckStackGuardState(Register scratch);
@@ -140,13 +140,13 @@ class RegExpMacroAssemblerPPC : public NativeRegExpMacroAssembler {
// Register holding the current input position as negative offset from
// the end of the string.
- inline Register current_input_offset() { return r27; }
+ inline Register current_input_offset() { return r8; }
// The register containing the current character after LoadCurrentCharacter.
- inline Register current_character() { return r28; }
+ inline Register current_character() { return r9; }
// Register holding address of the end of the input string.
- inline Register end_of_input_address() { return r30; }
+ inline Register end_of_input_address() { return r10; }
// Register holding the frame address. Local variables, parameters and
// regexp registers are addressed relative to this.
@@ -154,10 +154,10 @@ class RegExpMacroAssemblerPPC : public NativeRegExpMacroAssembler {
// The register containing the backtrack stack top. Provides a meaningful
// name to the register.
- inline Register backtrack_stackpointer() { return r29; }
+ inline Register backtrack_stackpointer() { return r13; }
// Register holding pointer to the current code object.
- inline Register code_pointer() { return r26; }
+ inline Register code_pointer() { return r7; }
// Byte size of chars in the string to match (decided by the Mode argument)
inline int char_size() { return static_cast<int>(mode_); }
@@ -207,10 +207,10 @@ class RegExpMacroAssemblerPPC : public NativeRegExpMacroAssembler {
// Set of non-volatile registers saved/restored by generated regexp code.
const RegList kRegExpCalleeSaved =
- 1 << 25 | 1 << 26 | 1 << 27 | 1 << 28 | 1 << 29 | 1 << 30 | 1 << 31;
+ 1 << 6 | 1 << 7 | 1 << 8 | 1 << 9 | 1 << 10 | 1 << 11 | 1 << 13;
#endif // V8_INTERPRETED_REGEXP
} // namespace internal
} // namespace v8
-#endif // V8_REGEXP_PPC_REGEXP_MACRO_ASSEMBLER_PPC_H_
+#endif // V8_S390_REGEXP_MACRO_ASSEMBLER_S390_H_
« no previous file with comments | « src/regexp/regexp-macro-assembler.h ('k') | src/regexp/s390/regexp-macro-assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698