about summary refs log tree commit diff
path: root/arch/s390x/bits/user.h
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2016-11-11 21:52:05 -0600
committerRich Felker <dalias@aerifal.cx>2016-11-11 23:06:21 -0500
commit15094943050eb9a564f409323070e50b40f78816 (patch)
treef9af42d3369ee9a6ebd08bf416a99159193217a8 /arch/s390x/bits/user.h
parent54482898abe8d6d937ee67ea5974cd8eae859c37 (diff)
downloadmusl-15094943050eb9a564f409323070e50b40f78816.tar.gz
musl-15094943050eb9a564f409323070e50b40f78816.tar.xz
musl-15094943050eb9a564f409323070e50b40f78816.zip
add s390x port
Diffstat (limited to 'arch/s390x/bits/user.h')
-rw-r--r--arch/s390x/bits/user.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/arch/s390x/bits/user.h b/arch/s390x/bits/user.h
new file mode 100644
index 00000000..d2065b5e
--- /dev/null
+++ b/arch/s390x/bits/user.h
@@ -0,0 +1,62 @@
+#undef __WORDSIZE
+#define __WORDSIZE 64
+
+typedef union {
+	double d;
+	float f;
+} elf_fpreg_t;
+
+typedef struct {
+	unsigned fpc;
+	fpreg_t fprs[16];
+} elf_fpregset_t;
+
+#define ELF_NGREG 27
+typedef unsigned long elf_greg_t, elf_gregset_t[ELG_NGREG];
+
+struct _user_psw_struct {
+	unsigned long mask, addr;
+};
+
+struct _user_fpregs_struct {
+	unsigned fpc;
+	double fprs[16];
+};
+
+struct _user_regs_struct {
+	struct _user_psw_struct psw;
+	unsigned long gprs[16];
+	unsigned acrs[16];
+	unsigned long orig_gpr2;
+	struct _user_fpregs_struct fp_regs;
+	struct _user_per_struct per_info;
+	unsigned long ieee_instruction_pointer;
+};
+
+struct _user_per_struct {
+	unsigned long control_regs[3];
+	unsigned single_step       : 1;
+	unsigned instruction_fetch : 1;
+	unsigned                   : 30;
+	unsigned long starting_addr, ending_addr;
+	unsigned short perc_atmid;
+	unsigned long address;
+	unsigned char access_id;
+} per_struct;
+
+struct user {
+	struct _user_regs_struct regs;
+	unsigned long u_tsize, u_dsize, u_ssize;
+	unsigned long start_code, start_stack;
+	long signal;
+	struct _user_regs_struct *u_ar0;
+	unsigned long magic;
+	char u_comm[32];
+};
+
+#define PAGE_MASK            (~(PAGE_SIZE-1))
+#define NBPG                 PAGE_SIZE
+#define UPAGES               1
+#define HOST_TEXT_START_ADDR (u.start_code)
+#define HOST_STACK_END_ADDR  (u.start_stack + u.u_ssize * NBPG)
+