Subject: proposal -- new struct frame layout
To: None <port-mips@netbsd.org>
From: Toru Nishimura <locore32@gaea.ocn.ne.jp>
List: port-mips
Date: 11/12/2002 23:42:39
Guys,

As N32 is going to be reality, I'd like to make a proposal about
the new exception frame design.  Since N32 struct frame would be
incompatible with O32 design we have now, struct reg will differ,
core dump format will follow, and debugger and some other
applications must be aware about such the aspects.

Here, proposed new struct frame is like;

struct frame {
#if  defined(__mips_n32) || defined(__mips_n64)
        register_t f_regs[32];
        register_t f_mullo, f_mulhi;
        register_t f_pc;
        register_t f_badvaddr;
        u_int32_t f_status, f_cause;
        u_int32_t f_ppl;        /* previous priority level */
        int32_t f_pad;          /* for 8 byte aligned */
#else
        register_t f_regs[32];
        register_t f_status;    /* [32] */
        register_t f_mullo;     /* [33] */
        register_t f_mulhi;     /* [34] */
        register_t f_badvaddr;  /* [35] */
        register_t f_cause;     /* [36] */
        register_t f_pc;        /* [37] */
        u_int32_t f_ppl;        /* previous priority level */
        int32_t f_pad;          /* for 8 byte aligned */ 
#endif
};
Indecies for EPC and other special registers are replaced with structure
references.  Note that O32 struct frame layout remains compatible.  This
change would benefit a bit smaller storage consumption and more
intuitive coding in many files, I think.

Comments?

Toru Nishimura/ALKYL Technology