summaryrefslogtreecommitdiff
path: root/tcg/ppc/tcg-target.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2010-02-27 01:59:47 +0300
committermalc <av1474@comtv.ru>2010-02-27 02:00:00 +0300
commitd616cf1d1510c963fc1876cb10f5f1fa226b54ef (patch)
tree2b9ad171eb84fbd8365ddf01c365e2f2acc6ebd1 /tcg/ppc/tcg-target.c
parentbc57c114b09e6b223abff451e78b8b95e53e6175 (diff)
downloadqemu-d616cf1d1510c963fc1876cb10f5f1fa226b54ef.tar.gz
tcg/ppc: Fix right rotation
Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'tcg/ppc/tcg-target.c')
-rw-r--r--tcg/ppc/tcg-target.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index 96cc461900..b40246d411 100644
--- a/tcg/ppc/tcg-target.c
+++ b/tcg/ppc/tcg-target.c
@@ -328,6 +328,7 @@ static int tcg_target_const_match(tcg_target_long val,
#define MULLI OPCD( 7)
#define CMPLI OPCD(10)
#define CMPI OPCD(11)
+#define SUBFIC OPCD( 8)
#define LWZU OPCD(33)
#define STWU OPCD(37)
@@ -1588,7 +1589,7 @@ static void tcg_out_op(TCGContext *s, int opc, const TCGArg *args,
}
}
else {
- tcg_out32 (s, ADDI | RT (0) | RA (args[2]) | 0xffe0);
+ tcg_out32 (s, SUBFIC | RT (0) | RA (args[2]) | 32);
tcg_out32 (s, RLWNM
| RA (args[0])
| RS (args[1])