target/ppc: Fix msync to do what hardware does
commit27a3ea7eff2af5d8049d911802be4b13145491fc
authorBALATON Zoltan <balaton@eik.bme.hu>
Sat, 26 Jan 2019 14:50:28 +0000 (26 15:50 +0100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sun, 17 Feb 2019 10:54:02 +0000 (17 21:54 +1100)
tree453fb7e1fa09b9f70b54e0babcd92a85199bd367
parent707c7c2ee1f6fb425a3c78f587feda7cd8501905
target/ppc: Fix msync to do what hardware does

According to BookE docs, invalid bits (while undefined behaviour) should
not raise exception but be ignored. This seems to be implementation
dependent though and QEMU currently does what e500 CPUs do and raise
exception for invalid bits. Unfortunately some versions of libstdc++
(and so all programs compiled with it) have lwsync on PPC440 which is
invalid but on real hardware it's just executed as msync ignoring the
invalid bits (maybe that's why it got undetected) but they fail on QEMU.
This patch changes invalid mask of msync to allow these programs to run
but keep generating exception on e500 cores to follow what hardware does.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/translate.c