chiark / gitweb /
63b5e17fcf65f0aa75d8c34083e48ba25a20dc32
[elogind.git] / klibc / klibc / arch / parisc / sysstub.ph
1 # -*- perl -*-
2 #
3 # arch/parisc/sysstub.ph
4 #
5 # Script to generate system call stubs
6 #
7
8 sub make_sysstub($$$$@) {
9     my($fname, $type, $sname, $stype, @args) = @_;
10
11     open(OUT, '>', "syscalls/${fname}.S");
12     print OUT "#include <asm/unistd.h>\n";
13     print OUT "\n";
14     print OUT "\t.text\n";
15     print OUT "\t.align 4\n";
16     print OUT "\t.import __syscall_common, code\n";
17     print OUT "\t.global ${fname}\n";
18     print OUT "\t.export ${fname}, code\n";
19     print OUT "\t.proc\n";
20     print OUT "\.callinfo\n";
21     print OUT "${fname}:\n";
22     print OUT "\tb\t__syscall_common\n";
23     print OUT "\t  ldo\t__NR_${sname}(%r0),%r20\n";
24     print OUT "\t.procend\n";
25     close(OUT);
26 }
27
28 1;