OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" | 7 #include "src/regexp/mips64/regexp-macro-assembler-mips64.h" |
8 | 8 |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/log.h" | 10 #include "src/log.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 * string, otherwise 0) | 67 * string, otherwise 0) |
68 * - fp[-32] register 0 (Only positions must be stored in the first | 68 * - fp[-32] register 0 (Only positions must be stored in the first |
69 * - register 1 num_saved_registers_ registers) | 69 * - register 1 num_saved_registers_ registers) |
70 * - ... | 70 * - ... |
71 * - register num_registers-1 | 71 * - register num_registers-1 |
72 * --- sp --- | 72 * --- sp --- |
73 * | 73 * |
74 * | 74 * |
75 * The N64 stack will have the following structure: | 75 * The N64 stack will have the following structure: |
76 * | 76 * |
77 * - fp[88] Isolate* isolate (address of the current isolate)
kIsolate | 77 * - fp[88] Isolate* isolate (address of the current isolate) kIsolate |
78 * - fp[80] secondary link/return address used by exit frame on native call.
kSecondaryReturnAddress | 78 * - fp[80] secondary link/return address used by exit frame on native call. |
| 79 kSecondaryReturnAddress |
79
kStackFrameHeader | 80
kStackFrameHeader |
80 * --- sp when called --- | 81 * --- sp when called --- |
81 * - fp[72] ra Return from RegExp code (ra).
kReturnAddress | 82 * - fp[72] ra Return from RegExp code (ra). kReturnAddress |
82 * - fp[64] s9, old-fp Old fp, callee saved(s9). | 83 * - fp[64] s9, old-fp Old fp, callee saved(s9). |
83 * - fp[0..63] s0..s7 Callee-saved registers s0..s7. | 84 * - fp[0..63] s0..s7 Callee-saved registers s0..s7. |
84 * --- frame pointer ---- | 85 * --- frame pointer ---- |
85 * - fp[-8] direct_call (1 = direct call from JS, 0 = from runtime)
kDirectCall | 86 * - fp[-8] direct_call (1 = direct call from JS, 0 = from runtime) |
86 * - fp[-16] stack_base (Top of backtracking stack).
kStackHighEnd | 87 kDirectCall |
87 * - fp[-24] capture array size (may fit multiple sets of matches)
kNumOutputRegisters | 88 * - fp[-16] stack_base (Top of backtracking stack). kStackHighEnd |
88 * - fp[-32] int* capture_array (int[num_saved_registers_], for output).
kRegisterOutput | 89 * - fp[-24] capture array size (may fit multiple sets of matches) |
89 * - fp[-40] end of input (address of end of string).
kInputEnd | 90 kNumOutputRegisters |
90 * - fp[-48] start of input (address of first character in string).
kInputStart | 91 * - fp[-32] int* capture_array (int[num_saved_registers_], for output). |
91 * - fp[-56] start index (character index of start).
kStartIndex | 92 kRegisterOutput |
92 * - fp[-64] void* input_string (location of a handle containing the string).
kInputString | 93 * - fp[-40] end of input (address of end of string). kInputEnd |
93 * - fp[-72] success counter (only for global regexps to count matches).
kSuccessfulCaptures | 94 * - fp[-48] start of input (address of first character in string). |
94 * - fp[-80] Offset of location before start of input (effectively character
kStringStartMinusOne | 95 kInputStart |
| 96 * - fp[-56] start index (character index of start). kStartIndex |
| 97 * - fp[-64] void* input_string (location of a handle containing the string). |
| 98 kInputString |
| 99 * - fp[-72] success counter (only for global regexps to count matches). |
| 100 kSuccessfulCaptures |
| 101 * - fp[-80] Offset of location before start of input (effectively character |
| 102 kStringStartMinusOne |
95 * position -1). Used to initialize capture registers to a | 103 * position -1). Used to initialize capture registers to a |
96 * non-position. | 104 * non-position. |
97 * --------- The following output registers are 32-bit values. --------- | 105 * --------- The following output registers are 32-bit values. --------- |
98 * - fp[-88] register 0 (Only positions must be stored in the first
kRegisterZero | 106 * - fp[-88] register 0 (Only positions must be stored in the first |
| 107 kRegisterZero |
99 * - register 1 num_saved_registers_ registers) | 108 * - register 1 num_saved_registers_ registers) |
100 * - ... | 109 * - ... |
101 * - register num_registers-1 | 110 * - register num_registers-1 |
102 * --- sp --- | 111 * --- sp --- |
103 * | 112 * |
104 * The first num_saved_registers_ registers are initialized to point to | 113 * The first num_saved_registers_ registers are initialized to point to |
105 * "character -1" in the string (i.e., char_size() bytes before the first | 114 * "character -1" in the string (i.e., char_size() bytes before the first |
106 * character of the string). The remaining registers start out as garbage. | 115 * character of the string). The remaining registers start out as garbage. |
107 * | 116 * |
108 * The data up to the return address must be placed there by the calling | 117 * The data up to the return address must be placed there by the calling |
(...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 } | 1329 } |
1321 | 1330 |
1322 #undef __ | 1331 #undef __ |
1323 | 1332 |
1324 #endif // V8_INTERPRETED_REGEXP | 1333 #endif // V8_INTERPRETED_REGEXP |
1325 | 1334 |
1326 } // namespace internal | 1335 } // namespace internal |
1327 } // namespace v8 | 1336 } // namespace v8 |
1328 | 1337 |
1329 #endif // V8_TARGET_ARCH_MIPS64 | 1338 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |