* How do we access higher order bits of a register?
@ 2011-11-22 15:31 Ayonam Ray
2011-11-22 17:06 ` Ian Lance Taylor
0 siblings, 1 reply; 5+ messages in thread
From: Ayonam Ray @ 2011-11-22 15:31 UTC (permalink / raw)
To: gcc-help
Hi,
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.
Thanks and regards
Ayonam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How do we access higher order bits of a register?
2011-11-22 15:31 How do we access higher order bits of a register? Ayonam Ray
@ 2011-11-22 17:06 ` Ian Lance Taylor
2011-11-22 21:39 ` Ayonam Ray
0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2011-11-22 17:06 UTC (permalink / raw)
To: Ayonam Ray; +Cc: gcc-help
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How do we access higher order bits of a register?
2011-11-22 17:06 ` Ian Lance Taylor
@ 2011-11-22 21:39 ` Ayonam Ray
2011-11-22 22:10 ` Ian Lance Taylor
0 siblings, 1 reply; 5+ messages in thread
From: Ayonam Ray @ 2011-11-22 21:39 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
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.
Ayonam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How do we access higher order bits of a register?
2011-11-22 21:39 ` Ayonam Ray
@ 2011-11-22 22:10 ` Ian Lance Taylor
2011-11-23 0:47 ` Ayonam Ray
0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2011-11-22 22:10 UTC (permalink / raw)
To: Ayonam Ray; +Cc: gcc-help
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How do we access higher order bits of a register?
2011-11-22 22:10 ` Ian Lance Taylor
@ 2011-11-23 0:47 ` Ayonam Ray
0 siblings, 0 replies; 5+ messages in thread
From: Ayonam Ray @ 2011-11-23 0:47 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
On 22 November 2011 23:48, Ian Lance Taylor <iant@google.com> wrote:
> 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
>
Thanks Ian.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-22 22:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-22 15:31 How do we access higher order bits of a register? Ayonam Ray
2011-11-22 17:06 ` Ian Lance Taylor
2011-11-22 21:39 ` Ayonam Ray
2011-11-22 22:10 ` Ian Lance Taylor
2011-11-23 0:47 ` Ayonam Ray
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).