From 02fec4701cee79f875c1d02b8b4aee09380dbcb8 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 4 Jan 2001 20:04:45 +0000 Subject: integrate dietlibc/stdio per default for cdrom and disk only installs --- mdk-stage1/dietlibc/syscalls.h | 82 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 mdk-stage1/dietlibc/syscalls.h (limited to 'mdk-stage1/dietlibc/syscalls.h') diff --git a/mdk-stage1/dietlibc/syscalls.h b/mdk-stage1/dietlibc/syscalls.h new file mode 100644 index 000000000..5e9782ee9 --- /dev/null +++ b/mdk-stage1/dietlibc/syscalls.h @@ -0,0 +1,82 @@ +#ifdef __ASSEMBLER__ + +#include + +#else + +#include + +#endif + +#ifdef __i386__ + +#define syscall(name,sym) \ +.text; \ +.global sym; \ +sym: \ + movb $__NR_##name,%al; \ + jmp __unified_syscall + +#endif + +#ifdef __sparc__ + +#define syscall(name,sym) \ +.text; \ +.global sym; \ +sym: \ + b __unified_syscall; \ + mov __NR_##name, %g1 + +#endif + +#ifdef __powerpc__ + +#define syscall(name,sym) \ +.text; \ +.global sym; \ +sym: \ + li 0,__NR_##name; \ + b __unified_syscall + +#endif + + +#ifdef __mips__ + +#define syscall(name,sym) \ +.text; \ +.global sym; \ +.ent sym; \ +sym: \ + li $2,__NR_##name; \ + la $25,__unified_syscall; \ + jr $25; \ +.end sym + +#endif + +#ifdef __arm__ + +#define syscall(name,sym) \ +.text; \ +.global sym; \ +sym: \ + swi __NR_##name; \ + b __unified_syscall + +#endif + + +#ifdef __alpha__ + +#define syscall(name,sym) \ +.text ; \ +.align 2 ; \ +.global sym ; \ +.type sym,@function ; \ +sym: ; \ + lda $0, __NR_##name($31) ; \ + br __unified_syscall + +#endif -- cgit v1.2.1