chiark / gitweb /
34031a29ae1e06f3e7a60c9d9a68ce882bad40f7
[elogind.git] / klibc / klibc / arch / ia64 / sysstub.ph
1 # -*- perl -*-
2 #
3 # arch/ia64/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 32\n";
16     print OUT "\t.proc ${fname}\n";
17     print OUT "\t.globl ${fname}\n";
18     print OUT "${fname}:\n";
19     print OUT "\tmov\tr15 = __NR_${sname}\n";
20     print OUT "\tbreak __BREAK_SYSCALL\n";
21     print OUT "\tcmp.eq p6,p0 = -1,r10\n";
22     print OUT "(p6)\tbr.few __syscall_error\n";
23     print OUT "\tbr.ret.sptk.many b0\n";
24     print OUT "\t.size\t${fname},.-${fname}\n";
25     print OUT "\t.endp\t${fname}\n";
26     close(OUT);
27 }
28
29 1;