From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: deuling@de.ibm.com (Markus Deuling)
Cc: gdb-patches@sourceware.org (GDB Patches),
drow@false.org (Daniel Jacobowitz)
Subject: Re: [rfc] Replace x86 register macros
Date: Tue, 04 Mar 2008 00:32:00 -0000 [thread overview]
Message-ID: <200803040031.m240VedE002773@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <47BC58A9.2030802@de.ibm.com> from "Markus Deuling" at Feb 20, 2008 05:43:21 PM
Markus Deuling wrote:
> thanks both for your input. I reworked the patch now. Tested on x86 without regressions
> Maybe someone can run a test on amd64 as I don't have such a machine?
I've tested this on amd64-linux with no regressions.
> +#define I387_ST0_REGNUM(tdep) (tdep->st0_regnum)
> +#define I387_NUM_XMM_REGS(tdep) (tdep->num_xmm_regs)
> +#define I387_MM0_REGNUM(tdep) (tdep->mm0_regnum)
You need to put parentheses around "tdep" to protect against
macro evaluation issues ...
> +#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))
Formatting (whitespace and indentation) is a bit odd here.
Also, you've forgotten to adapt a couple of uses of the I387_
macros in win32-nat.c.
Otherwise, this looks fine to me.
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2008-03-04 0:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-18 20:42 Markus Deuling
2008-02-19 15:45 ` Ulrich Weigand
2008-02-19 16:21 ` Daniel Jacobowitz
2008-02-20 16:45 ` Markus Deuling
2008-03-04 0:32 ` Ulrich Weigand [this message]
2008-03-10 6:58 ` Markus Deuling
2008-03-10 12:13 ` Ulrich Weigand
2008-03-10 12:23 ` Mark Kettenis
2008-03-11 5:23 ` Markus Deuling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200803040031.m240VedE002773@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=deuling@de.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox