3 # arch/sparc64/sysstub.ph
5 # Script to generate system call stubs
8 sub make_sysstub($$$$@) {
9 my($fname, $type, $sname, $stype, @args) = @_;
11 $stype = $stype || 'common';
13 open(OUT, '>', "syscalls/${fname}.S");
14 print OUT "#include <asm/unistd.h>\n";
16 print OUT "\t.type ${fname},\@function\n";
17 print OUT "\t.globl ${fname}\n";
18 print OUT "${fname}:\n";
19 print OUT "\tb __syscall_${stype}\n";
20 print OUT "\t mov\t__NR_${sname}, %g1\n";
21 print OUT "\t.size ${fname},.-${fname}\n";