summaryrefslogtreecommitdiff
path: root/klibc/klibc/arch/parisc/sysstub.ph
diff options
context:
space:
mode:
Diffstat (limited to 'klibc/klibc/arch/parisc/sysstub.ph')
-rw-r--r--klibc/klibc/arch/parisc/sysstub.ph29
1 files changed, 29 insertions, 0 deletions
diff --git a/klibc/klibc/arch/parisc/sysstub.ph b/klibc/klibc/arch/parisc/sysstub.ph
new file mode 100644
index 0000000000..eb6b5dd92a
--- /dev/null
+++ b/klibc/klibc/arch/parisc/sysstub.ph
@@ -0,0 +1,29 @@
+# -*- perl -*-
+#
+# arch/parisc/sysstub.ph
+#
+# Script to generate system call stubs
+#
+
+sub make_sysstub($$$$@) {
+ my($fname, $type, $sname, $stype, @args) = @_;
+
+ open(OUT, '>', "syscalls/${fname}.S");
+ print OUT "#include <asm/unistd.h>\n";
+ print OUT "\n";
+ print OUT "\t.text\n";
+ print OUT "\t.align 4\n";
+ print OUT "\t.import __syscall_common, code\n";
+ print OUT "\t.global ${fname}\n";
+ print OUT "\t.export ${fname}, code\n";
+ print OUT "\t.type ${fname}, @function\n";
+ print OUT "\t.proc\n";
+ print OUT "\.callinfo\n";
+ print OUT "${fname}:\n";
+ print OUT "\tb\t__syscall_common\n";
+ print OUT "\t ldo\t__NR_${sname}(%r0),%r20\n";
+ print OUT "\t.procend\n";
+ close(OUT);
+}
+
+1;