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~