diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-07-07 22:06:01 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-07-07 22:06:01 +0000 |
commit | 38a64f9dfe3555daac62b436d1750f097da05b3e (patch) | |
tree | d8c8d15c7b45c91eb26386df9839b1b62bedc4cd /target-ppc | |
parent | e02aa6869e31385381ebadd8770895d8d5b8b3a4 (diff) |
fixed b[l] decoding
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@987 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc')
-rw-r--r-- | target-ppc/translate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target-ppc/translate.c b/target-ppc/translate.c index a3133fdfcf..e09e9a7fd1 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -1520,7 +1520,10 @@ GEN_HANDLER(stfiwx, 0x1F, 0x17, 0x1E, 0x00000001, PPC_FLOAT) /* b ba bl bla */ GEN_HANDLER(b, 0x12, 0xFF, 0xFF, 0x00000000, PPC_FLOW) { - uint32_t li = s_ext24(LI(ctx->opcode)), target; + uint32_t li, target; + + /* sign extend LI */ + li = ((int32_t)LI(ctx->opcode) << 6) >> 6; if (AA(ctx->opcode) == 0) target = ctx->nip + li - 4; |