From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23499 invoked by alias); 26 Jan 2012 18:28:26 -0000 Received: (qmail 23491 invoked by uid 22791); 26 Jan 2012 18:28:25 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,TW_XF,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Jan 2012 18:28:11 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id D11261B400A; Thu, 26 Jan 2012 18:28:10 +0000 (UTC) From: Mike Frysinger To: Pedro Alves Subject: Re: [RFC] Add support for the Renesas rl78 architecture Date: Thu, 26 Jan 2012 19:16:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; ) Cc: gdb-patches@sourceware.org, Kevin Buettner References: <20120125165800.5351c291@mesquite.lan> <201201252118.06928.vapier@gentoo.org> <4F210048.3000900@redhat.com> In-Reply-To: <4F210048.3000900@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1892538.cEInQ6SKmS"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201201261329.02115.vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00916.txt.bz2 --nextPart1892538.cEInQ6SKmS Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1091 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 <=3D regno && regno <=3D > >> sim_rl78_bank0_r7_regnum) > >> + return 0xffef8 + (regno - sim_rl78_bank0_r0_regnum); > >=20 > > the if statements look funny because the operators are reversed. a more > >=20 > > natural (imo) check: > > if (regno >=3D sim_rl78_bank0_r0_regnum && regno <=3D > > sim_rl78_bank0_r7_regnum) >=20 > Funny, I also usually go with Kevin's style. My rationale is that >=20 > LOWER_RANGE <=3D N && N <=3D UPPER_RANGE >=20 > looks more like the mathematical >=20 > LOWER_RANGE <=3D N <=3D UPPER_RANGE >=20 > and thus reads more naturally to me. if you guys are used to it, then that's fine. not like i'm maintaining thi= s=20 section of code :). sim stuff looks OK by me -mike --nextPart1892538.cEInQ6SKmS Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJPIZtuAAoJEEFjO5/oN/WBkhsP/jyajlgI9uhkEE87qcXhqoIe kjhQm59rAlLRZElyOIyvpRmIJDgHez2mbfcQyhWPe9KqmnNxbUdPyos0+ABzTOyy Fm3LLXN1VJ60LpkvpRGv1ZVrYW8d1eDLNmBy/jfjtIybvdgv4XTKpRdKsksfkFRs TsEEAceTO31xMQ4r0DRUjwA4vcDBLcpirwBMsizqr0OO+3Bt/2lcGDwh8enDNL6S 8irfNk+K6sulL04c1+JRcmPa55BumYCpQUdeiptQHRfR9ST1HxFja+A9tlmNvJGC sqALIJmsUTwa/yGk3B/Yf8J3s+fpSATA7tlYhL/KgXwUQZ1PsTzymLuU1kfADug6 PK7IHGpHICemXoez5Dye6huUw91LWj0Tup+tVAkoGvivUHr+eoJiEWQRZMm5lQnf klKlK1XUumuXhyh9yOtLSJqm7UpqGlFMmxfQfL6H4Ypir9JCnON4YtgOMgP4X2ep D2RFvQa4zgAw9YVSgrd5UnPuxqzWm/RtiQ27x0VVsRBg3UwbKeQaGeGp2XBvmTW7 7WQpmbhe9b5TbJCkJy36YWtPmMnpDYSvFvftM33Cr3ICW4fbDd6JwsyPZ8ywsi7Q O131w1SwO9iziP9uJmPnEw60zLOi54jeFv6RNuExd+rbVmwqO9l4Tcw+OcvqPtny C5HxDl3ixSpRFKr9VtyY =Yt0j -----END PGP SIGNATURE----- --nextPart1892538.cEInQ6SKmS--