shithub: mc

ref: 537313ee9a2179cc6e869c6e8c70da4af1f07f28
dir: /lib/thread/exit+freebsd-x64.s/

View raw version
/*
const thread.exit	: (stacksz : std.size -> void)
*/
.globl thread$exit
thread$exit:
	/* munmap(base, size) */
	movq	$73,%rax	/* munmap */
	movq	%fs:0x08,%rdi	/* base */
	movq	%fs:0x10,%rsi	/* stksz */
	syscall

	/* thr_exit(null) */
	movq	$431,%rax	/* exit */
	xorq	%rdi,%rdi	/* 0 */
	syscall