From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22972 invoked by alias); 20 Apr 2004 14:12:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 22964 invoked from network); 20 Apr 2004 14:12:14 -0000 Received: from unknown (HELO shockwave.systems.pipex.net) (62.241.160.9) by sources.redhat.com with SMTP; 20 Apr 2004 14:12:14 -0000 Received: from nowt.org (81-178-222-173.dsl.pipex.com [81.178.222.173]) by shockwave.systems.pipex.net (Postfix) with ESMTP id A91D31C0026F; Tue, 20 Apr 2004 15:12:11 +0100 (BST) Received: from wren.home (wren.home [192.168.1.7]) by nowt.org (Postfix) with ESMTP id DCA81AC92; Tue, 20 Apr 2004 15:12:09 +0100 (BST) From: Paul Brook Organization: CodeSourcery To: gcc-patches@gcc.gnu.org Subject: [arm] post_modify constraint failure (was Re: Patch ping) Date: Tue, 20 Apr 2004 14:12:00 -0000 User-Agent: KMail/1.6.2 Cc: Richard Earnshaw References: <200404191416.33465.paul@codesourcery.com> <1082387306.20174.44.camel@pc960.cambridge.arm.com> In-Reply-To: <1082387306.20174.44.camel@pc960.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404201512.11727.paul@codesourcery.com> X-SW-Source: 2004-04/txt/msg01272.txt.bz2 > /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 > ._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 * 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);