public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ian dot bolton at arm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/40836] ICE: "insn does not satisfy its constraints" (iwmmxt_movsi_insn)
Date: Fri, 09 Jul 2010 17:03:00 -0000	[thread overview]
Message-ID: <20100709170301.8329.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40836-3461@http.gcc.gnu.org/bugzilla/>



------- Comment #29 from ian dot bolton at arm dot com  2010-07-09 17:02 -------
(In reply to comment #7)
> When I read the RTL dumps correctly, gcc tries to assign SP to wCGR0.

SP is actually the destination here, not the source.  

> This can be done by the
> 
>     tmrc  sp, wCGR0
> 
> assembly instruction which will be issued by alternative 6 in
> 
> 
> --- iwmmxt.md ---
> (define_insn "*iwmmxt_movsi_insn"
>   [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,r,rk, m,z,r,?z,Uy,z")
>         (match_operand:SI 1 "general_operand"      "rk, I,K,mi,rk,r,z,Uy,z,
> z"))]
>    ...
>    case 6: return \"tmrc\\t%0, %1\";
> 
> 
> The corresponding constraints pair is ['r', 'z'] and it is matched by
> [sp, wcgr0] afais.  What could be the reason for the ICE?
> 

As existing replies already point out, the ICE is being caused by the fact that
SP does not meet the "r" constraint (you need "k" to specify SP).  However, if
the constraint were valid, and the assignment to SP was allowed to occur, you
would essentially be using SP as a general purpose register when it is special
and should not be used this way.

Based on my limited (so far) understanding of the ARM port of GCC, I think the
fault lies either with the predicate (nonimmediate_operand), which is allowing
SP to be the dest, or the code that created the iwmmxt_movsi_insn with SP as
its dest.  There was a time (before Thumb-2, I think) when SP could be used as
a general purpose register, so maybe some IWMMXT-related code needs updating to
reflect this.


-- 

ian dot bolton at arm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian dot bolton at arm dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40836


  parent reply	other threads:[~2010-07-09 17:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23  9:45 [Bug c/40836] New: ICE: "insn does not satisfy its constraints" enrico dot scholz at informatik dot tu-chemnitz dot de
2009-07-23  9:46 ` [Bug c/40836] " enrico dot scholz at informatik dot tu-chemnitz dot de
2009-07-23  9:48 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-07-23  9:48 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-09-03 11:03 ` [Bug target/40836] ICE: "insn does not satisfy its constraints" (iwmmxt_movsi_insn) ramana at gcc dot gnu dot org
2009-10-23 10:19 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-10-23 10:33 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-10-23 13:39 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-10-23 14:32 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-10-23 15:13 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-10-30 14:32 ` hjl at gcc dot gnu dot org
2009-10-30 17:49 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-11-16 16:17 ` yipiha2008 at gmail dot com
2009-11-16 17:23 ` ebotcazou at gcc dot gnu dot org
2009-11-16 17:35 ` rearnsha at gcc dot gnu dot org
2009-11-17 13:04 ` yipiha2008 at gmail dot com
2009-11-18 11:54 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-11-19  0:53 ` lwalkera at ieee dot org
2009-11-19 13:18 ` yipiha2008 at gmail dot com
2009-11-19 13:48 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-11-19 13:57 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-11-19 14:09 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-11-19 14:39 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-11-19 16:47 ` yipiha2008 at gmail dot com
2009-11-20 14:17 ` yipiha2008 at gmail dot com
2009-11-20 15:07 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2009-11-20 15:45 ` yipiha2008 at gmail dot com
2009-11-28 14:38 ` rearnsha at gcc dot gnu dot org
2009-11-28 15:57 ` rearnsha at gcc dot gnu dot org
2009-11-28 23:08 ` enrico dot scholz at informatik dot tu-chemnitz dot de
2010-07-09 17:03 ` ian dot bolton at arm dot com [this message]
     [not found] <bug-40836-4@http.gcc.gnu.org/bugzilla/>
2012-09-03 22:29 ` dsd at laptop dot org
2012-09-11 19:12 ` dsd at laptop dot org
2012-09-19 21:03 ` dsd at laptop dot org
2014-02-16 13:15 ` jackie.rosen at hushmail dot com
2015-06-24 23:37 ` ramana at gcc dot gnu.org

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=20100709170301.8329.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).