summaryrefslogtreecommitdiff
path: root/src/nonstd/x86-64.s
blob: 60aba7a1f7e08938fb64b63e56520af481cfe9a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
.global __syscall
__syscall:
	mov %rdi, %rax
	mov %rsi, %rdi
	mov %rdx, %rsi
	mov %rcx, %rdx
	mov %r8,  %r10
	mov %r9,  %r8
	mov 8(%rsp), %r9
	syscall
	ret

/* FIXME: this seems to be unpossible to put in a shared library */
/* FIXME: it may be worthwhile to separate this into crt1.s */
.global _start
_start:
	popq %rdi
	movq %rsp, %rsi
	call __libc_start