This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How do we access higher order bits of a register?


Ayonam Ray <ayonam@gmail.com> writes:

> On 22 November 2011 20:30, Ian Lance Taylor <iant@google.com> wrote:
>> Ayonam Ray <ayonam@gmail.com> writes:
>>
>>> I wanted to write an RTL that would access the higher order bits of a
>>> register. I saw that high:<mode> works only with constants or labels.
>>> ÂThe subreg:<mode> only takes the lower order bits. ÂCan't find any
>>> way to address the higher order bits. ÂAny help would be appreciated.
>>
>> If it is a single hard register, use a shift.
>>
>> Ian
>>
>
> Thanks for your reply.
> It is indeed a single hard register.  But I need it as an lvalue.

Use zero_extract.

Ian


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