This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: how to test which register is being used?


matthew green wrote:
> 
> hi folks.
> 
> how can one determine which register is being used, rather than
> the value of the register?  i need to determine (in several
> instructions) whether r6 or r7 are being used, and if so, set
> a status bit (one for r6, one for r7).  the only solution i can
> think of (that bje also suggested) was to have something in the
> getter/setter to allow this, but as not every time these registers
> are used are the status bits set, so this would not be correct.
> 
> thanks,
> 
> .mrg.

You should be able to access using the ifield operator to get the
value in the field that the operand is based on.

-- Jeff J.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]