diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-04-18 11:11:45 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-04-18 11:11:45 +0100 |
commit | ba3899507acfaeee4815beee670c1d80f6f18570 (patch) | |
tree | b0cf7066303228bcd21c9e1991247df2232eade8 /target-ppc/translate.c | |
parent | adde0204e4edbebfeb77d244cad7d9d8be7ed7e0 (diff) | |
parent | aa378598fea819b15c00d48048bedfa0dc631132 (diff) | |
download | qemu-ba3899507acfaeee4815beee670c1d80f6f18570.tar.gz |
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.6-20160418' into staging
ppc patch queue for 2-16-04-18
Three bugfixe patches for 2.6 here.
* Two for bad implementation of some of the strong load/store
instructions
* One for bad migration of the XER register. This is a regression
from 2.5, cause by a change in the way we represent at XER during
runtime.
# gpg: Signature made Mon 18 Apr 2016 06:17:03 BST using RSA key ID 20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392
* remotes/dgibson/tags/ppc-for-2.6-20160418:
ppc: Fix migration of the XER register
ppc: Fix the bad exception NIP value and the range check in LSWX
ppc: Fix the range check in the LSWI instruction
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-ppc/translate.c')
-rw-r--r-- | target-ppc/translate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 6f0e7b4fac..b3860ecdea 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -3227,10 +3227,8 @@ static void gen_lswi(DisasContext *ctx) if (nb == 0) nb = 32; - nr = nb / 4; - if (unlikely(((start + nr) > 32 && - start <= ra && (start + nr - 32) > ra) || - ((start + nr) <= 32 && start <= ra && (start + nr) > ra))) { + nr = (nb + 3) / 4; + if (unlikely(lsw_reg_in_range(start, nr, ra))) { gen_inval_exception(ctx, POWERPC_EXCP_INVAL_LSWX); return; } |