From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27600 invoked by alias); 25 Jan 2012 19:04:44 -0000 Received: (qmail 27592 invoked by uid 22791); 25 Jan 2012 19:04:43 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jan 2012 19:04:31 +0000 Received: by wibhq7 with SMTP id hq7so1626327wib.20 for ; Wed, 25 Jan 2012 11:04:29 -0800 (PST) Received: by 10.180.99.100 with SMTP id ep4mr30411460wib.7.1327518269905; Wed, 25 Jan 2012 11:04:29 -0800 (PST) Received: from localhost (rsandifo.gotadsl.co.uk. [82.133.89.107]) by mx.google.com with ESMTPS id ex2sm4516997wib.1.2012.01.25.11.04.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Jan 2012 11:04:28 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [MIPS, committed] Fix handling of small-data asm operands Date: Wed, 25 Jan 2012 19:04:00 -0000 Message-ID: <877h0fy56s.fsf@firetop.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (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: 2012-01/txt/msg01325.txt.bz2 The testcase for PR 51933 was failing on mipsisa64-elf because md_reorg changed a symbolic small-data asm operand into a LO_SUM. Tested on mipsisa64-elf and applied. Richard gcc/ * config/mips/mips.c: Don't process ASM_OPERANDS. Index: gcc/config/mips/mips.c =================================================================== --- gcc/config/mips/mips.c 2012-01-25 18:53:22.000000000 +0000 +++ gcc/config/mips/mips.c 2012-01-25 18:53:59.000000000 +0000 @@ -3101,7 +3101,10 @@ mips_small_data_pattern_1 (rtx *loc, voi { enum mips_symbol_context context; - if (GET_CODE (*loc) == LO_SUM) + /* Ignore things like "g" constraints in asms. We make no particular + guarantee about which symbolic constants are acceptable as asm operands + versus which must be forced into a GPR. */ + if (GET_CODE (*loc) == LO_SUM || GET_CODE (*loc) == ASM_OPERANDS) return -1; if (MEM_P (*loc))