summaryrefslogtreecommitdiffstats
path: root/contrib/go/_std_1.26/src/runtime/rt0_freebsd_arm64.s
blob: 93562c5dd065e22417f1300caaa853608a7e1459 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#include "textflag.h"

// FreeBSD passes a pointer to the argument block in R0, not RSP,
// so _rt0_arm64 cannot be used.
TEXT _rt0_arm64_freebsd(SB),NOSPLIT,$0
	ADD	$8, R0, R1	// argv (use R0 while it's still the pointer)
	MOVD	0(R0), R0	// argc
	JMP	runtime·rt0_go(SB)

// When building with -buildmode=c-shared, this symbol is called when the shared
// library is loaded.
TEXT _rt0_arm64_freebsd_lib(SB),NOSPLIT,$0
	JMP	_rt0_arm64_lib(SB)