From patchwork Wed Jan 14 09:54:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Terry Guo X-Patchwork-Id: 428914 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 EB41D140285 for ; Wed, 14 Jan 2015 20:55:22 +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:mime-version:content-type; q=dns; s=default; b=wkEG6QM3mMFaKIF57OzJLDOT3wM7REFVTusMydeaX5v/3z165C XgPFofhfS+mb3Pk5+/PKseTNnY0pWD7RFMZLvd0w5YFKxfd/l4m4xTtNgikENnDN 2HyWhyuGcnrJ2h8v7pk3NvjE0k+rwy8Arf6EzbGKrl3zNtGSuwQlmffdw= 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:mime-version:content-type; s= default; bh=BdK7UoRXlbcbJCykzthDWhSPXlw=; b=Am+l6x5qRJzRNWrJ3g4D TstlUbZ92e5dv1iBmaRn1MPrMq1OoAC4cbAYGoQHdNRfyLVTDE3/ANSaI5fYtz5G 9DDoFb1A1tG8d5P8gFCN3roXT3T0IYuLWpq0x1yu4z/rHs6Ev6Nti6/zBEz2xK3Z lBJID/hnrZLOvyNRomJ9r3s= Received: (qmail 27582 invoked by alias); 14 Jan 2015 09:55:15 -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 27572 invoked by uid 89); 14 Jan 2015 09:55:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL, BAYES_20, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Jan 2015 09:55:13 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by service87.mimecast.com; Wed, 14 Jan 2015 09:55:10 +0000 Received: from shawin252 ([10.164.6.101]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 14 Jan 2015 09:55:09 +0000 From: "Terry Guo" To: Cc: "Ramana Radhakrishnan" , "Richard Earnshaw" Subject: [Patch, ARM]Update GCC to generate Tag_ABI_HardFP_use per the latest EABI doc Date: Wed, 14 Jan 2015 17:54:59 +0800 Message-ID: <000401d02fe0$29d48e00$7d7daa00$@arm.com> MIME-Version: 1.0 X-MC-Unique: 115011409551006501 X-IsSubscribed: yes Hi there, According to the latest EABI at http://infocenter.arm.com/help/topic/com.arm.doc.ihi0045d/IHI0045D_ABI_adden da.pdf, the new definition of Tag_ABI_HardFP_use is as below: Tag_ABI_HardFP_use, (=27), uleb128 0 The user intended that FP use should be implied by Tag_FP_arch 1 The user intended this code to execute on the single-precision variant derived from Tag_FP_arch 2 Reserved 3 The user intended that FP use should be implied by Tag_FP_arch (Note: This is a deprecated duplicate of the default encoded by 0) The attached patch intends to update gcc to conform this definition. Tested with GCC regression test, no regressions. Is it OK? BR, Terry 2015-01-14 Terry Guo * config/arm/arm.c (arm_file_start): Update the assignment of Tag_ABI_HardFP_use. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 0ec526b..378bed9 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -25576,7 +25576,13 @@ arm_file_start (void) if (arm_fpu_desc->model == ARM_FP_MODEL_VFP) { if (TARGET_HARD_FLOAT) - arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 3); + { + if (TARGET_VFP_SINGLE) + arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1); + else + arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 0); + } + if (TARGET_HARD_FLOAT_ABI) arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1); }