diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-17 09:53:42 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-17 09:53:42 +0000 |
commit | 7221fa98d381a19b8809979934554644381fb88c (patch) | |
tree | 19e03655ed2c797c4c2c8c949bb854c33c75f44a /softmmu_template.h | |
parent | 7fbfb139ec0b3d3572369db977ea354c274dabdf (diff) |
Check permissions for the last byte first in unaligned slow_st accesses (patch from TeLeMan).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3665 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'softmmu_template.h')
-rw-r--r-- | softmmu_template.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/softmmu_template.h b/softmmu_template.h index 89b2f38c84..a0a2c38ab6 100644 --- a/softmmu_template.h +++ b/softmmu_template.h @@ -282,7 +282,7 @@ static void glue(glue(slow_st, SUFFIX), MMUSUFFIX)(target_ulong addr, } else if (((addr & ~TARGET_PAGE_MASK) + DATA_SIZE - 1) >= TARGET_PAGE_SIZE) { do_unaligned_access: /* XXX: not efficient, but simple */ - for(i = 0;i < DATA_SIZE; i++) { + for(i = DATA_SIZE - 1; i >= 0; i--) { #ifdef TARGET_WORDS_BIGENDIAN glue(slow_stb, MMUSUFFIX)(addr + i, val >> (((DATA_SIZE - 1) * 8) - (i * 8)), mmu_idx, retaddr); |