From: Mike Frysinger <vapier@gentoo.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, Kevin Buettner <kevinb@redhat.com>
Subject: Re: [RFC] Add support for the Renesas rl78 architecture
Date: Thu, 26 Jan 2012 19:16:00 -0000 [thread overview]
Message-ID: <201201261329.02115.vapier@gentoo.org> (raw)
In-Reply-To: <4F210048.3000900@redhat.com>
[-- Attachment #1: Type: Text/Plain, Size: 1089 bytes --]
On Thursday 26 January 2012 02:27:04 Pedro Alves wrote:
> On 01/26/2012 02:18 AM, Mike Frysinger wrote:
> > On Wednesday 25 January 2012 18:58:00 Kevin Buettner wrote:
> >> +/* Return the register address associated with the register specified
> >> by + REGNO. */
> >> +static unsigned long reg_addr (enum sim_rl78_regnum regno)
> >> +{
> >> + if (sim_rl78_bank0_r0_regnum <= regno && regno <=
> >> sim_rl78_bank0_r7_regnum)
> >> + return 0xffef8 + (regno - sim_rl78_bank0_r0_regnum);
> >
> > the if statements look funny because the operators are reversed. a more
> >
> > natural (imo) check:
> > if (regno >= sim_rl78_bank0_r0_regnum && regno <=
> > sim_rl78_bank0_r7_regnum)
>
> Funny, I also usually go with Kevin's style. My rationale is that
>
> LOWER_RANGE <= N && N <= UPPER_RANGE
>
> looks more like the mathematical
>
> LOWER_RANGE <= N <= UPPER_RANGE
>
> and thus reads more naturally to me.
if you guys are used to it, then that's fine. not like i'm maintaining this
section of code :).
sim stuff looks OK by me
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-01-26 18:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 1:21 Kevin Buettner
2012-01-26 2:24 ` Mike Frysinger
2012-01-26 9:18 ` Pedro Alves
2012-01-26 16:59 ` Kevin Buettner
2012-01-26 19:16 ` Mike Frysinger [this message]
2012-01-26 6:21 ` Joel Brobecker
2012-01-26 21:50 ` Sergio Durigan Junior
2012-01-26 23:24 ` Kevin Buettner
2012-01-27 0:23 ` Kevin Buettner
2012-01-27 2:02 ` Mike Frysinger
2012-01-27 5:48 ` Joel Brobecker
2012-01-30 22:44 ` Kevin Buettner
2012-01-30 3:11 ` Yao Qi
2012-01-30 23:05 ` Kevin Buettner
2012-01-30 23:58 ` Kevin Buettner
2012-02-04 6:06 ` Kevin Buettner
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=201201261329.02115.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=palves@redhat.com \
/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