github.com/primecitizens/pcz/std@v0.2.1/runtime/panic_riscv64.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 && riscv64
     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 (ssa/gen/RISCV64Ops.go), but the space for those
    14  // arguments are allocated in the caller's stack frame.
    15  // These stubs write the args into that stack space and then tail call to the
    16  // corresponding runtime handler.
    17  // The tail call makes these stubs disappear in backtraces.
    18  
    19  TEXT runtime·panicIndex<ABIInternal>(SB),NOSPLIT,$0-16
    20  	MOV T0, X10
    21  	MOV T1, X11
    22  	JMP runtime·goPanicIndex<ABIInternal>(SB)
    23  
    24  TEXT runtime·panicIndexU<ABIInternal>(SB),NOSPLIT,$0-16
    25  	MOV T0, X10
    26  	MOV T1, X11
    27  	JMP runtime·goPanicIndexU<ABIInternal>(SB)
    28  
    29  TEXT runtime·panicSliceAlen<ABIInternal>(SB),NOSPLIT,$0-16
    30  	MOV T1, X10
    31  	MOV T2, X11
    32  	JMP runtime·goPanicSliceAlen<ABIInternal>(SB)
    33  
    34  TEXT runtime·panicSliceAlenU<ABIInternal>(SB),NOSPLIT,$0-16
    35  	MOV T1, X10
    36  	MOV T2, X11
    37  	JMP runtime·goPanicSliceAlenU<ABIInternal>(SB)
    38  
    39  TEXT runtime·panicSliceAcap<ABIInternal>(SB),NOSPLIT,$0-16
    40  	MOV T1, X10
    41  	MOV T2, X11
    42  	JMP runtime·goPanicSliceAcap<ABIInternal>(SB)
    43  
    44  TEXT runtime·panicSliceAcapU<ABIInternal>(SB),NOSPLIT,$0-16
    45  	MOV T1, X10
    46  	MOV T2, X11
    47  	JMP runtime·goPanicSliceAcapU<ABIInternal>(SB)
    48  
    49  TEXT runtime·panicSliceB<ABIInternal>(SB),NOSPLIT,$0-16
    50  	MOV T0, X10
    51  	MOV T1, X11
    52  	JMP runtime·goPanicSliceB<ABIInternal>(SB)
    53  
    54  TEXT runtime·panicSliceBU<ABIInternal>(SB),NOSPLIT,$0-16
    55  	MOV T0, X10
    56  	MOV T1, X11
    57  	JMP runtime·goPanicSliceBU<ABIInternal>(SB)
    58  
    59  TEXT runtime·panicSlice3Alen<ABIInternal>(SB),NOSPLIT,$0-16
    60  	MOV T2, X10
    61  	MOV T3, X11
    62  	JMP runtime·goPanicSlice3Alen<ABIInternal>(SB)
    63  
    64  TEXT runtime·panicSlice3AlenU<ABIInternal>(SB),NOSPLIT,$0-16
    65  	MOV T2, X10
    66  	MOV T3, X11
    67  	JMP runtime·goPanicSlice3AlenU<ABIInternal>(SB)
    68  
    69  TEXT runtime·panicSlice3Acap<ABIInternal>(SB),NOSPLIT,$0-16
    70  	MOV T2, X10
    71  	MOV T3, X11
    72  	JMP runtime·goPanicSlice3Acap<ABIInternal>(SB)
    73  
    74  TEXT runtime·panicSlice3AcapU<ABIInternal>(SB),NOSPLIT,$0-16
    75  	MOV T2, X10
    76  	MOV T3, X11
    77  	JMP runtime·goPanicSlice3AcapU<ABIInternal>(SB)
    78  
    79  TEXT runtime·panicSlice3B<ABIInternal>(SB),NOSPLIT,$0-16
    80  	MOV T1, X10
    81  	MOV T2, X11
    82  	JMP runtime·goPanicSlice3B<ABIInternal>(SB)
    83  
    84  TEXT runtime·panicSlice3BU<ABIInternal>(SB),NOSPLIT,$0-16
    85  	MOV T1, X10
    86  	MOV T2, X11
    87  	JMP runtime·goPanicSlice3BU<ABIInternal>(SB)
    88  
    89  TEXT runtime·panicSlice3C<ABIInternal>(SB),NOSPLIT,$0-16
    90  	MOV T0, X10
    91  	MOV T1, X11
    92  	JMP runtime·goPanicSlice3C<ABIInternal>(SB)
    93  
    94  TEXT runtime·panicSlice3CU<ABIInternal>(SB),NOSPLIT,$0-16
    95  	MOV T0, X10
    96  	MOV T1, X11
    97  	JMP runtime·goPanicSlice3CU<ABIInternal>(SB)
    98  
    99  TEXT runtime·panicSliceConvert<ABIInternal>(SB),NOSPLIT,$0-16
   100  	MOV T2, X10
   101  	MOV T3, X11
   102  	JMP runtime·goPanicSliceConvert<ABIInternal>(SB)