sim: invert sim_state storage
authorMike Frysinger <vapier@gentoo.org>
Fri, 22 Jan 2016 02:00:25 +0000 (21:00 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 17 May 2021 04:42:55 +0000 (00:42 -0400)
commit383861bd08c47a160f54351e6b8519140b9aad8e
treedc43aadd66fbcc1f7cf18d8bebd7b14740086e48
parent92bc001e1f91390b8e009c29e75f4e8b9be02d76
sim: invert sim_state storage

Currently all ports have to declare sim_state themselves in their
sim-main.h and then embed the common sim_state_base & sim_cpu in it.
This dynamic makes it impossible to share common object code among
multiple ports because the core data structure is always different.

Let's invert this relationship: common code declares sim_state, and
if the port actually needs state on a per-instance basis, it can use
the new arch_data field for it.  Most ports don't actually use it,
so they don't need to declare anything at all.

This is the first in a series of changes: it adds a define to select
between the old & new layouts, then converts all the ports that don't
need custom state over to the new layout.
33 files changed:
sim/aarch64/ChangeLog
sim/aarch64/sim-main.h
sim/arm/ChangeLog
sim/arm/sim-main.h
sim/common/ChangeLog
sim/common/sim-base.h
sim/common/sim-utils.c
sim/cr16/ChangeLog
sim/cr16/sim-main.h
sim/d10v/ChangeLog
sim/d10v/sim-main.h
sim/example-synacor/ChangeLog
sim/example-synacor/sim-main.h
sim/ft32/ChangeLog
sim/ft32/sim-main.h
sim/m68hc11/ChangeLog
sim/m68hc11/sim-main.h
sim/mcore/ChangeLog
sim/mcore/sim-main.h
sim/microblaze/ChangeLog
sim/microblaze/sim-main.h
sim/mn10300/ChangeLog
sim/mn10300/sim-main.h
sim/moxie/ChangeLog
sim/moxie/sim-main.h
sim/msp430/ChangeLog
sim/msp430/sim-main.h
sim/pru/ChangeLog
sim/pru/sim-main.h
sim/sh/ChangeLog
sim/sh/sim-main.h
sim/v850/ChangeLog
sim/v850/sim-main.h