qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] tcg: Generic support for conditional set


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 1/5] tcg: Generic support for conditional set
Date: Tue, 22 Dec 2009 08:09:06 -0800
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0

On 12/22/2009 03:27 AM, Laurent Desnogues wrote:
+#if TCG_TARGET_REG_BITS == 64
+    tcg_gen_op4i_i64(INDEX_op_setcond_i64, ret, arg1, arg2, cond);
+#else
+    tcg_gen_op6i_i32(INDEX_op_setcond2_i32, TCGV_LOW(ret),
+                     TCGV_LOW(arg1), TCGV_HIGH(arg1),
+                     TCGV_LOW(arg2), TCGV_HIGH(arg2), cond);
+    tcg_gen_movi_i32(TCGV_HIGH(ret), 0);
+#endif
+}

I wonder if it wouldn't be better to let the back-ends emit the
clearing of TCGV_HIGH(ret).  This would reduce the number
of emitted TCG ops.  Any thoughts?

(1) That would require 6 registers on i386 simultaneously.
(2) You lose the constant propagation that TCG would perform.


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]