OSDN Git Service

target/ppc: Simplify cpu valid check in ppc_cpu_realize
authorDavid Gibson <david@gibson.dropbear.id.au>
Fri, 23 Mar 2018 01:55:04 +0000 (12:55 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 27 Apr 2018 08:05:22 +0000 (18:05 +1000)
commit197600ecc4f81b9be5e233d8a1cbf42a48cdd371
tree52147ba395760a5946f8cb58c299ebbd602ce33e
parente850da556d69363e6846ab00ddcbf7cb55203981
target/ppc: Simplify cpu valid check in ppc_cpu_realize

The #if isn't necessary, because there's a suitable one inside
ppc_cpu_is_valid().  We've already filtered for suitable cpu models in the
functions that search and register them.  So by the time we get to realize
having an invalid one indicates a code error, not a user error, so an
assert() is more appropriate than error_setg().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
target/ppc/translate_init.c