target-unicore32: Detect attempt to instantiate non-CPU type in cpu_init()
commitd89e12188d50f7f8a894027789f32fa7ba6226ad
authorAndreas Färber <afaerber@suse.de>
Wed, 23 Jan 2013 11:07:17 +0000 (23 12:07 +0100)
committerAndreas Färber <afaerber@suse.de>
Sun, 27 Jan 2013 22:33:25 +0000 (27 23:33 +0100)
treee10fc11fa7f82fc4c85dfba0ef4426f292df5542
parentbd039ce0094f3724a87a193c846ee8468ce652b0
target-unicore32: Detect attempt to instantiate non-CPU type in cpu_init()

Consolidate model checking into a new uc32_cpu_class_by_name().

If the name matches an existing type, also check whether that type is
actually (a sub-type of) TYPE_UNICORE32_CPU.

This fixes, e.g., -cpu puv3_dma asserting.

Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
target-unicore32/cpu.c
target-unicore32/helper.c