mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-03-04 09:04:39 -07:00
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>
This commit is contained in:
parent
13f5086783
commit
ab4f174bae
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue