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

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

Issue 2752143003: [regexp] Remove remainder of native RegExpExecStub (Closed)
Patch Set: Fix non-sim arm64 and mips builds 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/regexp/arm64/regexp-macro-assembler-arm64.h" 7 #include "src/regexp/arm64/regexp-macro-assembler-arm64.h"
8 8
9 #include "src/arm64/macro-assembler-arm64-inl.h" 9 #include "src/arm64/macro-assembler-arm64-inl.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 * 49 *
50 * The remaining registers are free for computations. 50 * The remaining registers are free for computations.
51 * Each call to a public method should retain this convention. 51 * Each call to a public method should retain this convention.
52 * 52 *
53 * The stack will have the following structure: 53 * The stack will have the following structure:
54 * 54 *
55 * Location Name Description 55 * Location Name Description
56 * (as referred to in 56 * (as referred to in
57 * the code) 57 * the code)
58 * 58 *
59 * - fp[104] isolate Address of the current isolate. 59 * - fp[96] isolate Address of the current isolate.
60 * - fp[96] return_address Secondary link/return address
61 * used by an exit frame if this is a
62 * native call.
63 * ^^^ csp when called ^^^ 60 * ^^^ csp when called ^^^
64 * - fp[88] lr Return from the RegExp code. 61 * - fp[88] lr Return from the RegExp code.
65 * - fp[80] r29 Old frame pointer (CalleeSaved). 62 * - fp[80] r29 Old frame pointer (CalleeSaved).
66 * - fp[0..72] r19-r28 Backup of CalleeSaved registers. 63 * - fp[0..72] r19-r28 Backup of CalleeSaved registers.
67 * - fp[-8] direct_call 1 => Direct call from JavaScript code. 64 * - fp[-8] direct_call 1 => Direct call from JavaScript code.
68 * 0 => Call through the runtime system. 65 * 0 => Call through the runtime system.
69 * - fp[-16] stack_base High end of the memory area to use as 66 * - fp[-16] stack_base High end of the memory area to use as
70 * the backtracking stack. 67 * the backtracking stack.
71 * - fp[-24] output_size Output may fit multiple sets of matches. 68 * - fp[-24] output_size Output may fit multiple sets of matches.
72 * - fp[-32] input Handle containing the input string. 69 * - fp[-32] input Handle containing the input string.
73 * - fp[-40] success_counter 70 * - fp[-40] success_counter
74 * ^^^^^^^^^^^^^ From here and downwards we store 32 bit values ^^^^^^^^^^^^^ 71 * ^^^^^^^^^^^^^ From here and downwards we store 32 bit values ^^^^^^^^^^^^^
75 * - fp[-44] register N Capture registers initialized with 72 * - fp[-44] register N Capture registers initialized with
76 * - fp[-48] register N + 1 non_position_value. 73 * - fp[-48] register N + 1 non_position_value.
77 * ... The first kNumCachedRegisters (N) registers 74 * ... The first kNumCachedRegisters (N) registers
78 * ... are cached in x0 to x7. 75 * ... are cached in x0 to x7.
79 * ... Only positions must be stored in the first 76 * ... Only positions must be stored in the first
80 * - ... num_saved_registers_ registers. 77 * - ... num_saved_registers_ registers.
81 * - ... 78 * - ...
82 * - register N + num_registers - 1 79 * - register N + num_registers - 1
83 * ^^^^^^^^^ csp ^^^^^^^^^ 80 * ^^^^^^^^^ csp ^^^^^^^^^
84 * 81 *
85 * The first num_saved_registers_ registers are initialized to point to 82 * The first num_saved_registers_ registers are initialized to point to
86 * "character -1" in the string (i.e., char_size() bytes before the first 83 * "character -1" in the string (i.e., char_size() bytes before the first
87 * character of the string). The remaining registers start out as garbage. 84 * character of the string). The remaining registers start out as garbage.
88 * 85 *
89 * The data up to the return address must be placed there by the calling 86 * The data up to the return address must be placed there by the calling
90 * code and the remaining arguments are passed in registers, e.g. by calling the 87 * code and the remaining arguments are passed in registers, e.g. by calling the
91 * code entry as cast to a function with the signature: 88 * code entry as cast to a function with the signature:
92 * int (*match)(String* input, 89 * int (*match)(String* input_string,
93 * int start_offset, 90 * int start_index,
94 * Address input_start, 91 * Address start,
95 * Address input_end, 92 * Address end,
96 * int* output, 93 * int* capture_output_array,
97 * int output_size, 94 * int num_capture_registers,
98 * Address stack_base, 95 * byte* stack_area_base,
99 * bool direct_call = false, 96 * bool direct_call = false,
100 * Address secondary_return_address, // Only used by native call. 97 * Isolate* isolate);
101 * Isolate* isolate)
102 * The call is performed by NativeRegExpMacroAssembler::Execute() 98 * The call is performed by NativeRegExpMacroAssembler::Execute()
103 * (in regexp-macro-assembler.cc) via the CALL_GENERATED_REGEXP_CODE macro 99 * (in regexp-macro-assembler.cc) via the CALL_GENERATED_REGEXP_CODE macro
104 * in arm64/simulator-arm64.h. 100 * in arm64/simulator-arm64.h.
105 * When calling as a non-direct call (i.e., from C++ code), the return address
106 * area is overwritten with the LR register by the RegExp code. When doing a
107 * direct call from generated code, the return address is placed there by
108 * the calling code, as in a normal exit frame.
109 */ 101 */
110 102
111 #define __ ACCESS_MASM(masm_) 103 #define __ ACCESS_MASM(masm_)
112 104
113 RegExpMacroAssemblerARM64::RegExpMacroAssemblerARM64(Isolate* isolate, 105 RegExpMacroAssemblerARM64::RegExpMacroAssemblerARM64(Isolate* isolate,
114 Zone* zone, Mode mode, 106 Zone* zone, Mode mode,
115 int registers_to_save) 107 int registers_to_save)
116 : NativeRegExpMacroAssembler(isolate, zone), 108 : NativeRegExpMacroAssembler(isolate, zone),
117 masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize, 109 masm_(new MacroAssembler(isolate, NULL, kRegExpCodeSize,
118 CodeObjectRequired::kYes)), 110 CodeObjectRequired::kYes)),
(...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 } 1649 }
1658 } 1650 }
1659 } 1651 }
1660 1652
1661 #endif // V8_INTERPRETED_REGEXP 1653 #endif // V8_INTERPRETED_REGEXP
1662 1654
1663 } // namespace internal 1655 } // namespace internal
1664 } // namespace v8 1656 } // namespace v8
1665 1657
1666 #endif // V8_TARGET_ARCH_ARM64 1658 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/regexp/arm64/regexp-macro-assembler-arm64.h ('k') | src/regexp/ia32/regexp-macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698