This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] Replace x86 register macros


> Date: Mon, 10 Mar 2008 13:13:03 +0100 (CET)
> From: "Ulrich Weigand" <uweigand@de.ibm.com>
> 
> Markus Deuling wrote:
> 
> > Thanks for review, I reworked the patch now. Ok to commit?
> 
> > +#define I387_FCTRL_REGNUM(tdep) (I387_ST0_REGNUM(tdep) + 8)
> > +#define I387_FSTAT_REGNUM(tdep) (I387_FCTRL_REGNUM(tdep)+ 1)
> > +#define I387_FTAG_REGNUM(tdep)  (I387_FCTRL_REGNUM(tdep)+ 2)
> > +#define I387_FISEG_REGNUM(tdep) (I387_FCTRL_REGNUM(tdep)+ 3)
> > +#define I387_FIOFF_REGNUM(tdep) (I387_FCTRL_REGNUM(tdep)+ 4)
> > +#define I387_FOSEG_REGNUM(tdep) (I387_FCTRL_REGNUM(tdep)+ 5)
> > +#define I387_FOOFF_REGNUM(tdep) (I387_FCTRL_REGNUM(tdep)+ 6)
> > +#define I387_FOP_REGNUM(tdep)   (I387_FCTRL_REGNUM(tdep)+ 7)
> > +#define I387_XMM0_REGNUM(tdep)  (I387_ST0_REGNUM(tdep)+ 16)
> > +#define I387_MXCSR_REGNUM(tdep) (I387_XMM0_REGNUM(tdep) \
> > ++ I387_NUM_XMM_REGS(tdep))
> 
> I guess I should have been more specific about the formatting;
> this is unfortunately still not quite right:  On the right-hand
> sides, you should use normal whitespace rules, i.e. spaces before
> the '(' and '+'.  Also, the last line should be properly 
> indented, somthing like:
> 
> #define I387_MXCSR_REGNUM(tdep) (I387_XMM0_REGNUM (tdep) \
> 				 + I387_NUM_XMM_REGS (tdep))

Or better yet, something like:

#define I387_MXCSR_REGNUM(tdep) \
  (I387_XMM0_REGNUM (tdep) + I387_NUM_XMM_REGS (tdep))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]