diff options
author | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2009-09-03 22:28:21 +0200 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@gmail.com> | 2009-09-03 22:28:21 +0200 |
commit | 3aa80988430f41847e1b78d165440ac03503b6d0 (patch) | |
tree | a50f6c43406e897d82e5e4c20134eb2922a5ae1e /target-microblaze/translate.c | |
parent | microblaze: Trap on bus accesses to unmapped areas. (diff) | |
download | qemu-kvm-3aa80988430f41847e1b78d165440ac03503b6d0.tar.gz qemu-kvm-3aa80988430f41847e1b78d165440ac03503b6d0.tar.bz2 qemu-kvm-3aa80988430f41847e1b78d165440ac03503b6d0.zip |
microblaze: Compute masks for alignment checks at translation time.
Thanks to Blue Swirl for reporting.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'target-microblaze/translate.c')
-rw-r--r-- | target-microblaze/translate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c index 3c6916013..b180d24b0 100644 --- a/target-microblaze/translate.c +++ b/target-microblaze/translate.c @@ -814,7 +814,7 @@ static void dec_load(DisasContext *dc) /* Verify alignment if needed. */ if ((dc->env->pvr.regs[2] & PVR2_UNALIGNED_EXC_MASK) && size > 1) { gen_helper_memalign(*addr, tcg_const_tl(dc->rd), - tcg_const_tl(0), tcg_const_tl(size)); + tcg_const_tl(0), tcg_const_tl(size - 1)); } if (dc->rd) { @@ -858,7 +858,7 @@ static void dec_store(DisasContext *dc) /* Verify alignment if needed. */ if ((dc->env->pvr.regs[2] & PVR2_UNALIGNED_EXC_MASK) && size > 1) { gen_helper_memalign(*addr, tcg_const_tl(dc->rd), - tcg_const_tl(1), tcg_const_tl(size)); + tcg_const_tl(1), tcg_const_tl(size - 1)); } gen_store(dc, *addr, cpu_R[dc->rd], size); |