]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg: fix sparc host for AREG0 free operation
authorBlue Swirl <blauwirbel@gmail.com>
Sun, 18 Mar 2012 19:15:32 +0000 (19:15 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 18 Mar 2012 19:15:32 +0000 (19:15 +0000)
e141ab52d2ea5d0bc6ad3b1ad32841127ca04adc didn't handle
the other memory access helper case, fix.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg/sparc/tcg-target.c

index 80f08186790cf98f5be7445a2da26e423572e286..491c9797d354d8801fc9e93a479b15161635871e 100644 (file)
@@ -1061,6 +1061,17 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args,
     /* mov */
     tcg_out_movi(s, TCG_TYPE_I32, arg2, mem_index);
 
+#ifdef CONFIG_TCG_PASS_AREG0
+    /* XXX/FIXME: suboptimal */
+    tcg_out_mov(s, TCG_TYPE_I32, tcg_target_call_iarg_regs[3],
+                tcg_target_call_iarg_regs[2]);
+    tcg_out_mov(s, TCG_TYPE_I64, tcg_target_call_iarg_regs[2],
+                tcg_target_call_iarg_regs[1]);
+    tcg_out_mov(s, TCG_TYPE_TL, tcg_target_call_iarg_regs[1],
+                tcg_target_call_iarg_regs[0]);
+    tcg_out_mov(s, TCG_TYPE_PTR, tcg_target_call_iarg_regs[0],
+                TCG_AREG0);
+#endif
     /* XXX: move that code at the end of the TB */
     /* qemu_st_helper[s_bits](arg0, arg1, arg2) */
     tcg_out32(s, CALL | ((((tcg_target_ulong)qemu_st_helpers[s_bits]