From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6967 invoked by alias); 7 Jun 2011 14:24:54 -0000 Received: (qmail 6760 invoked by uid 22791); 7 Jun 2011 14:24:53 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 14:24:37 +0000 Received: by wwf26 with SMTP id 26so4554860wwf.8 for ; Tue, 07 Jun 2011 07:24:35 -0700 (PDT) Received: by 10.227.11.137 with SMTP id t9mr2270559wbt.9.1307456592748; Tue, 07 Jun 2011 07:23:12 -0700 (PDT) Received: from richards-thinkpad (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id en1sm3592575wbb.52.2011.06.07.07.23.11 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Jun 2011 07:23:12 -0700 (PDT) From: Richard Sandiford To: Hans-Peter Nilsson Mail-Followup-To: Hans-Peter Nilsson ,gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org Cc: gcc-patches@gcc.gnu.org Subject: Re: Committed: fix PR49285, breakage building libgcc2 for MMIX References: Date: Tue, 07 Jun 2011 14:24:00 -0000 In-Reply-To: (Hans-Peter Nilsson's message of "Mon, 6 Jun 2011 00:09:48 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00525.txt.bz2 Hans-Peter Nilsson writes: > I needed a baseline for PR48542 (problems with setjmp/longjmp), but > building MMIX was broken on trunk. It was "bitten" by the fixups to > predicate matching done recentlish. The comment above the MMIX > truncdfsf2 expander complains about having to use an expander to > force an operand to memory - and then goes on and uses memory_operand > for that operand anyway! That accidentally worked before the fixup, > because after copying the failing operand to a new pseudo, the > expander was called without the optabs machinery doublechecking the > new pseudo against the predicate. While I stand by the comment and > still think the optabs machinery could automatically fix up operands > as needed to force an operand into memory when the predicate says so, > it hasn't worked like that before, and I guess it's no use adding > something like that just for one port, where an expander will do. FWIW, having a target-independent feature sounds like a good idea to me. It's similar in spirit to the new code that tries to force addresses into registers if a memory predicate rejects a mem. That too is something that was often handled by expanders, but which is nicer without. The implementation could be along the same lines. Have an allows_reg field in recog_data that says whether the predicate allows registers. If it doesn't, try forcing to a stack slot instead of to registers. Richard