diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-11-23 20:05:43 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-11-23 20:05:43 -0500 |
commit | 4acc95e497956d926bc9b9a0534cc93a73a6d3e1 (patch) | |
tree | 5bc7fa6c77b5a1cd8d9d24fd6c6c3dd72c5fb5fe /arch | |
parent | 98f56b12ceddba183c4fdba881ec753bbeea4e9f (diff) | |
download | musl-4acc95e497956d926bc9b9a0534cc93a73a6d3e1.tar.gz musl-4acc95e497956d926bc9b9a0534cc93a73a6d3e1.tar.bz2 musl-4acc95e497956d926bc9b9a0534cc93a73a6d3e1.tar.xz musl-4acc95e497956d926bc9b9a0534cc93a73a6d3e1.zip |
begin sys/user.h and sys/reg.h fixes for ports
aside from microblaze, these should be roughly correct for all archs
now. some misc junk macros and typedefs are missing, which should
probably be added for max compatibility with trace/debug tools.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/bits/user.h | 35 | ||||
-rw-r--r-- | arch/mips/bits/reg.h | 46 | ||||
-rw-r--r-- | arch/mips/bits/user.h | 47 | ||||
-rw-r--r-- | arch/powerpc/bits/user.h | 48 |
4 files changed, 78 insertions, 98 deletions
diff --git a/arch/arm/bits/user.h b/arch/arm/bits/user.h index c533fd8d..d5f1deaa 100644 --- a/arch/arm/bits/user.h +++ b/arch/arm/bits/user.h @@ -1,5 +1,4 @@ -struct user_fpregs_struct -{ +struct user_fpregs { struct fp_reg { unsigned sign1:1; unsigned unused:15; @@ -15,26 +14,20 @@ struct user_fpregs_struct unsigned int init_flag; }; -struct user_regs_struct -{ +struct user_regs { unsigned long uregs[18]; }; -struct user -{ - struct user_regs_struct regs; - int u_fpvalid; - unsigned long u_tsize; - unsigned long u_dsize; - unsigned long u_ssize; - unsigned long start_code; - unsigned long start_stack; - long signal; - int reserved; - struct user_regs_struct *u_ar0; - unsigned long int magic; - char u_comm[32]; - int u_debugreg[8]; - struct user_fpregs_struct u_fp; - struct user_fpregs_struct *u_fp0; +struct user { + struct user_regs regs; + int u_fpvalid; + unsigned long u_tsize, u_dsize, u_ssize; + unsigned long start_code, start_stack; + long signal; + struct user_regs *u_ar0; + unsigned long magic; + char u_comm[32]; + int u_debugreg[8]; + struct user_fpregs u_fp; + struct user_fpregs *u_fp0; }; diff --git a/arch/mips/bits/reg.h b/arch/mips/bits/reg.h index 0c7bffca..0c370987 100644 --- a/arch/mips/bits/reg.h +++ b/arch/mips/bits/reg.h @@ -1,3 +1,47 @@ #undef __WORDSIZE #define __WORDSIZE 32 -/* FIXME */ + +#define EF_R0 6 +#define EF_R1 7 +#define EF_R2 8 +#define EF_R3 9 +#define EF_R4 10 +#define EF_R5 11 +#define EF_R6 12 +#define EF_R7 13 +#define EF_R8 14 +#define EF_R9 15 +#define EF_R10 16 +#define EF_R11 17 +#define EF_R12 18 +#define EF_R13 19 +#define EF_R14 20 +#define EF_R15 21 +#define EF_R16 22 +#define EF_R17 23 +#define EF_R18 24 +#define EF_R19 25 +#define EF_R20 26 +#define EF_R21 27 +#define EF_R22 28 +#define EF_R23 29 +#define EF_R24 30 +#define EF_R25 31 + +#define EF_R26 32 +#define EF_R27 33 +#define EF_R28 34 +#define EF_R29 35 +#define EF_R30 36 +#define EF_R31 37 + +#define EF_LO 38 +#define EF_HI 39 + +#define EF_CP0_EPC 40 +#define EF_CP0_BADVADDR 41 +#define EF_CP0_STATUS 42 +#define EF_CP0_CAUSE 43 +#define EF_UNUSED0 44 + +#define EF_SIZE 180 diff --git a/arch/mips/bits/user.h b/arch/mips/bits/user.h index c533fd8d..739233c1 100644 --- a/arch/mips/bits/user.h +++ b/arch/mips/bits/user.h @@ -1,40 +1,9 @@ -struct user_fpregs_struct -{ - struct fp_reg { - unsigned sign1:1; - unsigned unused:15; - unsigned sign2:1; - unsigned exponent:14; - unsigned j:1; - unsigned mantissa1:31; - unsigned mantissa0:32; - } fpregs[8]; - unsigned fpsr:32; - unsigned fpcr:32; - unsigned char ftype[8]; - unsigned int init_flag; -}; - -struct user_regs_struct -{ - unsigned long uregs[18]; -}; - -struct user -{ - struct user_regs_struct regs; - int u_fpvalid; - unsigned long u_tsize; - unsigned long u_dsize; - unsigned long u_ssize; - unsigned long start_code; - unsigned long start_stack; - long signal; - int reserved; - struct user_regs_struct *u_ar0; - unsigned long int magic; - char u_comm[32]; - int u_debugreg[8]; - struct user_fpregs_struct u_fp; - struct user_fpregs_struct *u_fp0; +struct user { + unsigned long regs[45+64]; + unsigned long u_tsize, u_dsize, u_ssize; + unsigned long start_code, start_data, start_stack; + long signal; + void *u_ar0; + unsigned long magic; + char u_comm[32]; }; diff --git a/arch/powerpc/bits/user.h b/arch/powerpc/bits/user.h index c533fd8d..248012f0 100644 --- a/arch/powerpc/bits/user.h +++ b/arch/powerpc/bits/user.h @@ -1,40 +1,14 @@ -struct user_fpregs_struct -{ - struct fp_reg { - unsigned sign1:1; - unsigned unused:15; - unsigned sign2:1; - unsigned exponent:14; - unsigned j:1; - unsigned mantissa1:31; - unsigned mantissa0:32; - } fpregs[8]; - unsigned fpsr:32; - unsigned fpcr:32; - unsigned char ftype[8]; - unsigned int init_flag; +struct pt_regs { + unsigned long gpr[32], nip, msr, orig_gpr3, ctr, link, xer, ccr, mq; + unsigned long trap, dar, dsisr, result; }; -struct user_regs_struct -{ - unsigned long uregs[18]; -}; - -struct user -{ - struct user_regs_struct regs; - int u_fpvalid; - unsigned long u_tsize; - unsigned long u_dsize; - unsigned long u_ssize; - unsigned long start_code; - unsigned long start_stack; - long signal; - int reserved; - struct user_regs_struct *u_ar0; - unsigned long int magic; - char u_comm[32]; - int u_debugreg[8]; - struct user_fpregs_struct u_fp; - struct user_fpregs_struct *u_fp0; +struct user { + struct pt_regs regs; + unsigned long u_tsize, u_dsize, u_ssize; + unsigned long start_code, start_data, start_stack; + long signal; + void *u_ar0; + unsigned long magic; + char u_comm[32]; }; |