From patchwork Wed Sep 16 09:29:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Bruel X-Patchwork-Id: 518312 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 5EAF114012C for ; Wed, 16 Sep 2015 19:29:19 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Unh8i2Nq; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=ijo2TE2CrlXBDMWau 38c9LQgYU9VWUli4eVcBfIL5r7H1yjjeqD14Zfs++UzT7Uvrxml0SGB/K4YEFgMi 7CvebYW2StHa2YjZdHzHhXxWa3yxdxqOeTPG59stvWTUM3rkjTEZiGsma/F+n8Kc T/vmztyK9kp/jqwJRNsM3EOwHc= 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 :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=IQ9QOzha+kPWrtiY/uD9SQl SbpE=; b=Unh8i2NqOroHkXC4YKHvwztd3sX6vQBSgiiwipWnFOuYC8wso9XqzWx /pC9EponY1d7Ztv8tIKLZZZjdsnh9nfcbxztd83T4fs5CyqOVqCVyx/c3UxYgvGQ Y/swZZCpcFZ0IizwSH4+I7FGLsIMqQAvvHEYu2GNNA/pfOUORPb0= Received: (qmail 32807 invoked by alias); 16 Sep 2015 09:29:11 -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 32795 invoked by uid 89); 16 Sep 2015 09:29:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mx07-00178001.pphosted.com Received: from mx07-00178001.pphosted.com (HELO mx07-00178001.pphosted.com) (62.209.51.94) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 16 Sep 2015 09:29:09 +0000 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.14.5/8.14.5) with SMTP id t8G9QCL5023303; Wed, 16 Sep 2015 11:29:05 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 1wy4dmggjt-1 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 16 Sep 2015 11:29:05 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C319831; Wed, 16 Sep 2015 09:28:50 +0000 (GMT) Received: from Webmail-eu.st.com (safex1hubcas4.st.com [10.75.90.69]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 8A1474DCD; Wed, 16 Sep 2015 09:29:03 +0000 (GMT) Received: from [164.129.122.197] (164.129.122.197) by webmail-eu.st.com (10.75.90.13) with Microsoft SMTP Server (TLS) id 8.3.342.0; Wed, 16 Sep 2015 11:29:03 +0200 Subject: Re: [PATCH 1/4] [ARM] Add attribute/pragma target fpu= To: Bernhard Reutner-Fischer , "kyrylo.tkachov@arm.com" , "Ramana.Radhakrishnan@arm.com" References: <55F69187.7020702@st.com> <84D96C45-DD45-4155-AF6C-97AAC3EFB155@gmail.com> CC: "gcc-patches@gcc.gnu.org" From: Christian Bruel X-No-Archive: yes Message-ID: <55F9365E.4050700@st.com> Date: Wed, 16 Sep 2015 11:29:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <84D96C45-DD45-4155-AF6C-97AAC3EFB155@gmail.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151, 1.0.33, 0.0.0000 definitions=2015-09-16_02:2015-09-15, 2015-09-16, 1970-01-01 signatures=0 X-IsSubscribed: yes > Maybe there is just dirt on my screen or my graphic-memory is broken, but I see an odd character between iWMMXt and and? Thanks Bernhard, Resent to remove this malicious sneaky ` character in the string error message. > > I keep forgetting if it's a capital W or a lowercase one but you'll know. > Thanks, > I don't know. iWMMXt is also referenced with a capital W in the other parts of the compiler. Christian 2015-09-14 Christian Bruel PR target/65837 * config/arm/arm.c (arm_option_override): Move NEON check... (arm_option_check_internal): here (arm_file_start): Move .fpu print... (arm_declare_function_name): here (arm_option_print): Dump current fpu name. * config/arm/arm.opt (arm_fpu_index): Mark Save. diff -ru gnu_trunk.p0/gcc/gcc/config/arm/arm.c gnu_trunk.p1/gcc/gcc/config/arm/arm.c --- gnu_trunk.p0/gcc/gcc/config/arm/arm.c 2015-09-16 10:49:26.693018760 +0200 +++ gnu_trunk.p1/gcc/gcc/config/arm/arm.c 2015-09-16 10:52:44.065449166 +0200 @@ -2713,6 +2713,12 @@ arm_option_check_internal (struct gcc_options *opts) { int flags = opts->x_target_flags; + const struct arm_fpu_desc *fpu_desc = &all_fpus[opts->x_arm_fpu_index]; + + /* iWMMXt and NEON are incompatible. */ + if (TARGET_IWMMXT && TARGET_VFP + && ARM_FPU_FSET_HAS (fpu_desc->features, FPU_FL_NEON)) + error ("iWMMXt and NEON are incompatible"); /* Make sure that the processor choice does not conflict with any of the other command line choices. */ @@ -3145,10 +3151,6 @@ error ("AAPCS does not support -mcallee-super-interworking"); } - /* iWMMXt and NEON are incompatible. */ - if (TARGET_IWMMXT && TARGET_NEON) - error ("iWMMXt and NEON are incompatible"); - /* __fp16 support currently assumes the core has ldrh. */ if (!arm_arch4 && arm_fp16_format != ARM_FP16_FORMAT_NONE) sorry ("__fp16 and no ldrh"); @@ -25634,7 +25636,6 @@ if (TARGET_BPABI) { - const char *fpu_name; if (arm_selected_arch) { /* armv7ve doesn't support any extensions. */ @@ -25678,23 +25679,14 @@ if (print_tune_info) arm_print_tune_info (); - if (TARGET_SOFT_FLOAT) + if (! TARGET_SOFT_FLOAT && arm_fpu_desc->model == ARM_FP_MODEL_VFP) { - fpu_name = "softvfp"; - } - else - { - fpu_name = arm_fpu_desc->name; - if (arm_fpu_desc->model == ARM_FP_MODEL_VFP) - { - if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE) - arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1); + if (TARGET_HARD_FLOAT && TARGET_VFP_SINGLE) + arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1); - if (TARGET_HARD_FLOAT_ABI) - arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1); - } + if (TARGET_HARD_FLOAT_ABI) + arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1); } - asm_fprintf (asm_out_file, "\t.fpu %s\n", fpu_name); /* Some of these attributes only apply when the corresponding features are used. However we don't have any easy way of figuring this out. @@ -29493,11 +29485,14 @@ arm_option_print (FILE *file, int indent, struct cl_target_option *ptr) { int flags = ptr->x_target_flags; + const struct arm_fpu_desc *fpu_desc = &all_fpus[ptr->x_arm_fpu_index]; fprintf (file, "%*sselected arch %s\n", indent, "", TARGET_THUMB2_P (flags) ? "thumb2" : TARGET_THUMB_P (flags) ? "thumb1" : "arm"); + + fprintf (file, "%*sselected fpu %s\n", indent, "", fpu_desc->name); } /* Hook to determine if one function can safely inline another. */ @@ -29691,6 +29686,9 @@ else fprintf (stream, "\t.arm\n"); + asm_fprintf (asm_out_file, "\t.fpu %s\n", TARGET_SOFT_FLOAT + ? "softvfp" : arm_fpu_desc->name); + if (TARGET_POKE_FUNCTION_NAME) arm_poke_function_name (stream, (const char *) name); } diff -ru gnu_trunk.p0/gcc/gcc/config/arm/arm.opt gnu_trunk.p1/gcc/gcc/config/arm/arm.opt --- gnu_trunk.p0/gcc/gcc/config/arm/arm.opt 2015-09-16 10:49:26.697018769 +0200 +++ gnu_trunk.p1/gcc/gcc/config/arm/arm.opt 2015-09-16 10:52:22.441401984 +0200 @@ -144,7 +144,7 @@ Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE) mfpu= -Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) +Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) Save Specify the name of the target floating point hardware/format mhard-float