From patchwork Wed Aug 29 18:57:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 180748 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8F46F2C00D7 for ; Thu, 30 Aug 2012 04:57:41 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1346871461; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Mail-Followup-To:Cc:Subject:References:Date: In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=vV1PbJP29EDH68WV3RVh 8l3zeCg=; b=TXMpapKiU3uPZmGMTwqDc2vE/IP+Eyw4IMeKkcjyE5clPTC+Kkk1 PZHkq25c9aO4sd8JVC21Xq7R/woSaafoS6kFZKMvLkLTWP3Rt0b03q6fNeeSo/ZR v2RspSCR+ALfyQBXHE+eHwyWi4k26qeFG0MNmN2++ULRWS6gozvIMrI= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Mail-Followup-To:Cc:Subject:References:Date:In-Reply-To:Message-ID:User-Agent:MIME-Version:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=rrsbrQTyaVX7ZT7nDcL+3XjKqBUZppHRKZ47ltx1E7watMPHnbbRCi1H+daLvw uZ538Ptgf0mHxHoq8zfcyFTSFpP0m3WP+N9JqbzzZGixYPbA3LiFA35NBRovZP94 7lwZ1MORFeOQsGTFE5EBfdKMDC/7AmwpHy+84xdonU/G8=; Received: (qmail 6902 invoked by alias); 29 Aug 2012 18:57:36 -0000 Received: (qmail 6892 invoked by uid 22791); 29 Aug 2012 18:57:35 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-ee0-f47.google.com (HELO mail-ee0-f47.google.com) (74.125.83.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Aug 2012 18:57:22 +0000 Received: by eekb57 with SMTP id b57so418390eek.20 for ; Wed, 29 Aug 2012 11:57:21 -0700 (PDT) Received: by 10.14.193.136 with SMTP id k8mr3281870een.9.1346266641163; Wed, 29 Aug 2012 11:57:21 -0700 (PDT) Received: from localhost ([2.26.188.227]) by mx.google.com with ESMTPS id u47sm72265582eeo.9.2012.08.29.11.57.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Aug 2012 11:57:13 -0700 (PDT) From: Richard Sandiford To: Hans-Peter Nilsson Mail-Followup-To: Hans-Peter Nilsson , gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [MIPS, committed] Add missing COSTS_N_INSNS call. References: <87k3wl31j2.fsf@talisman.home> <877gsi25df.fsf@talisman.home> <87393621e1.fsf@talisman.home> Date: Wed, 29 Aug 2012 19:57:12 +0100 In-Reply-To: <87393621e1.fsf@talisman.home> (Richard Sandiford's message of "Tue, 28 Aug 2012 21:43:34 +0100") Message-ID: <87r4qpzfuf.fsf@talisman.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Richard Sandiford writes: > Hans-Peter Nilsson writes: >> On Tue, 28 Aug 2012, Richard Sandiford wrote: >>> Hans-Peter Nilsson writes: >>> > On Sun, 26 Aug 2012, Richard Sandiford wrote: >>> >> I'm preparing a patch to turn gcc.target/mips into a torture-like >>> >> testsuite. >>> > >>> > While on the subject of gcc.target/mips and its extensions, it >>> > also doesn't handle a build configured with --with-synci=yes. >>> > (Well, not on the 4.7 branch at least.) >>> >>> What goes wrong? >> >> I don't remember details, but IIRC some synci-related tests go >> wrong for mipsisa32r2el-linux-gnu due to -msynci being the >> default. Don't worry, I've fixed it in the local import. :) >> I though the above would entice you to try it, but I guess I >> need to report better for that to happen. Maybe later. > > Trying it now. I suspect it was the problem that Steve hit: > the implicit -msynci is still (deliberately) kept when a lower > architecture is selected. > > I'm testing a patch to make the testsuite work out the default > -m{no,}synci, which ought to be enough. The usual rules should > then kick in and force -mno-synci where necessary. Hopefully. Here's the patch. Tested on mipsisa64r2-elf, where mips.exp comes out clean. I looked at the logs to make sure that -mno-synci was being passed for lower architectures but that no explicit -msynci or -mno-synci option was used when testing mips64r2. Applied. Richard gcc/ * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define __mips_synci if TARGET_SYNCI. gcc/testsuite/ * gcc.target/mips/mips.exp: Work out default -msynci setting. Index: gcc/config/mips/mips.h =================================================================== --- gcc/config/mips/mips.h 2012-08-29 19:40:47.000000000 +0100 +++ gcc/config/mips/mips.h 2012-08-29 19:50:50.144982449 +0100 @@ -517,6 +517,9 @@ #define TARGET_CPU_CPP_BUILTINS() \ if (TARGET_OCTEON) \ builtin_define ("__OCTEON__"); \ \ + if (TARGET_SYNCI) \ + builtin_define ("__mips_synci"); \ + \ /* Macros dependent on the C dialect. */ \ if (preprocessing_asm_p ()) \ { \ Index: gcc/testsuite/gcc.target/mips/mips.exp =================================================================== --- gcc/testsuite/gcc.target/mips/mips.exp 2012-08-27 17:27:13.000000000 +0100 +++ gcc/testsuite/gcc.target/mips/mips.exp 2012-08-29 19:50:50.141982450 +0100 @@ -767,6 +767,12 @@ proc mips-dg-init {} { "-mno-smartmips", #endif + #ifdef __mips_synci + "-msynci", + #else + "-mno-synci", + #endif + 0 }; }]