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

Side by Side Diff: src/regexp/s390/regexp-macro-assembler-s390.cc

Issue 2827243005: Revert of [regexp] Remove remainder of native RegExpExecStub (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_S390 7 #if V8_TARGET_ARCH_S390
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 21 matching lines...) Expand all
32 * - r10: End of input (points to byte after last character in input). 32 * - r10: End of input (points to byte after last character in input).
33 * - r11: Frame pointer. Used to access arguments, local variables and 33 * - r11: Frame pointer. Used to access arguments, local variables and
34 * RegExp registers. 34 * RegExp registers.
35 * - r12: IP register, used by assembler. Very volatile. 35 * - r12: IP register, used by assembler. Very volatile.
36 * - r15/sp : Points to tip of C stack. 36 * - r15/sp : Points to tip of C stack.
37 * 37 *
38 * The remaining registers are free for computations. 38 * The remaining registers are free for computations.
39 * Each call to a public method should retain this convention. 39 * Each call to a public method should retain this convention.
40 * 40 *
41 * The stack will have the following structure: 41 * The stack will have the following structure:
42 * - fp[108] Isolate* isolate (address of the current isolate) 42 * - fp[112] Isolate* isolate (address of the current isolate)
43 * - fp[108] secondary link/return address used by native call.
43 * - fp[104] direct_call (if 1, direct call from JavaScript code, 44 * - fp[104] direct_call (if 1, direct call from JavaScript code,
44 * if 0, call through the runtime system). 45 * if 0, call through the runtime system).
45 * - fp[100] stack_area_base (high end of the memory area to use as 46 * - fp[100] stack_area_base (high end of the memory area to use as
46 * backtracking stack). 47 * backtracking stack).
47 * - fp[96] capture array size (may fit multiple sets of matches) 48 * - fp[96] capture array size (may fit multiple sets of matches)
48 * - fp[0..96] zLinux ABI register saving area 49 * - fp[0..96] zLinux ABI register saving area
49 * --- sp when called --- 50 * --- sp when called ---
50 * --- frame pointer ---- 51 * --- frame pointer ----
51 * - fp[-4] direct_call (if 1, direct call from JavaScript code, 52 * - fp[-4] direct_call (if 1, direct call from JavaScript code,
52 * if 0, call through the runtime system). 53 * if 0, call through the runtime system).
(...skipping 22 matching lines...) Expand all
75 * character of the string). The remaining registers start out as garbage. 76 * character of the string). The remaining registers start out as garbage.
76 * 77 *
77 * The data up to the return address must be placed there by the calling 78 * The data up to the return address must be placed there by the calling
78 * code and the remaining arguments are passed in registers, e.g. by calling the 79 * code and the remaining arguments are passed in registers, e.g. by calling the
79 * code entry as cast to a function with the signature: 80 * code entry as cast to a function with the signature:
80 * int (*match)(String* input_string, 81 * int (*match)(String* input_string,
81 * int start_index, 82 * int start_index,
82 * Address start, 83 * Address start,
83 * Address end, 84 * Address end,
84 * int* capture_output_array, 85 * int* capture_output_array,
85 * int num_capture_registers,
86 * byte* stack_area_base, 86 * byte* stack_area_base,
87 * bool direct_call = false, 87 * Address secondary_return_address, // Only used by native call.
88 * Isolate* isolate); 88 * bool direct_call = false)
89 * The call is performed by NativeRegExpMacroAssembler::Execute() 89 * The call is performed by NativeRegExpMacroAssembler::Execute()
90 * (in regexp-macro-assembler.cc) via the CALL_GENERATED_REGEXP_CODE macro 90 * (in regexp-macro-assembler.cc) via the CALL_GENERATED_REGEXP_CODE macro
91 * in s390/simulator-s390.h. 91 * in s390/simulator-s390.h.
92 * When calling as a non-direct call (i.e., from C++ code), the return address
93 * area is overwritten with the LR register by the RegExp code. When doing a
94 * direct call from generated code, the return address is placed there by
95 * the calling code, as in a normal exit frame.
92 */ 96 */
93 97
94 #define __ ACCESS_MASM(masm_) 98 #define __ ACCESS_MASM(masm_)
95 99
96 RegExpMacroAssemblerS390::RegExpMacroAssemblerS390(Isolate* isolate, Zone* zone, 100 RegExpMacroAssemblerS390::RegExpMacroAssemblerS390(Isolate* isolate, Zone* zone,
97 Mode mode, 101 Mode mode,
98 int registers_to_save) 102 int registers_to_save)
99 : NativeRegExpMacroAssembler(isolate, zone), 103 : NativeRegExpMacroAssembler(isolate, zone),
100 masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize, 104 masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
101 CodeObjectRequired::kYes)), 105 CodeObjectRequired::kYes)),
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 } 1277 }
1274 } 1278 }
1275 1279
1276 #undef __ 1280 #undef __
1277 1281
1278 #endif // V8_INTERPRETED_REGEXP 1282 #endif // V8_INTERPRETED_REGEXP
1279 } // namespace internal 1283 } // namespace internal
1280 } // namespace v8 1284 } // namespace v8
1281 1285
1282 #endif // V8_TARGET_ARCH_S390 1286 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/regexp/s390/regexp-macro-assembler-s390.h ('k') | src/regexp/x64/regexp-macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698