qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] tcg: Add TYPE parameter to tcg_out_mov.
Date: Fri, 28 May 2010 14:35:27 -0700	[thread overview]
Message-ID: <4C00371F.5070301@twiddle.net> (raw)
In-Reply-To: <20100528182121.GA4621@ohm.aurel32.net>

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~

  reply	other threads:[~2010-05-28 21:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 23:30 [Qemu-devel] [PATCH 0/2] two tcg improvements Richard Henderson
2010-05-03 23:30 ` [Qemu-devel] [PATCH 1/2] tcg: Add TYPE parameter to tcg_out_mov Richard Henderson
2010-05-28 18:21   ` Aurelien Jarno
2010-05-28 21:35     ` Richard Henderson [this message]
2010-05-03 23:30 ` [Qemu-devel] [PATCH 2/2] tcg: Use INDEX_op_qemu_ld32 for 32-bit results Richard Henderson
2010-05-28 18:22   ` Aurelien Jarno
2010-05-17 18:31 ` [Qemu-devel] [PATCH 0/2] two tcg improvements Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2010-06-03  0:26 [Qemu-devel] [PATCH 0/2] tcg cleanups, part 4 Richard Henderson
2010-06-03  0:26 ` [Qemu-devel] [PATCH 1/2] tcg: Add TYPE parameter to tcg_out_mov Richard Henderson
2010-06-04 19:19   ` Blue Swirl
2010-06-04 19:34     ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C00371F.5070301@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).