aboutsummaryrefslogtreecommitdiff
path: root/target-microblaze/translate.c
diff options
context:
space:
mode:
authorEdgar E. Iglesias <edgar.iglesias@gmail.com>2009-09-03 22:28:21 +0200
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2009-09-03 22:28:21 +0200
commit3aa80988430f41847e1b78d165440ac03503b6d0 (patch)
treea50f6c43406e897d82e5e4c20134eb2922a5ae1e /target-microblaze/translate.c
parentfaed1c2a23373e5b6a77c9b2c6e2a01160ea5c30 (diff)
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c
index 3c69160135..b180d24b0e 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);