]> xenbits.xensource.com Git - qemu-xen.git/commit
target/ppc: used ternary operator when registering MAS
authorBruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Tue, 25 May 2021 11:53:52 +0000 (08:53 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 3 Jun 2021 03:22:06 +0000 (13:22 +1000)
commit52e9612ee94b58a1bc57242427b4dbe6c766d8f3
tree9858f20f554e61498559aa368fd22a96b26fb04d
parentac559ecbea2649819e7b3fdd09f4e0243e0128db
target/ppc: used ternary operator when registering MAS

The write calback decision when registering the MAS SPR has been turned
into a ternary operation, rather than an if-then-else block.

This was done because when building without TCG, even though the
compiler will optimize away the pointers to spr_write_generic*, it
doesn't optimize away the decision and assignment to the local pointer,
creating compiler errors. This cleanup looked better than using ifdefs,
so  we decided to with it.

Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210525115355.8254-2-bruno.larsen@eldorado.org.br>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu_init.c