From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37674 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OI7DK-0005Ss-AV for qemu-devel@nongnu.org; Fri, 28 May 2010 17:35:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OI7DG-0006xZ-1x for qemu-devel@nongnu.org; Fri, 28 May 2010 17:35:30 -0400 Received: from are.twiddle.net ([75.149.56.221]:34150) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OI7DF-0006xK-TC for qemu-devel@nongnu.org; Fri, 28 May 2010 17:35:30 -0400 Message-ID: <4C00371F.5070301@twiddle.net> Date: Fri, 28 May 2010 14:35:27 -0700 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 1/2] tcg: Add TYPE parameter to tcg_out_mov. References: <1272929448-4223-1-git-send-email-rth@twiddle.net> <1272929448-4223-2-git-send-email-rth@twiddle.net> <20100528182121.GA4621@ohm.aurel32.net> In-Reply-To: <20100528182121.GA4621@ohm.aurel32.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org On 05/28/2010 11:21 AM, Aurelien Jarno wrote: >> + tcg_out_mov(s, TCG_TYPE_PTR, data_reg, arg0); > > Is it something correct? This refers to a data register according to the > name of the variable. > >> break; >> } >> >> @@ -1007,10 +1007,10 @@ static void tcg_out_qemu_st(TCGContext *s, const TCGArg *args, >> tcg_out32(s, 0); >> >> /* mov (delay slot) */ >> - tcg_out_mov(s, arg0, addr_reg); >> + tcg_out_mov(s, TCG_TYPE_PTR, arg0, addr_reg); > > Here this looks correct > >> /* mov */ >> - tcg_out_mov(s, arg1, data_reg); >> + tcg_out_mov(s, TCG_TYPE_PTR, arg1, data_reg); > > Here not. > > I am also a bit puzzled that TCG_TYPE_PTR only appears on the sparc > target, though I haven't looked at the code, it might be normal. Most targets I didn't bother to figure out whether the item is or isn't a pointer. I.e. on arm/hppa/ppc/mips targets I simply always used _I32, and on ppc64 target I always used _I64. Sparc is, at present, the only target that supports multiple register sizes. The only TCG_TYPE_FOO we have that corresponds to the current register size is TCG_TYPE_PTR; there isn't a TCG_TYPE_REG or whatever that documents that we want to move an object of the native register size. Not that it *really* matters for sparc, since there is one common move insn for both 32-bit and 64-bit mode, but I thought _PTR was slightly more correct than using either _I32 or _I64. r~