scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#!/bin/sh
 2
 3# This job is very easy because app and kernel ABI are identical
 4# until the 4th parameter, so we only have to set the syscall
 5# number in rax
 6
 7sed -n "
 8     s/[ 	]*#.*//
 9     /$1/p" syscall.lst |
10while read num name
11do
12cat <<EOF > $name.s
13	.file	"$name.s"
14
15	.globl	$name
16$name:
17	mov	x8,#$num
18	svc	0
19	b	_cerrno
20EOF
21done