From patchwork Mon Jan 12 15:42:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Fortune X-Patchwork-Id: 427783 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1E3D91401DC for ; Tue, 13 Jan 2015 02:42:37 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=RnA it0D4PyEEjN3e35+yGjf7lxF59bnyK08IK2oaNdnVfjF4C0BYrPiV/ST5j4ufvze SmHvst1/gYkRO6vp2uYvM+fxKj0hmR19hRGRRgiw2Q8tQukDVFRWhwjt081d59ae a1D8SOLe/y0Csk12+bg7n/g6z1EgJP4709kB/J5k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:content-type :content-transfer-encoding:mime-version; s=default; bh=1DLF6ZXtp ZLEZFYzbH6toL8AoYs=; b=Pj5ZyJZFQtJYCowUtVfef7gkO9pSwg52mQKIeMLcS vH4h9pBtw5YGBQYDQK9uMEmrFm9rwmi9ymU4lyWOVnE14UQp4HarOnIC/cQqIf6D m1P16Oa7w6sYqr4nlK9Mi//a4BNynVUx/y5YxefZCrr5Dl7+kmQJwDZArfBRpyO7 YE= Received: (qmail 13451 invoked by alias); 12 Jan 2015 15:42:29 -0000 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 Received: (qmail 13440 invoked by uid 89); 12 Jan 2015 15:42:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Jan 2015 15:42:26 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id 210C192294F94; Mon, 12 Jan 2015 15:42:21 +0000 (GMT) Received: from LEMAIL01.le.imgtec.org (192.168.152.62) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Mon, 12 Jan 2015 15:42:24 +0000 Received: from LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9]) by LEMAIL01.le.imgtec.org ([fe80::5ae:ee16:f4b9:cda9%17]) with mapi id 14.03.0210.002; Mon, 12 Jan 2015 15:42:23 +0000 From: Matthew Fortune To: "Moore, Catherine (Catherine_Moore@mentor.com)" CC: "'gcc-patches@gcc.gnu.org' (gcc-patches@gcc.gnu.org)" Subject: [PATCH, MIPS] Only pass floating-point options to the assembler then Date: Mon, 12 Jan 2015 15:42:22 +0000 Message-ID: <6D39441BF12EF246A7ABCE6654B0235320F9FF82@LEMAIL01.le.imgtec.org> MIME-Version: 1.0 X-IsSubscribed: yes The new behaviour of the GCC driver passing floating point options like -msoft-float to the assembler is essential for the new o32 ABI extensions but is a change in behaviour. In particular GCC 5 used with binutils 2.24 would require a user to fix any hand-crafted code that made use of floating-point instructions when building for soft-float. This patch limits the new behaviour to a combination of GCC and binutils that both have the new ABI support. This patch along with parts of several previous patches need backporting to GCC 4.9 (and GCC 4.8) to enable use of binutils 2.25 with those compilers. The GCC 4.9 patch will be posted shortly. Thanks, Matthew gcc/ * config/mips/mips.h (FP_ASM_SPEC): New define. (ASM_SPEC): Remove floating-point options and use FP_ASM_SPEC instead. --- gcc/config/mips/mips.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 37d4cb4..ed241fa 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1243,6 +1243,22 @@ struct mips_cpu_info { %{gcoff*:-mdebug} %{!gcoff*:-no-mdebug}" #endif +/* FP_ASM_SPEC represents the floating-point options that must be passed + to the assembler when FPXX support exists. Prior to that point the + assembler could accept the options but were not required for + correctness. We only add the options when absolutely necessary + because passing -msoft-float to the assembler will cause it to reject + all hard-float instructions which may require some user code to be + updated. */ + +#ifdef HAVE_AS_DOT_MODULE +#define FP_ASM_SPEC "\ +%{mhard-float} %{msoft-float} \ +%{msingle-float} %{mdouble-float}" +#else +#define FP_ASM_SPEC +#endif + /* SUBTARGET_ASM_SPEC is always passed to the assembler. It may be overridden by subtargets. */ @@ -1277,9 +1293,8 @@ struct mips_cpu_info { %{modd-spreg} %{mno-odd-spreg} \ %{mshared} %{mno-shared} \ %{msym32} %{mno-sym32} \ -%{mtune=*} \ -%{mhard-float} %{msoft-float} \ -%{msingle-float} %{mdouble-float} \ +%{mtune=*}" \ +FP_ASM_SPEC "\ %(subtarget_asm_spec)" /* Extra switches sometimes passed to the linker. */