summaryrefslogtreecommitdiff
path: root/target-sh4/cpu.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-16cpu: Add CPUArchState pointer to CPUStateAndreas Färber1-0/+2
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. The field may not be called "env" due to it being poisoned. Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16target-sh4: Move TCG initialization to SuperHCPU initfnAndreas Färber1-0/+4
Add a tcg_enabled() check to suppress it for qtest. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16target-sh4: Introduce QOM realizefn for SuperHCPUAndreas Färber1-0/+14
Introduce a realizefn and set realized = true in cpu_sh4_init(). Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-01target-sh4: Mark as unmigratableAndreas Färber1-0/+9
It neither defined CPU_SAVE_VERSION nor implemented cpu{save,load}(). Mark it as unmigratable at device level. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com>
2013-01-15cpu: Move cpu_index field to CPUStateAndreas Färber1-1/+1
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(). Acked-by: Richard Henderson <rth@twiddle.net> (for alpha) [AF: Rebased onto ppc CPU subclasses and openpic changes] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-30target-sh4: Start QOM'ifying CPU initAndreas Färber1-0/+11
Move code from cpu_sh4_init() into a QOM initfn. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-30target-sh4: QOM'ify CPU resetAndreas Färber1-1/+20
Move code from cpu_state_reset() to QOM superh_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2012-04-30target-sh4: QOM'ify CPUAndreas Färber1-0/+60
Embed CPUSH4State as first member of SuperHCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>