From patchwork Mon Feb 24 10:01:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Bolton X-Patchwork-Id: 323534 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 C5F682C00C5 for ; Mon, 24 Feb 2014 21:01:23 +1100 (EST) 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:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=HjD/OzlWhcFYroyPSpS5dwk1appuuGVvg6wxoZGCKDsdUVLLk6bQf iNyyojM1L25fDFG+9fj37CsHXt6pIZl6BkKQHuWMxJ4gWBKbfTg4DBsnoOnX8zNI bVSR9ATPco5Z985w4wSPAVHkClN9zY+O4shu1OBFyfAmkoxmT2RcWY= 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:subject:date:message-id:mime-version:content-type; s= default; bh=uDoL5uGuJ9QxHorIP6OgqFshFBM=; b=A/9OdEwC1oB3oHAPRKJP 0HQ7TcPQaAtZdtDgN1nGs/pIBPcw6oJGkkvu66gN6jTENz3IbSWnsD1t4UA+xQID jI3bNh9BYslA7QhA3II3+vHpLl8/FVVqRPjjjl8KlFtEmHgMb70XHyqe2GGMMdfu tQlVqPVfWSp64DCWg4YHc3o= Received: (qmail 21699 invoked by alias); 24 Feb 2014 10:01:16 -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 21687 invoked by uid 89); 24 Feb 2014 10:01:16 -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, MSGID_MULTIPLE_AT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no 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; Mon, 24 Feb 2014 10:01:14 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 24 Feb 2014 10:01:12 +0000 Received: from e104535vm ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 24 Feb 2014 10:01:10 +0000 From: "Ian Bolton" To: Subject: [PATCH, AArch64] Define __ARM_NEON by default Date: Mon, 24 Feb 2014 10:01:10 -0000 Message-ID: <000401cf3147$581da2d0$0858e870$@bolton@arm.com> MIME-Version: 1.0 X-MC-Unique: 114022410011202901 X-IsSubscribed: yes Hi, This is needed for when people are porting their aarch32 code to aarch64. They will have #ifdef __ARM_NEON (as specified in ACLE) and their intrinsics currently won't get used on aarch64 because it's not defined there by default. This patch defines __ARM_NEON so long as we are not using general regs only. Tested on simple testcase to ensure __ARM_NEON was defined. OK for trunk? Cheers, Ian 2014-02-24 Ian Bolton * config/aarch64/aarch64.h: Define __ARM_NEON by default if we are not using general regs only. diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 13c424c..fc21981 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -32,6 +32,9 @@ else \ builtin_define ("__AARCH64EL__"); \ \ + if (!TARGET_GENERAL_REGS_ONLY) \ + builtin_define ("__ARM_NEON"); \ + \ switch (aarch64_cmodel) \ { \ case AARCH64_CMODEL_TINY: \