Skip to contentSkip to conversation

[4527] fixed zero shifts (64 bit case)

Qemu-devel Fabrice Bellard 1 participant 1 message May 22, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4527

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4527
Author:   bellard
Date:     2008-05-22 14:39:25 +0000 (Thu, 22 May 2008)

Log Message:
-----------
fixed zero shifts (64 bit case)

Modified Paths:
--------------
trunk/tcg/tcg.c

Modified: trunk/tcg/tcg.c
===================================================================

tcg/tcg.c +4 -3
@@ -622,9 +622,10 @@
 void tcg_gen_shifti_i64(TCGv ret, TCGv arg1, 
                         int c, int right, int arith)
 {
-    if (c == 0)
-        return;
-    if (c >= 32) {
+    if (c == 0) {
+        tcg_gen_mov_i32(ret, arg1);
+        tcg_gen_mov_i32(TCGV_HIGH(ret), TCGV_HIGH(arg1));
+    } else if (c >= 32) {
         c -= 32;
         if (right) {
             if (arith) {