diff options
author | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-03 18:51:23 +0000 |
---|---|---|
committer | malc <malc@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-03 18:51:23 +0000 |
commit | 8c5e95d807b355200287ae32cda9b929dd8ed467 (patch) | |
tree | 265801236dce6306cf3961b8a26faba7cbe26244 /tcg/ppc/tcg-target.c | |
parent | 551bd27f22638c854c43d7e6417d549764311c31 (diff) |
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
Diffstat (limited to 'tcg/ppc/tcg-target.c')
-rw-r--r-- | tcg/ppc/tcg-target.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index 39319903cd..c69a39eb9e 100644 --- a/tcg/ppc/tcg-target.c +++ b/tcg/ppc/tcg-target.c @@ -415,7 +415,7 @@ static void tcg_out_b (TCGContext *s, int mask, tcg_target_long target) disp = target - (tcg_target_long) s->code_ptr; if ((disp << 6) >> 6 == disp) - tcg_out32 (s, B | disp | mask); + tcg_out32 (s, B | (disp & 0x3fffffc) | mask); else { tcg_out_movi (s, TCG_TYPE_I32, 0, (tcg_target_long) target); tcg_out32 (s, MTSPR | RS (0) | CTR); |