public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: [arm] post_modify constraint failure (was Re: Patch ping)
Date: Tue, 20 Apr 2004 14:12:00 -0000	[thread overview]
Message-ID: <200404201512.11727.paul@codesourcery.com> (raw)
In-Reply-To: <1082387306.20174.44.camel@pc960.cambridge.arm.com>

> /work/rearnsha/gnu/egcs/arm-elf/libstdc++-v3/include/complex:1455: error:
> insn d oes not satisfy its constraints:
> (insn:HI 2559 6401 6402 47
> /work/rearnsha/gnu/egcs/arm-elf/libstdc++-v3/include/ streambuf:187 (set
> (mem/s:SI (post_modify:SI (reg:SI 12 ip)
>                 (plus:SI (reg:SI 12 ip)
>                     (const_int 28 [0x1c]))) [9
> <variable>._vptr.basic_streambuf+ 0 S4 A32])
>         (reg/f:SI 3 r3 [314])) 140 {*arm_movsi_insn} (insn_list 2558 (nil))
>     (expr_list:REG_DEAD (reg/f:SI 3 r3 [314])
>         (expr_list:REG_INC (reg:SI 12 ip)
>             (nil))))
>
> Then I think this is because arm_legitimate_address_p is doing something
> wrong.  Probably this test:
>
>   else if ((GET_CODE (x) == POST_MODIFY || GET_CODE (x) == PRE_MODIFY)
> 	   && GET_MODE_SIZE (mode) <= 4
> 	   && arm_address_register_rtx_p (XEXP (x, 0), strict_p)
> 	   && GET_CODE (XEXP (x, 1)) == PLUS
> 	   && XEXP (XEXP (x, 1), 0) == XEXP (x, 0))
>
> That final equivalence should probably be using rtx_equal_p(), but I
> haven't tested that yet.

It does fix the problem. Patch below.

Tested with cross-compiler to arm-none-elf.
Ok?

Paul

2004-04-20  Paul Brook  <paul@codesourcery.com>

	* config/arm/arm.c (arm_legitimate_address_p): Use rtx_equal_p.

Index: config/arm/arm.c
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.347
diff -u -p -r1.347 arm.c
--- a/config/arm/arm.c	20 Apr 2004 11:28:08 -0000	1.347
+++ b/config/arm/arm.c	20 Apr 2004 12:17:13 -0000
@@ -2994,7 +2994,7 @@ arm_legitimate_address_p (enum machine_m
 	   && GET_MODE_SIZE (mode) <= 4
 	   && arm_address_register_rtx_p (XEXP (x, 0), strict_p)
 	   && GET_CODE (XEXP (x, 1)) == PLUS
-	   && XEXP (XEXP (x, 1), 0) == XEXP (x, 0))
+	   && rtx_equal_p (XEXP (XEXP (x, 1), 0), XEXP (x, 0)))
     return arm_legitimate_index_p (mode, XEXP (XEXP (x, 1), 1), outer,
 				   strict_p);
 

  reply	other threads:[~2004-04-20 14:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-16 10:50 Patch ping Paolo Bonzini
2004-04-16 21:16 ` Geoff Keating
2004-04-19  5:37   ` Andreas Jaeger
2004-04-19  9:45     ` Paolo Bonzini
2004-04-19  9:56       ` Arnaud Charlet
2004-04-19 10:01         ` Paolo Bonzini
2004-04-19 12:10           ` Arnaud Charlet
2004-04-19 10:07       ` Andreas Jaeger
2004-04-19 10:41       ` Laurent GUERBY
2004-04-19 11:13         ` Paolo Bonzini
2004-04-19 11:30       ` Andreas Jaeger
2004-04-19 12:38         ` Paolo Bonzini
2004-04-19 12:57       ` Andreas Schwab
2004-04-19 13:16         ` Paul Brook
2004-04-19 15:08           ` Richard Earnshaw
2004-04-20 14:12             ` Paul Brook [this message]
2004-04-20 14:13               ` [arm] post_modify constraint failure (was Re: Patch ping) Richard Earnshaw
2004-04-19 13:20         ` Patch ping Richard Earnshaw
2004-04-19 13:32         ` Disable -frename-registers Paolo Bonzini
2004-04-19 18:26           ` Geoff Keating
2004-04-19  5:41   ` Patch ping Andreas Jaeger

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=200404201512.11727.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@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).