From: Ayonam Ray <ayonam@gmail.com>
To: Jeff Law <law@redhat.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: GO_IF_LEGITIMATE_ADDRESS handling different addressing modes for load/store
Date: Thu, 29 Nov 2012 04:44:00 -0000 [thread overview]
Message-ID: <CA+V5N8=06rZDG830RYbV3BCD1eKRUE3u3v6ng58DnATSP86FNw@mail.gmail.com> (raw)
In-Reply-To: <50B65B91.3040705@redhat.com>
Thanks Jeff for the clue. Much appreciated.
Regards
Ayonam
On 29 November 2012 00:14, Jeff Law <law@redhat.com> wrote:
> On 11/28/2012 11:37 AM, Ayonam Ray wrote:
>>
>> Hi,
>>
>> My architecture allows base + immed and base + index for loads but
>> allows only base + immed for stores. How do I differentiate between
>> them in the macro GO_IF_LEGITIMATE_ADDRESS? I only get the MEM rtx in
>> that macro and have no clue whether the operand is an address for a
>> load or a store. Is there any other way that I can differentiate
>> between them?
>
> You can't differentiate them. Fundamentally the register allocator assumes
> that a memory address is either valid or invalid regardless of whether or
> not it's a load or store.
>
> What ports have done in the past with this situation is to support the
> lowest common denominator in the movxx pattern, then add special constraints
> for the cases that are only available on the load (or store).
>
> For an example, see how indexed addressing modes are handled on the PA. It
> has integer indexed loads, but no integer indexed stores. It has indexed
> loads and stores for floating point types.
>
> jeff
prev parent reply other threads:[~2012-11-29 4:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 18:37 Ayonam Ray
2012-11-28 18:44 ` Jeff Law
2012-11-29 4:44 ` 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+V5N8=06rZDG830RYbV3BCD1eKRUE3u3v6ng58DnATSP86FNw@mail.gmail.com' \
--to=ayonam@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=law@redhat.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).