From 471497ab818bf6151dea7f4425a815d9cc59deb2 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 26 Jun 2018 12:30:23 -0400 Subject: [PATCH] add m68k reg.h and user.h --- arch/m68k/bits/reg.h | 45 +++++++++++++++++++++++++++++++++++++++++++ arch/m68k/bits/user.h | 33 +++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 arch/m68k/bits/reg.h create mode 100644 arch/m68k/bits/user.h diff --git a/arch/m68k/bits/reg.h b/arch/m68k/bits/reg.h new file mode 100644 index 00000000..99201f70 --- /dev/null +++ b/arch/m68k/bits/reg.h @@ -0,0 +1,45 @@ +#undef __WORDSIZE +#define __WORDSIZE 32 +#define PT_D1 0 +#define PT_D2 1 +#define PT_D3 2 +#define PT_D4 3 +#define PT_D5 4 +#define PT_D6 5 +#define PT_D7 6 +#define PT_A0 7 +#define PT_A1 8 +#define PT_A2 9 +#define PT_A3 10 +#define PT_A4 11 +#define PT_A5 12 +#define PT_A6 13 +#define PT_D0 14 +#define PT_USP 15 +#define PT_ORIG_D0 16 +#define PT_SR 17 +#define PT_PC 18 + +#if __mcffpu__ +#define PT_FP0 21 +#define PT_FP1 23 +#define PT_FP2 25 +#define PT_FP3 27 +#define PT_FP4 29 +#define PT_FP5 31 +#define PT_FP6 33 +#define PT_FP7 35 +#else +#define PT_FP0 21 +#define PT_FP1 24 +#define PT_FP2 27 +#define PT_FP3 30 +#define PT_FP4 33 +#define PT_FP5 36 +#define PT_FP6 39 +#define PT_FP7 42 +#endif + +#define PT_FPCR 45 +#define PT_FPSR 46 +#define PT_FPIAR 47 diff --git a/arch/m68k/bits/user.h b/arch/m68k/bits/user.h new file mode 100644 index 00000000..9a4ca128 --- /dev/null +++ b/arch/m68k/bits/user.h @@ -0,0 +1,33 @@ +#undef __WORDSIZE +#define __WORDSIZE 32 + +struct user_m68kfp_struct { + unsigned long fpregs[24], fpcntl[3]; +}; + +struct user_regs_struct { + long d1, d2, d3, d4, d5, d6, d7; + long a0, a1, a2, a3, a4, a5, a6; + long d0, usp, orig_d0; + short stkadj, sr; + long pc; + short fmtvec, __pad; +}; + +struct user { + struct user_regs_struct regs; + int u_fpvalid; + struct user_m68kfp_struct m68kfp; + unsigned long u_tsize, u_dsize, u_ssize, start_code, start_stack; + long signal; + int reserved; + unsigned long u_ar0; + struct user_m68kfp_struct *u_fpstate; + unsigned long magic; + char u_comm[32]; +}; + +#define NBPG 4096 +#define UPAGES 1 +#define HOST_TEXT_START_ADDR (u.start_code) +#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG) -- 2.40.0