qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jay Foad <jay.foad@gmail.com>
Cc: qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers
Date: Wed, 16 Jan 2013 11:47:14 +0100	[thread overview]
Message-ID: <50F68532.2060506@redhat.com> (raw)
In-Reply-To: <CANd1uZnP_mw2HVsXg6203JerCb2+jAgjDggpQySTMn--eNd5-A@mail.gmail.com>

Il 16/01/2013 10:09, Jay Foad ha scritto:
>> @@ -621,6 +627,87 @@ static TCGArg *tcg_constant_folding(TCGContext *s,
>> uint16_t *tcg_opc_ptr,
>>              break;
>>          }
>>
>> +        /* Simplify using known-zero bits */
>> +        mask = -1;
>> +        switch (op) {
>> +        CASE_OP_32_64(ext8s):
>> +            if ((temps[args[1]].mask & 0x80) != 0) {
>> +                break;
>> +            }
>> +        CASE_OP_32_64(ext8u):
>> +            mask = 0xff;
>> +            goto and_const;
>> +        CASE_OP_32_64(ext16s):
>> +            if ((temps[args[1]].mask & 0x8000) != 0) {
>> +                break;
>> +            }
>> +        CASE_OP_32_64(ext16u):
>> +            mask = 0xffff;
>> +            goto and_const;
>> +        case INDEX_op_ext32s_i64:
>> +            if ((temps[args[1]].mask & 0x80000000) != 0) {
>> +                break;
>> +            }
>> +        case INDEX_op_ext32u_i64:
>> +            mask = 0xffffffffU;
>> +            goto and_const;
>> +
>> +        CASE_OP_32_64(and):
>> +            mask = temps[args[2]].mask;
>> +            if (temps[args[2]].state == TCG_TEMP_CONST) {
>> +        and_const:
>> +                ;
>> +            }
> 
> What's the purpose of this "if"?

It is filled in by patch 3/3.

Paolo

  reply	other threads:[~2013-01-16 10:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16  9:09 [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers Jay Foad
2013-01-16 10:47 ` Paolo Bonzini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-11 23:42 [Qemu-devel] [PATCH 0/3] tcg-optimize with known-zero bits Richard Henderson
2013-01-11 23:42 ` [Qemu-devel] [PATCH 2/3] optimize: track nonzero bits of registers 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=50F68532.2060506@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jay.foad@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).