Text file
src/runtime/rt0_freebsd_riscv64.s
1 // Copyright 2022 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 #include "textflag.h"
6
7 // On FreeBSD argc/argv are passed in R0, not X2
8 TEXT _rt0_riscv64_freebsd(SB),NOSPLIT|NOFRAME,$0
9 ADD $8, A0, A1 // argv
10 MOV 0(A0), A0 // argc
11 JMP main(SB)
12
13 // When building with -buildmode=c-shared, this symbol is called when the shared
14 // library is loaded.
15 TEXT _rt0_riscv64_freebsd_lib(SB),NOSPLIT,$0
16 JMP _rt0_riscv64_lib(SB)
17
18 TEXT main(SB),NOSPLIT|NOFRAME,$0
19 MOV $runtime·rt0_go(SB), T0
20 JALR ZERO, T0
21
View as plain text