aboutsummaryrefslogtreecommitdiff
path: root/target/ppc/translate.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/ppc/translate.c')
-rw-r--r--target/ppc/translate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index 01233e8b6d..606b605ba0 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -2880,7 +2880,7 @@ static void gen_lswi(DisasContext *ctx)
}
if (nb == 0)
nb = 32;
- nr = (nb + 3) / 4;
+ nr = DIV_ROUND_UP(nb, 4);
if (unlikely(lsw_reg_in_range(start, nr, ra))) {
gen_inval_exception(ctx, POWERPC_EXCP_INVAL_LSWX);
return;