Commit 8c5e95d807b355200287ae32cda9b929dd8ed467
1 parent
551bd27f
Mask LL portion of B to 24 bits in tcg_out_b (Thanks to Thiemo Seufer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4841 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
1 additions
and
1 deletions
tcg/ppc/tcg-target.c
... | ... | @@ -415,7 +415,7 @@ static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target) |
415 | 415 | |
416 | 416 | disp = target - (tcg_target_long) s->code_ptr; |
417 | 417 | if ((disp << 6) >> 6 == disp) |
418 | - tcg_out32 (s, B | disp | mask); | |
418 | + tcg_out32 (s, B | (disp & 0x3fffffc) | mask); | |
419 | 419 | else { |
420 | 420 | tcg_out_movi (s, TCG_TYPE_I32, 0, (tcg_target_long) target); |
421 | 421 | tcg_out32 (s, MTSPR | RS (0) | CTR); | ... | ... |