From patchwork Thu Apr 21 11:39:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 613066 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 3qrGzB68NQz9sDD for ; Thu, 21 Apr 2016 21:40:54 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=CT5Yn+Tp; 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:from :to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; q=dns; s=default; b=RxY08Dn5rOw7qAnSb3A +GFekGGO/Zx83SQbGVeyUWYS3YhsDghnDiFytuhJ9wFY2RtPwBCnvEqj7pYGkO1r bPnXtJANfBW9P4Q8tJ06sRgFfmZO044/Nusrf/QvrBGj+hxEDJlct6MjuoiW8TWs XarJLHEnpl5Mz9mEyCbkPxh8= 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; s=default; bh=FnZQfvy2fi+xPxRGVcn7u5G7C 7E=; b=CT5Yn+TpVMA044ikmkyzM3UiIcDFg7FmbQoRsh7d/IP8I0lN8QCZ/PamN HlN8+rfPDnGvDrM5Xr7bvJrmsrVS4sICY2q8+77zjXJmnqjnrcB8BiQgwRsTUxZq f2HVAHHulAKyijxVqt+4l1GlMHvd1ZTWtmC3ccEdSKd9wJ72Co= Received: (qmail 62381 invoked by alias); 21 Apr 2016 11:40:00 -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 62145 invoked by uid 89); 21 Apr 2016 11:39:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=PATCHv2, patchv2, HTo:U*gnu X-HELO: mail-wm0-f51.google.com Received: from mail-wm0-f51.google.com (HELO mail-wm0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 21 Apr 2016 11:39:48 +0000 Received: by mail-wm0-f51.google.com with SMTP id u206so127732910wme.1 for ; Thu, 21 Apr 2016 04:39:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=9cPK5iCps3KHq0Sa7pGUBRlp8FvDlifdv7PyYUJmJYs=; b=CmYVBedenrG5byjCF49rq28zCu0k6y2duuGYWinhZgQlLO98SJ3Ybfed84pXqYTpCq XJSzI2UHCfMjnN2O+jbfyXzWe0Z20K4mYdz/bo9bMMV9uDayFZOaahPzYjFzA9t/CWFT +9bEWQL3NjtOF8Es9uNuitLX2mELgo1eb4/5bTbEbNHhjVToR4Fy2Z9DTnJAz5OmRZKV uD7ph53dJBqrvpyOGqmg6yCeJ0y/CmbRG+xdWFCwy7PoEe2rjwNW5qxXHBNME5GjZJmn HVyPCop0SgyKOcVS2e0fNbBtAN2eZ3T9R6eSomoicJds5twHOexP56ZQwHYxtIDDkPtk RHAw== X-Gm-Message-State: AOPr4FWKoDsXz3h1uiIs12JJuskptQCU9R/hwbQN0Lthr+Ur6EBmgDThCmIgd+BU6duHrg== X-Received: by 10.194.142.147 with SMTP id rw19mr13884061wjb.31.1461238785100; Thu, 21 Apr 2016 04:39:45 -0700 (PDT) Received: from localhost (host86-155-190-186.range86-155.btcentralplus.com. [86.155.190.186]) by smtp.gmail.com with ESMTPSA id s10sm2464896wjp.3.2016.04.21.04.39.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Apr 2016 04:39:44 -0700 (PDT) From: Andrew Burgess To: gcc-patches@gcc.gnu.org, gnu@amylaar.uk Cc: noamca@mellanox.com, Claudiu.Zissulescu@synopsys.com, Andrew Burgess Subject: [PATCHv2 1/7] gcc/arc: Add support for nps400 cpu type. Date: Thu, 21 Apr 2016 12:39:35 +0100 Message-Id: <8bc744619a6e15fbb40dda50f7520a5088303862.1461238348.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes The nps400 is an arc700 with a set of extension instructions produced by Mellanox (formally EZChip). This commit adds support for the nps400 architecture to the arc backend. After this commit it is possible to compile using -mcpu=nps400 in order to specialise for the nps400. Later commits add support for the specific extension instructions. gcc/ChangeLog: * common/config/arc/arc-common.c (arc_handle_option): Add NPS400 support, setup defaults. * config/arc/arc-opts.h (enum processor_type): Add NPS400. * config/arc/arc.c (arc_init): Add NPS400 support. * config/arc/arc.h (CPP_SPEC): Add NPS400 defines. (TARGET_ARC700): NPS400 is also an ARC700. * config/arc/arc.opt: Add NPS400 options to -mcpu=. --- gcc/ChangeLog.NPS400 | 9 +++++++++ gcc/common/config/arc/arc-common.c | 4 ++++ gcc/config/arc/arc-opts.h | 1 + gcc/config/arc/arc.c | 5 +++++ gcc/config/arc/arc.h | 5 ++++- gcc/config/arc/arc.opt | 6 ++++++ 6 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gcc/ChangeLog.NPS400 diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c index 64fb053..f5b9c6d 100644 --- a/gcc/common/config/arc/arc-common.c +++ b/gcc/common/config/arc/arc-common.c @@ -83,6 +83,10 @@ arc_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, switch (value) { + case PROCESSOR_NPS400: + if (! (opts_set->x_TARGET_CASE_VECTOR_PC_RELATIVE) ) + opts->x_TARGET_CASE_VECTOR_PC_RELATIVE = 1; + /* Fall through */ case PROCESSOR_ARC600: case PROCESSOR_ARC700: if (! (opts_set->x_target_flags & MASK_BARREL_SHIFTER) ) diff --git a/gcc/config/arc/arc-opts.h b/gcc/config/arc/arc-opts.h index 1e11ebc4..cbd7898 100644 --- a/gcc/config/arc/arc-opts.h +++ b/gcc/config/arc/arc-opts.h @@ -24,6 +24,7 @@ enum processor_type PROCESSOR_ARC600, PROCESSOR_ARC601, PROCESSOR_ARC700, + PROCESSOR_NPS400, PROCESSOR_ARCEM, PROCESSOR_ARCHS }; diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index d60db50..ae8772e 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -649,6 +649,11 @@ arc_init (void) tune_dflt = TUNE_ARC700_4_2_STD; break; + case PROCESSOR_NPS400: + arc_cpu_string = "NPS400"; + tune_dflt = TUNE_ARC700_4_2_STD; + break; + case PROCESSOR_ARCEM: arc_cpu_string = "EM"; break; diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 1c2a38d..f96bf0f 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -136,6 +136,8 @@ along with GCC; see the file COPYING3. If not see %{mdsp-packa:-D__Xdsp_packa} %{mcrc:-D__Xcrc} %{mdvbf:-D__Xdvbf} \ %{mtelephony:-D__Xtelephony} %{mxy:-D__Xxy} %{mmul64: -D__Xmult32} \ %{mlock:-D__Xlock} %{mswape:-D__Xswape} %{mrtsc:-D__Xrtsc} \ +%{mcpu=NPS400:-D__NPS400__} \ +%{mcpu=nps400:-D__NPS400__} \ " #define CC1_SPEC "\ @@ -297,7 +299,8 @@ along with GCC; see the file COPYING3. If not see #define TARGET_ARC600 (arc_cpu == PROCESSOR_ARC600) #define TARGET_ARC601 (arc_cpu == PROCESSOR_ARC601) -#define TARGET_ARC700 (arc_cpu == PROCESSOR_ARC700) +#define TARGET_ARC700 (arc_cpu == PROCESSOR_ARC700 \ + || arc_cpu == PROCESSOR_NPS400) #define TARGET_EM (arc_cpu == PROCESSOR_ARCEM) #define TARGET_HS (arc_cpu == PROCESSOR_ARCHS) #define TARGET_V2 \ diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt index 2227b75..14fd2a4 100644 --- a/gcc/config/arc/arc.opt +++ b/gcc/config/arc/arc.opt @@ -189,6 +189,12 @@ EnumValue Enum(processor_type) String(arc700) Value(PROCESSOR_ARC700) EnumValue +Enum(processor_type) String(nps400) Value(PROCESSOR_NPS400) + +EnumValue +Enum(processor_type) String(NPS400) Value(PROCESSOR_NPS400) + +EnumValue Enum(processor_type) String(ARCEM) Value(PROCESSOR_ARCEM) EnumValue