public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Tim Rye <timjrye@gmail.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: Can be gcc portable to architecture without indexed addressing mode?
Date: Wed, 01 Aug 2012 15:02:00 -0000	[thread overview]
Message-ID: <CAKOQZ8yZtqrnC0WQ7+tLpAkO2GQX0RKaqCBoBceMrK3HvKoxhw@mail.gmail.com> (raw)
In-Reply-To: <CAP6CXZf=dGBN43Z=Jvu0O+JRoEjKj503nwSS2Lf8iVCTPJN5AA@mail.gmail.com>

On Wed, Aug 1, 2012 at 7:53 AM, Tim Rye <timjrye@gmail.com> wrote:
>
> static bool mytarget_legitimate_address_p(enum machine_mode mode, rtx
> x, bool strict) {
>
>   while (GET_CODE(x) == MEM)
>     x = XEXP(x,0);

That definitely does not look right.  Accepting a MEM here means that
your instructions accept addresses stored in memory.  That is a very
unusual addressing mode.


> mul.c:37:1: internal compiler error: in change_address_1, at emit-rtl.c:1996
>
> The stack trace at this point looks like this:
>
> -------------
>
> (gdb) where
> #0  fancy_abort (file=0xb2c8c8
> "../../gcc-4.7.1-mytarget/gcc/emit-rtl.c", line=1996,
>     function=0xb2ca20 "change_address_1") at
> ../../gcc-4.7.1-mytarget/gcc/diagnostic.c:898
> #1  0x00000000005c4109 in change_address_1 (memref=0x2a95691a08,
> mode=HImode, addr=0x2a956919f0,

> #5  0x00000000005e80c5 in emit_move_insn_1 (x=0x2a9568c420, y=0x2a95691960)
>     at ../../gcc-4.7.1-mytarget/gcc/expr.c:3417

This suggests that your move insn needs special handling during
reload.  That is fairly common, as reload invokes the move insn
itself.  Read the description of movm closely in
http://gcc.gnu.org/onlinedocs/gccint/Standard-Names.html#Standard-Names
.  Look at examples for similar processors.

Ian

  reply	other threads:[~2012-08-01 15:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-01 11:57 Tim Rye
2012-08-01 13:08 ` Ian Lance Taylor
2012-08-01 14:54   ` Tim Rye
2012-08-01 15:02     ` Ian Lance Taylor [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-03-17  7:51 이환희
2010-03-17 15:18 ` Andrew Haley

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=CAKOQZ8yZtqrnC0WQ7+tLpAkO2GQX0RKaqCBoBceMrK3HvKoxhw@mail.gmail.com \
    --to=iant@google.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=timjrye@gmail.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).