Statistics
| Branch: | Revision:

root / target-sh4 / cpu.c @ db895a1e

History | View | Annotate | Download (7.6 kB)

# Date Author Comment
97a8ea5a 03/12/2013 11:35 am Andreas Färber

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.

It will also allow to override the interrupt handling for certain CPU...

c1b382e7 03/12/2013 11:35 am Andreas Färber

target-sh4: Introduce SuperHCPU subclasses

Store legacy name in SuperHCPUClass for -cpu ? and for case-insensitive
class lookup.

List CPUs by iterating over TYPE_SUPERH_CPU subclasses.

Signed-off-by: Andreas Färber <>

b350ab75 03/12/2013 11:35 am Andreas Färber

target-sh4: Move PVR/PRR/CVR into SuperHCPUClass

They are never changed once initialized, and moving them to the class
will allow to inspect them before instantiating.

Signed-off-by: Andreas Färber <>

c05efcb1 02/16/2013 03:51 pm Andreas Färber

cpu: Add CPUArchState pointer to CPUState

The target-specific ENV_GET_CPU() macros have allowed us to navigate
from CPUArchState to CPUState. The reverse direction was not supported.
Avoid introducing CPU_GET_ENV() macros by initializing an untyped
pointer that is initialized in derived instance_init functions....

aa7408ec 02/16/2013 03:50 pm Andreas Färber

target-sh4: Move TCG initialization to SuperHCPU initfn

Add a tcg_enabled() check to suppress it for qtest.

Signed-off-by: Andreas Färber <>

55acb588 02/16/2013 03:50 pm Andreas Färber

target-sh4: Introduce QOM realizefn for SuperHCPU

Introduce a realizefn and set realized = true in cpu_sh4_init().

Signed-off-by: Andreas Färber <>

1e45d31b 02/01/2013 02:35 am Andreas Färber

target-sh4: Mark as unmigratable

It neither defined CPU_SAVE_VERSION nor implemented cpu{save,load}().
Mark it as unmigratable at device level.

Signed-off-by: Andreas Färber <>
Reviewed-by: Juan Quintela <>

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

339894be 04/30/2012 12:32 pm Andreas Färber

target-sh4: QOM'ify CPU

Embed CPUSH4State as first member of SuperHCPU.

Let CPUClass::reset() call cpu_state_reset() for now.

Signed-off-by: Andreas Färber <>
Reviewed-by: Peter Maydell <>

c4bb0f99 04/30/2012 12:32 pm Andreas Färber

target-sh4: QOM'ify CPU reset

Move code from cpu_state_reset() to QOM superh_cpu_reset().

Signed-off-by: Andreas Färber <>
Reviewed-by: Peter Maydell <>

2b4b4906 04/30/2012 12:32 pm Andreas Färber

target-sh4: Start QOM'ifying CPU init

Move code from cpu_sh4_init() into a QOM initfn.

Signed-off-by: Andreas Färber <>