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

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright 2023 The Prime Citizens
     3  //
     4  // Copyright 2014 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 && amd64
     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  // Defined as ABIInternal since they do not use the stack-based Go ABI.
    18  
    19  TEXT runtime·panicIndex<ABIInternal>(SB),NOSPLIT,$0-16
    20  	MOVQ CX, BX
    21  	JMP runtime·goPanicIndex<ABIInternal>(SB)
    22  
    23  TEXT runtime·panicIndexU<ABIInternal>(SB),NOSPLIT,$0-16
    24  	MOVQ CX, BX
    25  	JMP runtime·goPanicIndexU<ABIInternal>(SB)
    26  
    27  TEXT runtime·panicSliceAlen<ABIInternal>(SB),NOSPLIT,$0-16
    28  	MOVQ CX, AX
    29  	MOVQ DX, BX
    30  	JMP runtime·goPanicSliceAlen<ABIInternal>(SB)
    31  
    32  TEXT runtime·panicSliceAlenU<ABIInternal>(SB),NOSPLIT,$0-16
    33  	MOVQ CX, AX
    34  	MOVQ DX, BX
    35  	JMP runtime·goPanicSliceAlenU<ABIInternal>(SB)
    36  
    37  TEXT runtime·panicSliceAcap<ABIInternal>(SB),NOSPLIT,$0-16
    38  	MOVQ CX, AX
    39  	MOVQ DX, BX
    40  	JMP runtime·goPanicSliceAcap<ABIInternal>(SB)
    41  
    42  TEXT runtime·panicSliceAcapU<ABIInternal>(SB),NOSPLIT,$0-16
    43  	MOVQ CX, AX
    44  	MOVQ DX, BX
    45  	JMP runtime·goPanicSliceAcapU<ABIInternal>(SB)
    46  
    47  TEXT runtime·panicSliceB<ABIInternal>(SB),NOSPLIT,$0-16
    48  	MOVQ CX, BX
    49  	JMP runtime·goPanicSliceB<ABIInternal>(SB)
    50  
    51  TEXT runtime·panicSliceBU<ABIInternal>(SB),NOSPLIT,$0-16
    52  	MOVQ CX, BX
    53  	JMP runtime·goPanicSliceBU<ABIInternal>(SB)
    54  
    55  TEXT runtime·panicSlice3Alen<ABIInternal>(SB),NOSPLIT,$0-16
    56  	MOVQ DX, AX
    57  	JMP runtime·goPanicSlice3Alen<ABIInternal>(SB)
    58  
    59  TEXT runtime·panicSlice3AlenU<ABIInternal>(SB),NOSPLIT,$0-16
    60  	MOVQ DX, AX
    61  	JMP runtime·goPanicSlice3AlenU<ABIInternal>(SB)
    62  
    63  TEXT runtime·panicSlice3Acap<ABIInternal>(SB),NOSPLIT,$0-16
    64  	MOVQ DX, AX
    65  	JMP runtime·goPanicSlice3Acap<ABIInternal>(SB)
    66  
    67  TEXT runtime·panicSlice3AcapU<ABIInternal>(SB),NOSPLIT,$0-16
    68  	MOVQ DX, AX
    69  	JMP runtime·goPanicSlice3AcapU<ABIInternal>(SB)
    70  
    71  TEXT runtime·panicSlice3B<ABIInternal>(SB),NOSPLIT,$0-16
    72  	MOVQ CX, AX
    73  	MOVQ DX, BX
    74  	JMP runtime·goPanicSlice3B<ABIInternal>(SB)
    75  
    76  TEXT runtime·panicSlice3BU<ABIInternal>(SB),NOSPLIT,$0-16
    77  	MOVQ CX, AX
    78  	MOVQ DX, BX
    79  	JMP runtime·goPanicSlice3BU<ABIInternal>(SB)
    80  
    81  TEXT runtime·panicSlice3C<ABIInternal>(SB),NOSPLIT,$0-16
    82  	MOVQ CX, BX
    83  	JMP runtime·goPanicSlice3C<ABIInternal>(SB)
    84  
    85  TEXT runtime·panicSlice3CU<ABIInternal>(SB),NOSPLIT,$0-16
    86  	MOVQ CX, BX
    87  	JMP runtime·goPanicSlice3CU<ABIInternal>(SB)
    88  
    89  TEXT runtime·panicSliceConvert<ABIInternal>(SB),NOSPLIT,$0-16
    90  	MOVQ DX, AX
    91  	JMP runtime·goPanicSliceConvert<ABIInternal>(SB)