From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: bauerman@br.ibm.com
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Put SPE verification in macro.
Date: Wed, 30 Jan 2008 18:21:00 -0000 [thread overview]
Message-ID: <200801301814.m0UIE006010057@brahms.sibelius.xs4all.nl> (raw)
In-Reply-To: <1201705759.11950.228.camel@localhost.localdomain> (message from Thiago Jung Bauermann on Wed, 30 Jan 2008 13:09:19 -0200)
> From: Thiago Jung Bauermann <bauerman@br.ibm.com>
> Date: Wed, 30 Jan 2008 13:09:19 -0200
>
> Hi,
>
> This patch is a small cleanup which makes my revised version of the DFP
> pseudo-registers patch more readable. I put the mantra used to check if
> a given register number is an SPE pseudo-register in a macro and used it
> whenever possible.
>
> The only case the macro isnt't a direct replacement was this:
>
> @@ -179,9 +184,7 @@ spe_register_p (struct gdbarch *gdbarch,
> struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
>
> /* Is it a reference to EV0 -- EV31, and do we have those? */
> - if (tdep->ppc_ev0_regnum >= 0
> - && tdep->ppc_ev31_regnum >= 0
> - && tdep->ppc_ev0_regnum <= regno && regno <=
> tdep->ppc_ev31_regnum)
> + if (IS_SPE_PSEUDOREG (tdep, regno))
> return 1;
>
> The above code checks if ppc_ev31_regnum is >= 0 and if regno <=
> ppc_ev31_regnum. Since ppc_ev31_regnum is set in the same place and
> condition that ppc_ev0_regnum is set, and that ppc_ev31_regnum's value
> is ppc_ev0_regnum + 31, those checks are equivalent to the ones made by
> the new macro.
This makes ppc_ev31_regnum completely redundant isn't it? Could you
remove it?
next prev parent reply other threads:[~2008-01-30 18:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 15:26 Thiago Jung Bauermann
2008-01-30 18:21 ` Mark Kettenis [this message]
2008-01-30 18:38 ` Thiago Jung Bauermann
2008-01-30 19:06 ` Mark Kettenis
2008-01-30 19:24 ` Thiago Jung Bauermann
2008-01-31 14:55 ` Thiago Jung Bauermann
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=200801301814.m0UIE006010057@brahms.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=bauerman@br.ibm.com \
--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