sim: sh: rework register layout with anonymous unions & structs
authorMike Frysinger <vapier@gentoo.org>
Sat, 6 Nov 2021 16:44:56 +0000 (12:44 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 7 Nov 2021 00:32:31 +0000 (20:32 -0400)
commit74bbe64132d675b9a5c459f4140c6c566c7ca1bf
treea1be45e9a9bc2ff74d2c2e72a57ac5459f9e2535
parenteea68ebb33f5a221d9ac8335ddff68d07246720a
sim: sh: rework register layout with anonymous unions & structs

Now that we require C11, we can leverage anonymous unions & structs
to fix a long standing issue with the SH register layout.  The use
of sregs.i for sh-dsp has generated a lot of compiler warnings about
the access being out of bounds -- it only has 7 elements declared,
but code goes beyond that to reach into the fregs that follow.  But
now that we have anonymous unions, we can reduce the nested names
and have sregs cover all of these registers.
sim/sh/gencode.c
sim/sh/interp.c
sim/sh/sim-main.h