shithub: riscv

ref: 7a503757b1251c2746df7bdcd891814c1518cc28
dir: /sys/src/libc/amd64/main9p.s/

View raw version
TEXT	_mainp(SB), 1, $0
	MOVQ	AX, _tos(SB)
	MOVQ	$_profmain(SB), RARG
	PUSHQ	RARG
	PUSHQ	$0
	MOVQ	$_callmain(SB), AX
	JMP*	AX

	MOVQ	$_profin(SB), AX	/* force loading of profile */

TEXT	_savearg(SB), 1, $0
	MOVQ	RARG, AX
	RET

TEXT	_saveret(SB), 1, $0
	RET				/* we want RARG in RARG */

TEXT	_callpc(SB), 1, $0
	MOVQ	8(RARG), AX
	RET