5 # Script to generate system call stubs
8 sub make_sysstub($$$$@) {
9 my($fname, $type, $sname, $stype, @args) = @_;
11 open(OUT, '>', "syscalls/${fname}.S");
12 print OUT "#include <asm/unistd.h>\n";
14 print OUT "\t.text\n";
15 print OUT "\t.type\t${fname},\@function\n";
16 print OUT "\t.globl\t${fname}\n";
17 print OUT "\t.balign\t4\n";
18 print OUT "${fname}:\n";
19 print OUT "\tldi\tr7,#__NR_${sname}\n";
20 print OUT "\tbra\t__syscall_common\n";
21 print OUT "\t.size ${fname},.-${fname}\n";