public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* A question abt finding all register uses in instruction
@ 2011-10-24 12:58 Revital Eres
  2011-10-24 16:19 ` Ramana Radhakrishnan
  0 siblings, 1 reply; 2+ messages in thread
From: Revital Eres @ 2011-10-24 12:58 UTC (permalink / raw)
  To: gcc; +Cc: Ramana Radhakrishnan

Hello,

I am trying to extract the regsiter uses in instructions using note_uses
function. When encountering the following instruction I do not get r479
as a use; seemingly because of the following in note_use function:

       if (GET_CODE (dest) == ZERO_EXTRACT)
          {
            (*fun) (&XEXP (dest, 1), data);
            (*fun) (&XEXP (dest, 2), data);
          }

the instruction:

(insn 386 385 387 16 (set (zero_extract:SI (reg:SI 479)
            (const_int 16 [0x10])
            (const_int 16 [0x10]))
        (const_int 4112 [0x1010])) 343 {*arm_movtas_ze}
     (nil))

I appreciate any advise of how to resolve this -- should I add

  (*fun) (&XEXP (dest, 0), data); ?

Thanks,
Revital

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: A question abt finding all register uses in instruction
  2011-10-24 12:58 A question abt finding all register uses in instruction Revital Eres
@ 2011-10-24 16:19 ` Ramana Radhakrishnan
  0 siblings, 0 replies; 2+ messages in thread
From: Ramana Radhakrishnan @ 2011-10-24 16:19 UTC (permalink / raw)
  To: Revital Eres; +Cc: gcc

> I appreciate any advise of how to resolve this -- should I add
>
>  (*fun) (&XEXP (dest, 0), data); ?

Actually I don't see why not - a zero_extract on the LHS of an
expression is supposed to be a bit field insert on that register.
Isn't there an implicit read of the destination register involved in
this case in that the lower order bits of the register are left
unchanged ?

cheers
Ramana

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-24 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-24 12:58 A question abt finding all register uses in instruction Revital Eres
2011-10-24 16:19 ` Ramana Radhakrishnan

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 read-only IMAP folder(s) and NNTP newsgroup(s).