diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-06 19:50:16 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-06 19:50:16 +0000 |
commit | 06057e6f6ce06b92d552a851a91f9d6ca250970c (patch) | |
tree | 224a8fd829272dd356f40a122d108fca7954c996 /target-sparc/op_helper.c | |
parent | 43e9e742b96ce2e94e76b53e96db3e22df3c4083 (diff) | |
download | hqemu-06057e6f6ce06b92d552a851a91f9d6ca250970c.zip hqemu-06057e6f6ce06b92d552a851a91f9d6ca250970c.tar.gz |
Fix faligndata (Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4992 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-sparc/op_helper.c')
-rw-r--r-- | target-sparc/op_helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index f8f94ac..3cc4f50 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -234,7 +234,10 @@ void helper_faligndata(void) uint64_t tmp; tmp = (*((uint64_t *)&DT0)) << ((env->gsr & 7) * 8); - tmp |= (*((uint64_t *)&DT1)) >> (64 - (env->gsr & 7) * 8); + /* on many architectures a shift of 64 does nothing */ + if ((env->gsr & 7) != 0) { + tmp |= (*((uint64_t *)&DT1)) >> (64 - (env->gsr & 7) * 8); + } *((uint64_t *)&DT0) = tmp; } |