github.com/primecitizens/pcz/std@v0.2.1/runtime/panic_mipsx.s (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  //
     4  // Copyright 2009 The Go Authors. All rights reserved.
     5  // Use of this source code is governed by a BSD-style
     6  // license that can be found in the LICENSE file.
     7  
     8  //go:build pcz && (mips || mipsle)
     9  
    10  #include "textflag.h"
    11  
    12  // Note: these functions use a special calling convention to save generated code space.
    13  // Arguments are passed in registers, but the space for those arguments are allocated
    14  // in the caller's stack frame. These stubs write the args into that stack space and
    15  // then tail call to the corresponding runtime handler.
    16  // The tail call makes these stubs disappear in backtraces.
    17  
    18  TEXT runtime·panicIndex(SB),NOSPLIT,$0-8
    19  	MOVW R1, x+0(FP)
    20  	MOVW R2, y+4(FP)
    21  	JMP runtime·goPanicIndex(SB)
    22  
    23  TEXT runtime·panicIndexU(SB),NOSPLIT,$0-8
    24  	MOVW R1, x+0(FP)
    25  	MOVW R2, y+4(FP)
    26  	JMP runtime·goPanicIndexU(SB)
    27  
    28  TEXT runtime·panicSliceAlen(SB),NOSPLIT,$0-8
    29  	MOVW R2, x+0(FP)
    30  	MOVW R3, y+4(FP)
    31  	JMP runtime·goPanicSliceAlen(SB)
    32  
    33  TEXT runtime·panicSliceAlenU(SB),NOSPLIT,$0-8
    34  	MOVW R2, x+0(FP)
    35  	MOVW R3, y+4(FP)
    36  	JMP runtime·goPanicSliceAlenU(SB)
    37  
    38  TEXT runtime·panicSliceAcap(SB),NOSPLIT,$0-8
    39  	MOVW R2, x+0(FP)
    40  	MOVW R3, y+4(FP)
    41  	JMP runtime·goPanicSliceAcap(SB)
    42  
    43  TEXT runtime·panicSliceAcapU(SB),NOSPLIT,$0-8
    44  	MOVW R2, x+0(FP)
    45  	MOVW R3, y+4(FP)
    46  	JMP runtime·goPanicSliceAcapU(SB)
    47  
    48  TEXT runtime·panicSliceB(SB),NOSPLIT,$0-8
    49  	MOVW R1, x+0(FP)
    50  	MOVW R2, y+4(FP)
    51  	JMP runtime·goPanicSliceB(SB)
    52  
    53  TEXT runtime·panicSliceBU(SB),NOSPLIT,$0-8
    54  	MOVW R1, x+0(FP)
    55  	MOVW R2, y+4(FP)
    56  	JMP runtime·goPanicSliceBU(SB)
    57  
    58  TEXT runtime·panicSlice3Alen(SB),NOSPLIT,$0-8
    59  	MOVW R3, x+0(FP)
    60  	MOVW R4, y+4(FP)
    61  	JMP runtime·goPanicSlice3Alen(SB)
    62  
    63  TEXT runtime·panicSlice3AlenU(SB),NOSPLIT,$0-8
    64  	MOVW R3, x+0(FP)
    65  	MOVW R4, y+4(FP)
    66  	JMP runtime·goPanicSlice3AlenU(SB)
    67  
    68  TEXT runtime·panicSlice3Acap(SB),NOSPLIT,$0-8
    69  	MOVW R3, x+0(FP)
    70  	MOVW R4, y+4(FP)
    71  	JMP runtime·goPanicSlice3Acap(SB)
    72  
    73  TEXT runtime·panicSlice3AcapU(SB),NOSPLIT,$0-8
    74  	MOVW R3, x+0(FP)
    75  	MOVW R4, y+4(FP)
    76  	JMP runtime·goPanicSlice3AcapU(SB)
    77  
    78  TEXT runtime·panicSlice3B(SB),NOSPLIT,$0-8
    79  	MOVW R2, x+0(FP)
    80  	MOVW R3, y+4(FP)
    81  	JMP runtime·goPanicSlice3B(SB)
    82  
    83  TEXT runtime·panicSlice3BU(SB),NOSPLIT,$0-8
    84  	MOVW R2, x+0(FP)
    85  	MOVW R3, y+4(FP)
    86  	JMP runtime·goPanicSlice3BU(SB)
    87  
    88  TEXT runtime·panicSlice3C(SB),NOSPLIT,$0-8
    89  	MOVW R1, x+0(FP)
    90  	MOVW R2, y+4(FP)
    91  	JMP runtime·goPanicSlice3C(SB)
    92  
    93  TEXT runtime·panicSlice3CU(SB),NOSPLIT,$0-8
    94  	MOVW R1, x+0(FP)
    95  	MOVW R2, y+4(FP)
    96  	JMP runtime·goPanicSlice3CU(SB)
    97  
    98  TEXT runtime·panicSliceConvert(SB),NOSPLIT,$0-8
    99  	MOVW R3, x+0(FP)
   100  	MOVW R4, y+4(FP)
   101  	JMP runtime·goPanicSliceConvert(SB)
   102  
   103  // Extended versions for 64-bit indexes.
   104  TEXT runtime·panicExtendIndex(SB),NOSPLIT,$0-12
   105  	MOVW R5, hi+0(FP)
   106  	MOVW R1, lo+4(FP)
   107  	MOVW R2, y+8(FP)
   108  	JMP runtime·goPanicExtendIndex(SB)
   109  
   110  TEXT runtime·panicExtendIndexU(SB),NOSPLIT,$0-12
   111  	MOVW R5, hi+0(FP)
   112  	MOVW R1, lo+4(FP)
   113  	MOVW R2, y+8(FP)
   114  	JMP runtime·goPanicExtendIndexU(SB)
   115  
   116  TEXT runtime·panicExtendSliceAlen(SB),NOSPLIT,$0-12
   117  	MOVW R5, hi+0(FP)
   118  	MOVW R2, lo+4(FP)
   119  	MOVW R3, y+8(FP)
   120  	JMP runtime·goPanicExtendSliceAlen(SB)
   121  
   122  TEXT runtime·panicExtendSliceAlenU(SB),NOSPLIT,$0-12
   123  	MOVW R5, hi+0(FP)
   124  	MOVW R2, lo+4(FP)
   125  	MOVW R3, y+8(FP)
   126  	JMP runtime·goPanicExtendSliceAlenU(SB)
   127  
   128  TEXT runtime·panicExtendSliceAcap(SB),NOSPLIT,$0-12
   129  	MOVW R5, hi+0(FP)
   130  	MOVW R2, lo+4(FP)
   131  	MOVW R3, y+8(FP)
   132  	JMP runtime·goPanicExtendSliceAcap(SB)
   133  
   134  TEXT runtime·panicExtendSliceAcapU(SB),NOSPLIT,$0-12
   135  	MOVW R5, hi+0(FP)
   136  	MOVW R2, lo+4(FP)
   137  	MOVW R3, y+8(FP)
   138  	JMP runtime·goPanicExtendSliceAcapU(SB)
   139  
   140  TEXT runtime·panicExtendSliceB(SB),NOSPLIT,$0-12
   141  	MOVW R5, hi+0(FP)
   142  	MOVW R1, lo+4(FP)
   143  	MOVW R2, y+8(FP)
   144  	JMP runtime·goPanicExtendSliceB(SB)
   145  
   146  TEXT runtime·panicExtendSliceBU(SB),NOSPLIT,$0-12
   147  	MOVW R5, hi+0(FP)
   148  	MOVW R1, lo+4(FP)
   149  	MOVW R2, y+8(FP)
   150  	JMP runtime·goPanicExtendSliceBU(SB)
   151  
   152  TEXT runtime·panicExtendSlice3Alen(SB),NOSPLIT,$0-12
   153  	MOVW R5, hi+0(FP)
   154  	MOVW R3, lo+4(FP)
   155  	MOVW R4, y+8(FP)
   156  	JMP runtime·goPanicExtendSlice3Alen(SB)
   157  
   158  TEXT runtime·panicExtendSlice3AlenU(SB),NOSPLIT,$0-12
   159  	MOVW R5, hi+0(FP)
   160  	MOVW R3, lo+4(FP)
   161  	MOVW R4, y+8(FP)
   162  	JMP runtime·goPanicExtendSlice3AlenU(SB)
   163  
   164  TEXT runtime·panicExtendSlice3Acap(SB),NOSPLIT,$0-12
   165  	MOVW R5, hi+0(FP)
   166  	MOVW R3, lo+4(FP)
   167  	MOVW R4, y+8(FP)
   168  	JMP runtime·goPanicExtendSlice3Acap(SB)
   169  
   170  TEXT runtime·panicExtendSlice3AcapU(SB),NOSPLIT,$0-12
   171  	MOVW R5, hi+0(FP)
   172  	MOVW R3, lo+4(FP)
   173  	MOVW R4, y+8(FP)
   174  	JMP runtime·goPanicExtendSlice3AcapU(SB)
   175  
   176  TEXT runtime·panicExtendSlice3B(SB),NOSPLIT,$0-12
   177  	MOVW R5, hi+0(FP)
   178  	MOVW R2, lo+4(FP)
   179  	MOVW R3, y+8(FP)
   180  	JMP runtime·goPanicExtendSlice3B(SB)
   181  
   182  TEXT runtime·panicExtendSlice3BU(SB),NOSPLIT,$0-12
   183  	MOVW R5, hi+0(FP)
   184  	MOVW R2, lo+4(FP)
   185  	MOVW R3, y+8(FP)
   186  	JMP runtime·goPanicExtendSlice3BU(SB)
   187  
   188  TEXT runtime·panicExtendSlice3C(SB),NOSPLIT,$0-12
   189  	MOVW R5, hi+0(FP)
   190  	MOVW R1, lo+4(FP)
   191  	MOVW R2, y+8(FP)
   192  	JMP runtime·goPanicExtendSlice3C(SB)
   193  
   194  TEXT runtime·panicExtendSlice3CU(SB),NOSPLIT,$0-12
   195  	MOVW R5, hi+0(FP)
   196  	MOVW R1, lo+4(FP)
   197  	MOVW R2, y+8(FP)
   198  	JMP runtime·goPanicExtendSlice3CU(SB)