Index: src/regexp/mips64/regexp-macro-assembler-mips64.cc |
diff --git a/src/regexp/mips64/regexp-macro-assembler-mips64.cc b/src/regexp/mips64/regexp-macro-assembler-mips64.cc |
index 5b8353029d2e8f419e708972f79fb9f2c7ec9bfa..60f1fda08d685922bf3bc8e4f71d19e32b5fc0ac 100644 |
--- a/src/regexp/mips64/regexp-macro-assembler-mips64.cc |
+++ b/src/regexp/mips64/regexp-macro-assembler-mips64.cc |
@@ -17,9 +17,7 @@ |
namespace internal { |
#ifndef V8_INTERPRETED_REGEXP |
- |
-/* clang-format off |
- * |
+/* |
* This assembler uses the following register assignment convention |
* - t3 : Temporarily stores the index of capture start after a matching pass |
* for a global regexp. |
@@ -43,14 +41,15 @@ |
* |
* The O32 stack will have the following structure: |
* |
- * - fp[72] Isolate* isolate (address of the current isolate) |
- * - fp[68] direct_call (if 1, direct call from JavaScript code, |
+ * - fp[76] Isolate* isolate (address of the current isolate) |
+ * - fp[72] direct_call (if 1, direct call from JavaScript code, |
* if 0, call through the runtime system). |
- * - fp[64] stack_area_base (High end of the memory area to use as |
+ * - fp[68] stack_area_base (High end of the memory area to use as |
* backtracking stack). |
- * - fp[60] capture array size (may fit multiple sets of matches) |
+ * - fp[64] capture array size (may fit multiple sets of matches) |
+ * - fp[60] int* capture_array (int[num_saved_registers_], for output). |
* - fp[44..59] MIPS O32 four argument slots |
- * - fp[40] int* capture_array (int[num_saved_registers_], for output). |
+ * - fp[40] secondary link/return address used by native call. |
* --- sp when called --- |
* - fp[36] return address (lr). |
* - fp[32] old frame pointer (r11). |
@@ -75,8 +74,9 @@ |
* |
* The N64 stack will have the following structure: |
* |
- * - fp[80] Isolate* isolate (address of the current isolate) kIsolate |
- * kStackFrameHeader |
+ * - fp[88] Isolate* isolate (address of the current isolate) kIsolate |
+ * - fp[80] secondary link/return address used by exit frame on native call. kSecondaryReturnAddress |
+ kStackFrameHeader |
* --- sp when called --- |
* - fp[72] ra Return from RegExp code (ra). kReturnAddress |
* - fp[64] s9, old-fp Old fp, callee saved(s9). |
@@ -112,16 +112,19 @@ |
* int start_index, |
* Address start, |
* Address end, |
+ * Address secondary_return_address, // Only used by native call. |
* int* capture_output_array, |
- * int num_capture_registers, |
* byte* stack_area_base, |
* bool direct_call = false, |
+ * void* return_address, |
* Isolate* isolate); |
* The call is performed by NativeRegExpMacroAssembler::Execute() |
* (in regexp-macro-assembler.cc) via the CALL_GENERATED_REGEXP_CODE macro |
* in mips/simulator-mips.h. |
- * |
- * clang-format on |
+ * When calling as a non-direct call (i.e., from C++ code), the return address |
+ * area is overwritten with the ra register by the RegExp code. When doing a |
+ * direct call from generated code, the return address is placed there by |
+ * the calling code, as in a normal exit frame. |
*/ |
#define __ ACCESS_MASM(masm_) |