Commit 38a64f9dfe3555daac62b436d1750f097da05b3e
1 parent
e02aa686
fixed b[l] decoding
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@987 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
1 deletions
target-ppc/translate.c
... | ... | @@ -1520,7 +1520,10 @@ GEN_HANDLER(stfiwx, 0x1F, 0x17, 0x1E, 0x00000001, PPC_FLOAT) |
1520 | 1520 | /* b ba bl bla */ |
1521 | 1521 | GEN_HANDLER(b, 0x12, 0xFF, 0xFF, 0x00000000, PPC_FLOW) |
1522 | 1522 | { |
1523 | - uint32_t li = s_ext24(LI(ctx->opcode)), target; | |
1523 | + uint32_t li, target; | |
1524 | + | |
1525 | + /* sign extend LI */ | |
1526 | + li = ((int32_t)LI(ctx->opcode) << 6) >> 6; | |
1524 | 1527 | |
1525 | 1528 | if (AA(ctx->opcode) == 0) |
1526 | 1529 | target = ctx->nip + li - 4; | ... | ... |