]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sim: h8300: simplify h8300_reg_{fetch,store} funcs
authorMike Frysinger <vapier@gentoo.org>
Wed, 30 Dec 2015 10:58:12 +0000 (05:58 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Dec 2015 11:02:27 +0000 (06:02 -0500)
commit2a2757ac7e849aa35fc519ddfcc8688a46b60448
tree3b6a6491587d047ab858e4ea0c6de0310ef58b07
parent4ca9d09e826e959f382ab45b2e1dfa8125135124
sim: h8300: simplify h8300_reg_{fetch,store} funcs

We can leverage the cpu->regs array rather than going through the
function helpers to get nice compact code.

Further, fix up the return values: return -1 when we can't find a
register (and let the caller write out warnings), return 2/4 when
we actually write out that amount, and handle the zero reg.
sim/h8300/ChangeLog
sim/h8300/compile.c