chiark / gitweb /
[PATCH] klibc: version 1.0.6
[elogind.git] / klibc / klibc / arch / sparc64 / sysstub.ph
1 # -*- perl -*-
2 #
3 # arch/sparc64/sysstub.ph
4 #
5 # Script to generate system call stubs
6 #
7
8 sub make_sysstub($$$$$@) {
9     my($outputdir, $fname, $type, $sname, $stype, @args) = @_;
10
11     $stype = $stype || 'common';
12
13     open(OUT, '>', "${outputdir}/${fname}.S");
14     print OUT "#include <asm/unistd.h>\n";
15     print OUT "\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";
22     close(OUT);
23 }
24
25 1;