[RFC] Add support for the Renesas rl78 architecture
Mike Frysinger
vapier@gentoo.org
Thu Jan 26 02:24:00 GMT 2012
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)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120126/e60093f7/attachment.sig>
More information about the Gdb-patches
mailing list