aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2024-05-01 23:04:33 +1000
committerNicholas Piggin <npiggin@gmail.com>2024-05-24 08:57:50 +1000
commitab4f174baee4b28b454fc94a7de2978c13a423ac (patch)
tree8209e13f2e00fa2b3d780fec6af9075a60fdc61c /target
parent13f50867837874892f33c32a4452843d9ce7144c (diff)
downloadqemu-ab4f174baee4b28b454fc94a7de2978c13a423ac.zip
qemu-ab4f174baee4b28b454fc94a7de2978c13a423ac.tar.gz
qemu-ab4f174baee4b28b454fc94a7de2978c13a423ac.tar.bz2
target/ppc: Fix embedded memory barriers
Memory barriers are supposed to do something on BookE systems, these were probably just missed during MTTCG enablement, maybe no targets support SMP. Either way, add proper BookE implementations. Reviewed-by: Chinmay Rath <rathc@linux.ibm.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Diffstat (limited to 'target')
-rw-r--r--target/ppc/translate/misc-impl.c.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/ppc/translate/misc-impl.c.inc b/target/ppc/translate/misc-impl.c.inc
index cb1a2b7..7574317 100644
--- a/target/ppc/translate/misc-impl.c.inc
+++ b/target/ppc/translate/misc-impl.c.inc
@@ -34,8 +34,7 @@ static bool trans_SYNC(DisasContext *ctx, arg_X_sync *a)
*/
if (!(ctx->insns_flags & PPC_MEM_SYNC)) {
if (ctx->insns_flags & PPC_BOOKE) {
- /* msync replaces sync on 440, interpreted as nop */
- /* XXX: this also catches e200 */
+ tcg_gen_mb(bar | TCG_BAR_SC);
return true;
}
@@ -75,6 +74,7 @@ static bool trans_EIEIO(DisasContext *ctx, arg_EIEIO *a)
if (!(ctx->insns_flags & PPC_MEM_EIEIO)) {
if ((ctx->insns_flags & PPC_BOOKE) ||
(ctx->insns_flags2 & PPC2_BOOKE206)) {
+ tcg_gen_mb(bar | TCG_BAR_SC);
return true;
}
return false;