public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ayonam Ray <ayonam@gmail.com>
To: Ian Lance Taylor <iant@google.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: How do we access higher order bits of a register?
Date: Wed, 23 Nov 2011 00:47:00 -0000	[thread overview]
Message-ID: <CA+V5N8nDb5vM+f5gLNFZz7axdew=t960Ztf2uM-JROb1MxUskA@mail.gmail.com> (raw)
In-Reply-To: <mcrvcqcc97r.fsf@dhcp-172-18-216-180.mtv.corp.google.com>

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.

      reply	other threads:[~2011-11-22 22:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 15:31 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 message]

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='CA+V5N8nDb5vM+f5gLNFZz7axdew=t960Ztf2uM-JROb1MxUskA@mail.gmail.com' \
    --to=ayonam@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=iant@google.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).