From patchwork Fri Jun 9 12:53:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 103496 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp196695qgd; Fri, 9 Jun 2017 06:01:39 -0700 (PDT) X-Received: by 10.84.196.131 with SMTP id l3mr8536250pld.207.1497013299614; Fri, 09 Jun 2017 06:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497013299; cv=none; d=google.com; s=arc-20160816; b=kZvRW34GCREQg4hdlvQ8s0P086Hl8iCY5f7RNAeP6NjvtCzVr35sMMFfJksoGFUE6Q cZMsuj74yzqvzI07uQsokGFZQ5KcYxtHMWj247gsR5UA8ibUH5fwICJ/Q8SN0x5kjkch /BNKAes+VbHrAIT7OwgWQ6+bmCwOi1vT4xfqwcTCnq/M7nG0zJ55jw54rBAFAKdpj/0d 6KYTUfvf/fNy89yZyHc+9rLU5xGrsmxJq9Pel6JurGfYHEgv+wUTdmGO5IeWKZpg6TOx Dc/+l8NWty5NBipj9UgJIF91rwPPYUiwQXI2QU7C2KVWNCsTXVCZYdx+XjZiqvCTyPKW Ko/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:delivered-to:sender:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=ozFAlOV63nHiVx5w+JfTW7cFFl30uVG9y2DI/Sq/2NA=; b=kHaAARMVInaaWakZOqM4lC5yR6ewLTc9YNpP23HrHZ8jYlqxcm88oqCW2IZzWSV7T+ x8Dj+M1mDMVKpjcT+Qy2QtQx63PtL3msaw5RTvMct3rLRLbx21FK9wtF/opvjbBChh+2 NbCROs5x4FyhMJGzybzZ+CfMWzzyG+3q4Rl/MHY7GQIpsixxu2fmtGR1AHFIUXZOdXiA Se/LzRwDZJQ9gNaaiTQ+dl4cSzKalvPFiEEEUcBZPXYK7D/R7SgTX5VeKXZhSqJUM+8J 8AL3npUaxkGu0JOrbUSvigJ/sYkYp2EGHBGbgzg+toRO7ZRBDHu7yoDsI6n1GPuBKlvr VA3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-455540-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-455540-patch=linaro.org@gcc.gnu.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d19si935200pfl.82.2017.06.09.06.01.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2017 06:01:39 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-455540-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-455540-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-455540-patch=linaro.org@gcc.gnu.org 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:in-reply-to:references :in-reply-to:references:mime-version:content-type; q=dns; s= default; b=dJa/KPIb1veRYQXlLxqzWHCNL+DhGkFtIuLpgxEL3znoFClnl0VII /V4k/PVnRLOirB9lk7Q6zwWhTKJ+yADRvXhx9ZIEadt3FgDFJtnslvN29YouPkl8 jIRV2wHwI97PbMSgyAEubAU+uRcEYU/juGH2DLLYA0SFcyHfi74sSA= 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:in-reply-to:references :in-reply-to:references:mime-version:content-type; s=default; bh=SRFpky8LqJXwFlX0L2lm4vjKUsk=; b=Ice8y0JI+ODXf61n9naQVXwxaMys wJpVEA2gcPxrmnjmeEgAc4jvuSh8B9KPzrQqRsLeaW323j/AgE8FRrLR5kEvqhxe 9nXtfzhiw1hLXus1fI+Pt07LhA6tamejZvYOpbKDp64/4m0KLGhm3M4I5DCVx4GP R1cEBJ/mI0gQQ8I= Received: (qmail 98404 invoked by alias); 9 Jun 2017 12:54:58 -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 87708 invoked by uid 89); 9 Jun 2017 12:54:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Jun 2017 12:54:38 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJJQj-0007cv-S8 for gcc-patches@gcc.gnu.org; Fri, 09 Jun 2017 08:54:22 -0400 Received: from foss.arm.com ([217.140.101.70]:47128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJJQj-0007Te-IJ for gcc-patches@gcc.gnu.org; Fri, 09 Jun 2017 08:54:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 41D7C1610; Fri, 9 Jun 2017 05:54:21 -0700 (PDT) Received: from e105689-lin.cambridge.arm.com (e105689-lin.cambridge.arm.com [10.2.207.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C2F813F3E1; Fri, 9 Jun 2017 05:54:20 -0700 (PDT) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [PATCH 17/30] [arm] Make 'auto' the default FPU selection option. Date: Fri, 9 Jun 2017 13:53:46 +0100 Message-Id: <4504c2d65548dd926cb7755ce992399abac68fe3.1497004220.git.Richard.Earnshaw@arm.com> In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.140.101.70 Finally, we can make 'auto' the default choice for the FPU option. It's still possible to override this during configure, but we will eventually deprecate that, moving to the new cpu/architecture selection mechanism. * config/arm/arm.h (FPUTYPE_AUTO): Define. * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the fpu is not specified by the user/command-line. * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete. * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete. * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete. * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete. * common/config/arm/arm-common.c (arm_canon_arch_option): Use FPUTYPE_AUTO insted of FPUTYPE_DEFAULT. --- gcc/common/config/arm/arm-common.c | 2 +- gcc/config/arm/arm.c | 9 +-------- gcc/config/arm/arm.h | 3 +++ gcc/config/arm/bpabi.h | 4 ---- gcc/config/arm/linux-elf.h | 3 --- gcc/config/arm/netbsd-elf.h | 4 ---- gcc/config/arm/vxworks.h | 2 -- 7 files changed, 5 insertions(+), 22 deletions(-) diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index c4ab482..2188b77 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -520,7 +520,7 @@ arm_canon_arch_option (int argc, const char **argv) gcc_assert (cpu || arch); if (!fpu) - fpu = FPUTYPE_DEFAULT; + fpu = FPUTYPE_AUTO; if (!abi) { diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 97d2fbd..af02800 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -3316,17 +3316,10 @@ arm_option_override (void) if (!global_options_set.x_arm_fpu_index) { - const char *target_fpu_name; bool ok; int fpu_index; -#ifdef FPUTYPE_DEFAULT - target_fpu_name = FPUTYPE_DEFAULT; -#else - target_fpu_name = "vfp"; -#endif - - ok = opt_enum_arg_to_value (OPT_mfpu_, target_fpu_name, &fpu_index, + ok = opt_enum_arg_to_value (OPT_mfpu_, FPUTYPE_AUTO, &fpu_index, CL_TARGET); gcc_assert (ok); arm_fpu_index = (enum fpu_type) fpu_index; diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 570bcd7..9153d44 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2220,6 +2220,9 @@ extern int making_const_table; (TARGET_NEON ? (TARGET_ARM_FP & (0xff ^ 0x08)) \ : 0) +/* Name of the automatic fpu-selection option. */ +#define FPUTYPE_AUTO "auto" + /* The maximum number of parallel loads or stores we support in an ldm/stm instruction. */ #define MAX_LDM_STM_OPS 4 diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h index 56a4a47..64db83c 100644 --- a/gcc/config/arm/bpabi.h +++ b/gcc/config/arm/bpabi.h @@ -33,10 +33,6 @@ #undef ARM_UNWIND_INFO #define ARM_UNWIND_INFO 1 -/* Section 4.1 of the AAPCS requires the use of VFP format. */ -#undef FPUTYPE_DEFAULT -#define FPUTYPE_DEFAULT "vfp" - /* TARGET_BIG_ENDIAN_DEFAULT is set in config.gcc for big endian configurations. */ #if TARGET_BIG_ENDIAN_DEFAULT diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index 3d62367..cd4fc3b 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -83,9 +83,6 @@ } \ while (0) -#undef FPUTYPE_DEFAULT -#define FPUTYPE_DEFAULT "vfp" - /* Call the function profiler with a given profile label. */ #undef ARM_FUNCTION_PROFILER #define ARM_FUNCTION_PROFILER(STREAM, LABELNO) \ diff --git a/gcc/config/arm/netbsd-elf.h b/gcc/config/arm/netbsd-elf.h index 8811af7..02ff316 100644 --- a/gcc/config/arm/netbsd-elf.h +++ b/gcc/config/arm/netbsd-elf.h @@ -153,7 +153,3 @@ do \ (void) sysarch (0, &s); \ } \ while (0) - -#undef FPUTYPE_DEFAULT -#define FPUTYPE_DEFAULT "vfp" - diff --git a/gcc/config/arm/vxworks.h b/gcc/config/arm/vxworks.h index 107863b..9af37c7 100644 --- a/gcc/config/arm/vxworks.h +++ b/gcc/config/arm/vxworks.h @@ -92,8 +92,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* There is no default multilib. */ #undef MULTILIB_DEFAULTS -#define FPUTYPE_DEFAULT "vfp" - #undef FUNCTION_PROFILER #define FUNCTION_PROFILER VXWORKS_FUNCTION_PROFILER