diff options
Diffstat (limited to 'klibc/include/arch/s390x')
-rw-r--r-- | klibc/include/arch/s390x/klibc/archsetjmp.h | 15 | ||||
-rw-r--r-- | klibc/include/arch/s390x/klibc/archsignal.h | 13 | ||||
-rw-r--r-- | klibc/include/arch/s390x/klibc/archstat.h | 24 | ||||
-rw-r--r-- | klibc/include/arch/s390x/klibc/archsys.h | 41 |
4 files changed, 93 insertions, 0 deletions
diff --git a/klibc/include/arch/s390x/klibc/archsetjmp.h b/klibc/include/arch/s390x/klibc/archsetjmp.h new file mode 100644 index 0000000000..dd3ed0d47c --- /dev/null +++ b/klibc/include/arch/s390x/klibc/archsetjmp.h @@ -0,0 +1,15 @@ +/* + * arch/s390x/include/klibc/archsetjmp.h + */ + +#ifndef _KLIBC_ARCHSETJMP_H +#define _KLIBC_ARCHSETJMP_H + +struct __jmp_buf { + uint64_t __gregs[10]; /* general registers r6-r15 */ + uint64_t __fpregs[4]; /* fp registers f1, f3, f5, f7 */ +}; + +typedef struct __jmp_buf jmp_buf[1]; + +#endif /* _SETJMP_H */ diff --git a/klibc/include/arch/s390x/klibc/archsignal.h b/klibc/include/arch/s390x/klibc/archsignal.h new file mode 100644 index 0000000000..08c9a0073a --- /dev/null +++ b/klibc/include/arch/s390x/klibc/archsignal.h @@ -0,0 +1,13 @@ +/* + * arch/s390x/include/klibc/archsignal.h + * + * Architecture-specific signal definitions + * + */ + +#ifndef _KLIBC_ARCHSIGNAL_H +#define _KLIBC_ARCHSIGNAL_H + +/* No special stuff for this architecture */ + +#endif diff --git a/klibc/include/arch/s390x/klibc/archstat.h b/klibc/include/arch/s390x/klibc/archstat.h new file mode 100644 index 0000000000..0de73cb2b6 --- /dev/null +++ b/klibc/include/arch/s390x/klibc/archstat.h @@ -0,0 +1,24 @@ +#ifndef _KLIBC_ARCHSTAT_H +#define _KLIBC_ARCHSTAT_H + +#define _STATBUF_ST_NSEC + +struct stat { + unsigned long st_dev; + unsigned long st_ino; + unsigned long st_nlink; + unsigned int st_mode; + unsigned int st_uid; + unsigned int st_gid; + unsigned int __pad1; + unsigned long st_rdev; + unsigned long st_size; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + unsigned long st_blksize; + long st_blocks; + unsigned long __unused[3]; +}; + +#endif diff --git a/klibc/include/arch/s390x/klibc/archsys.h b/klibc/include/arch/s390x/klibc/archsys.h new file mode 100644 index 0000000000..15f7113bb4 --- /dev/null +++ b/klibc/include/arch/s390x/klibc/archsys.h @@ -0,0 +1,41 @@ +/* + * arch/s390x/include/klibc/archsys.h + * + * Architecture-specific syscall definitions + */ + +#ifndef _KLIBC_ARCHSYS_H +#define _KLIBC_ARCHSYS_H + +/* S/390X only has five syscall parameters, and uses a structure for + 6-argument syscalls. */ + +#ifndef _syscall6 + +#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,\ + type4,arg4,type5,arg5,type6,arg6) \ +type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, \ + type5 arg5, type6 arg6) { \ + unsigned long __arg[6] = { \ + (unsigned long) arg1, \ + (unsigned long) arg2, \ + (unsigned long) arg3, \ + (unsigned long) arg4, \ + (unsigned long) arg5, \ + (unsigned long) arg6 \ + }; \ + register void *__argp asm("2") = &__arg; \ + long __res; \ + __asm__ __volatile__ ( \ + " svc %b1\n" \ + " lgr %0,2" \ + : "=d" (__res) \ + : "i" (__NR_##name), \ + "d" (__argp) \ + : _svc_clobber); \ + __syscall_return(type, __res); \ +} + +#endif /* _syscall6() missing */ + +#endif /* _KLIBC_ARCHSYS_H */ |