shithub: scc

ref: 840c98a16e5c6ce962d3a7d4c01c27a51dad2e23
dir: /libc/src/sys/qbe-linux/syscall.awk/

View raw version
# This job is very easy because app and kernel ABI are identical
# until the 4th parameter, so we only have to set the syscall
# number in rax

/^#/	{next}
	{name=$2 ".s"
	 printf "%s:\n" \
	        "\tmovq\t$%d,%%rax\n" \
	        "\tsyscall\n" \
	        "\tret\n",$2, $1 > name
	 close(name)}