]> git.proxmox.com Git - qemu.git/commitdiff
x86_64 call Ev fix
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 31 Jan 2005 23:31:02 +0000 (23:31 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 31 Jan 2005 23:31:02 +0000 (23:31 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1259 c046a42c-6fe2-441c-8c8c-71466251a162

target-i386/op.c
target-i386/translate.c

index 79545b51a9c753857401be1170ddd50cb2d1d76c..933595da653f55444e2200bf0e2b73e8382e1961 100644 (file)
@@ -517,6 +517,11 @@ void OPPROTO op_movq_T0_im64(void)
     T0 = PARAMQ1;
 }
 
+void OPPROTO op_movq_T1_im64(void)
+{
+    T1 = PARAMQ1;
+}
+
 void OPPROTO op_movq_A0_im(void)
 {
     A0 = (int32_t)PARAM1;
index 46bf933c9c645a1d16ec07b18e38546c520eea97..482642aa9c08f13059740d324a7585c81c239f82 100644 (file)
@@ -2216,6 +2216,19 @@ static void gen_movtl_T0_im(target_ulong val)
 #endif
 }
 
+static void gen_movtl_T1_im(target_ulong val)
+{
+#ifdef TARGET_X86_64    
+    if ((int32_t)val == val) {
+        gen_op_movl_T1_im(val);
+    } else {
+        gen_op_movq_T1_im64(val >> 32, val);
+    }
+#else
+    gen_op_movl_T1_im(val);
+#endif
+}
+
 static GenOpFunc1 *gen_ldq_env_A0[3] = {
     gen_op_ldq_raw_env_A0,
 #ifndef CONFIG_USER_ONLY
@@ -3391,7 +3404,7 @@ static target_ulong disas_insn(DisasContext *s, target_ulong pc_start)
             if (s->dflag == 0)
                 gen_op_andl_T0_ffff();
             next_eip = s->pc - s->cs_base;
-            gen_op_movl_T1_im(next_eip);
+            gen_movtl_T1_im(next_eip);
             gen_push_T1(s);
             gen_op_jmp_T0();
             gen_eob(s);