qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC qom-cpu v2 0/2] target-sh4: SuperHCPU subclasses
@ 2013-01-21  3:28 Andreas Färber
  2013-01-21  3:28 ` [Qemu-devel] [RFC qom-cpu v2 1/2] target-sh4: Introduce " Andreas Färber
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andreas Färber @ 2013-01-21  3:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: Igor Mammedov, Andreas Färber, Aurélien Jarno,
	Eduardo Habkost

Hello,

This series introduces SuperH CPU subclasses.
The first conversion to QOM patch had used a declarative approach reusing
sh4_def_t as SuperHCPUInfo. This approach now uses imperative instance_init
functions. To preserve -cpu ? output and case-insensitivity, distinct name
and type name are used, but allowing use of the type name as done for alpha.

TODO: guard against abstract types (may apply to other targets as well)
TODO: move class -> name lookup to cpu.c?

This series in context:
+ qom-cpu cleanups and bugfixes being queued for 1.4
+ CPUState QOM realizefn and initfn RFC for 1.5 / qom-cpu-next
~ SuperHCPU subclasses (this series)
- SH7750 QOM'ification (to be rebased)
- cross-target refactoring of cpu_init() and "realized" behavior (TBD)

Available for testing at:
git://github.com/afaerber/qemu-cpu.git qom-cpu-sh4-classes.v2
https://github.com/afaerber/qemu-cpu/commits/qom-cpu-sh4-classes.v2

Regards,
Andreas

v2:
* Fixed bug in class name comparison, spotted by Igor.
* Refactored name -> ObjectClass mapping into new function.
* Moved realizefn patch into CPUState series, rebased.

v1 -> preview on GitHub:
* Redone, using combination of initfn and class_init instead of SuperHCPUInfo.
* Adopted naming scheme suggested by Eduardo.
* Split out SuperHCPUClass field movements into separate patch.

Cc: Aurélien Jarno <aurelien@aurel32.net>

Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>

Andreas Färber (2):
  target-sh4: Introduce SuperHCPU subclasses
  target-sh4: Move PVR/PRR/CVR into SuperHCPUClass

 hw/sh7750.c            |   10 ++--
 target-sh4/cpu-qom.h   |   13 +++++
 target-sh4/cpu.c       |  124 +++++++++++++++++++++++++++++++++++++++++++++++-
 target-sh4/cpu.h       |    3 --
 target-sh4/translate.c |   94 +++++++++++++-----------------------
 5 Dateien geändert, 175 Zeilen hinzugefügt(+), 69 Zeilen entfernt(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-21  3:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21  3:28 [Qemu-devel] [RFC qom-cpu v2 0/2] target-sh4: SuperHCPU subclasses Andreas Färber
2013-01-21  3:28 ` [Qemu-devel] [RFC qom-cpu v2 1/2] target-sh4: Introduce " Andreas Färber
2013-01-21  3:28 ` [Qemu-devel] [RFC qom-cpu v2 2/2] target-sh4: Move PVR/PRR/CVR into SuperHCPUClass Andreas Färber
2013-01-21  3:45 ` [Qemu-devel] [RFC qom-cpu v2 0/2] target-sh4: SuperHCPU subclasses Andreas Färber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).