github.com/primecitizens/pcz/std@v0.2.1/runtime/panic_386.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 && 386 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 runtim·panicIndex(SB),NOSPLIT,$0-8 19 MOVL AX, x+0(FP) 20 MOVL CX, y+4(FP) 21 JMP runtime·goPanicIndex(SB) 22 23 TEXT runtim·panicIndexU(SB),NOSPLIT,$0-8 24 MOVL AX, x+0(FP) 25 MOVL CX, y+4(FP) 26 JMP runtime·goPanicIndexU(SB) 27 28 TEXT runtim·panicSliceAlen(SB),NOSPLIT,$0-8 29 MOVL CX, x+0(FP) 30 MOVL DX, y+4(FP) 31 JMP runtime·goPanicSliceAlen(SB) 32 33 TEXT runtim·panicSliceAlenU(SB),NOSPLIT,$0-8 34 MOVL CX, x+0(FP) 35 MOVL DX, y+4(FP) 36 JMP runtime·goPanicSliceAlenU(SB) 37 38 TEXT runtim·panicSliceAcap(SB),NOSPLIT,$0-8 39 MOVL CX, x+0(FP) 40 MOVL DX, y+4(FP) 41 JMP runtime·goPanicSliceAcap(SB) 42 43 TEXT runtim·panicSliceAcapU(SB),NOSPLIT,$0-8 44 MOVL CX, x+0(FP) 45 MOVL DX, y+4(FP) 46 JMP runtime·goPanicSliceAcapU(SB) 47 48 TEXT runtim·panicSliceB(SB),NOSPLIT,$0-8 49 MOVL AX, x+0(FP) 50 MOVL CX, y+4(FP) 51 JMP runtime·goPanicSliceB(SB) 52 53 TEXT runtim·panicSliceBU(SB),NOSPLIT,$0-8 54 MOVL AX, x+0(FP) 55 MOVL CX, y+4(FP) 56 JMP runtime·goPanicSliceBU(SB) 57 58 TEXT runtim·panicSlice3Alen(SB),NOSPLIT,$0-8 59 MOVL DX, x+0(FP) 60 MOVL BX, y+4(FP) 61 JMP runtime·goPanicSlice3Alen(SB) 62 63 TEXT runtim·panicSlice3AlenU(SB),NOSPLIT,$0-8 64 MOVL DX, x+0(FP) 65 MOVL BX, y+4(FP) 66 JMP runtime·goPanicSlice3AlenU(SB) 67 68 TEXT runtim·panicSlice3Acap(SB),NOSPLIT,$0-8 69 MOVL DX, x+0(FP) 70 MOVL BX, y+4(FP) 71 JMP runtime·goPanicSlice3Acap(SB) 72 73 TEXT runtim·panicSlice3AcapU(SB),NOSPLIT,$0-8 74 MOVL DX, x+0(FP) 75 MOVL BX, y+4(FP) 76 JMP runtime·goPanicSlice3AcapU(SB) 77 78 TEXT runtim·panicSlice3B(SB),NOSPLIT,$0-8 79 MOVL CX, x+0(FP) 80 MOVL DX, y+4(FP) 81 JMP runtime·goPanicSlice3B(SB) 82 83 TEXT runtim·panicSlice3BU(SB),NOSPLIT,$0-8 84 MOVL CX, x+0(FP) 85 MOVL DX, y+4(FP) 86 JMP runtime·goPanicSlice3BU(SB) 87 88 TEXT runtim·panicSlice3C(SB),NOSPLIT,$0-8 89 MOVL AX, x+0(FP) 90 MOVL CX, y+4(FP) 91 JMP runtime·goPanicSlice3C(SB) 92 93 TEXT runtim·panicSlice3CU(SB),NOSPLIT,$0-8 94 MOVL AX, x+0(FP) 95 MOVL CX, y+4(FP) 96 JMP runtime·goPanicSlice3CU(SB) 97 98 TEXT runtim·panicSliceConvert(SB),NOSPLIT,$0-8 99 MOVL DX, x+0(FP) 100 MOVL BX, y+4(FP) 101 JMP runtime·goPanicSliceConvert(SB) 102 103 // Extended versions for 64-bit indexes. 104 TEXT runtim·panicExtendIndex(SB),NOSPLIT,$0-12 105 MOVL SI, hi+0(FP) 106 MOVL AX, lo+4(FP) 107 MOVL CX, y+8(FP) 108 JMP runtime·goPanicExtendIndex(SB) 109 110 TEXT runtim·panicExtendIndexU(SB),NOSPLIT,$0-12 111 MOVL SI, hi+0(FP) 112 MOVL AX, lo+4(FP) 113 MOVL CX, y+8(FP) 114 JMP runtime·goPanicExtendIndexU(SB) 115 116 TEXT runtim·panicExtendSliceAlen(SB),NOSPLIT,$0-12 117 MOVL SI, hi+0(FP) 118 MOVL CX, lo+4(FP) 119 MOVL DX, y+8(FP) 120 JMP runtime·goPanicExtendSliceAlen(SB) 121 122 TEXT runtim·panicExtendSliceAlenU(SB),NOSPLIT,$0-12 123 MOVL SI, hi+0(FP) 124 MOVL CX, lo+4(FP) 125 MOVL DX, y+8(FP) 126 JMP runtime·goPanicExtendSliceAlenU(SB) 127 128 TEXT runtim·panicExtendSliceAcap(SB),NOSPLIT,$0-12 129 MOVL SI, hi+0(FP) 130 MOVL CX, lo+4(FP) 131 MOVL DX, y+8(FP) 132 JMP runtime·goPanicExtendSliceAcap(SB) 133 134 TEXT runtim·panicExtendSliceAcapU(SB),NOSPLIT,$0-12 135 MOVL SI, hi+0(FP) 136 MOVL CX, lo+4(FP) 137 MOVL DX, y+8(FP) 138 JMP runtime·goPanicExtendSliceAcapU(SB) 139 140 TEXT runtim·panicExtendSliceB(SB),NOSPLIT,$0-12 141 MOVL SI, hi+0(FP) 142 MOVL AX, lo+4(FP) 143 MOVL CX, y+8(FP) 144 JMP runtime·goPanicExtendSliceB(SB) 145 146 TEXT runtim·panicExtendSliceBU(SB),NOSPLIT,$0-12 147 MOVL SI, hi+0(FP) 148 MOVL AX, lo+4(FP) 149 MOVL CX, y+8(FP) 150 JMP runtime·goPanicExtendSliceBU(SB) 151 152 TEXT runtim·panicExtendSlice3Alen(SB),NOSPLIT,$0-12 153 MOVL SI, hi+0(FP) 154 MOVL DX, lo+4(FP) 155 MOVL BX, y+8(FP) 156 JMP runtime·goPanicExtendSlice3Alen(SB) 157 158 TEXT runtim·panicExtendSlice3AlenU(SB),NOSPLIT,$0-12 159 MOVL SI, hi+0(FP) 160 MOVL DX, lo+4(FP) 161 MOVL BX, y+8(FP) 162 JMP runtime·goPanicExtendSlice3AlenU(SB) 163 164 TEXT runtim·panicExtendSlice3Acap(SB),NOSPLIT,$0-12 165 MOVL SI, hi+0(FP) 166 MOVL DX, lo+4(FP) 167 MOVL BX, y+8(FP) 168 JMP runtime·goPanicExtendSlice3Acap(SB) 169 170 TEXT runtim·panicExtendSlice3AcapU(SB),NOSPLIT,$0-12 171 MOVL SI, hi+0(FP) 172 MOVL DX, lo+4(FP) 173 MOVL BX, y+8(FP) 174 JMP runtime·goPanicExtendSlice3AcapU(SB) 175 176 TEXT runtim·panicExtendSlice3B(SB),NOSPLIT,$0-12 177 MOVL SI, hi+0(FP) 178 MOVL CX, lo+4(FP) 179 MOVL DX, y+8(FP) 180 JMP runtime·goPanicExtendSlice3B(SB) 181 182 TEXT runtim·panicExtendSlice3BU(SB),NOSPLIT,$0-12 183 MOVL SI, hi+0(FP) 184 MOVL CX, lo+4(FP) 185 MOVL DX, y+8(FP) 186 JMP runtime·goPanicExtendSlice3BU(SB) 187 188 TEXT runtim·panicExtendSlice3C(SB),NOSPLIT,$0-12 189 MOVL SI, hi+0(FP) 190 MOVL AX, lo+4(FP) 191 MOVL CX, y+8(FP) 192 JMP runtime·goPanicExtendSlice3C(SB) 193 194 TEXT runtim·panicExtendSlice3CU(SB),NOSPLIT,$0-12 195 MOVL SI, hi+0(FP) 196 MOVL AX, lo+4(FP) 197 MOVL CX, y+8(FP) 198 JMP runtime·goPanicExtendSlice3CU(SB)