Skip to content

Commit

Permalink
tcg-ppc64: rotr_i32 rotates wrong amount
Browse files Browse the repository at this point in the history
rotr_i32 calculates the amount to left shift and puts it into a
temporary, but then doesn't use it when doing the shift.

Cc: [email protected]
Signed-off-by: Anton Blanchard <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
  • Loading branch information
antonblanchard authored and rth7680 committed Jun 17, 2013
1 parent 8424735 commit d1bdd3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tcg/ppc64/tcg-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ static void tcg_out_op (TCGContext *s, TCGOpcode opc, const TCGArg *args,
tcg_out_rlw(s, RLWINM, args[0], args[1], 32 - args[2], 0, 31);
} else {
tcg_out32(s, SUBFIC | TAI(0, args[2], 32));
tcg_out32(s, RLWNM | SAB(args[1], args[0], args[2])
tcg_out32(s, RLWNM | SAB(args[1], args[0], 0)
| MB(0) | ME(31));
}
break;
Expand Down

0 comments on commit d1bdd3a

Please sign in to comment.