From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42211 invoked by alias); 4 Mar 2016 13:26:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 42077 invoked by uid 89); 4 Mar 2016 13:26:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=sk:noamca, D*mellanox.com, noamca@mellanox.com, noamcamellanoxcom X-HELO: mail-wm0-f44.google.com Received: from mail-wm0-f44.google.com (HELO mail-wm0-f44.google.com) (74.125.82.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 04 Mar 2016 13:25:57 +0000 Received: by mail-wm0-f44.google.com with SMTP id l68so29195041wml.1 for ; Fri, 04 Mar 2016 05:25:57 -0800 (PST) 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=0SL7ESZhg0LuwW0HyCciMxtFUuUQHRTMBisZ6TiGyn8=; b=YN/00uFscNst0si6Yzu3F0lZsdb5alWIJmpxYu/ejVXa3Lu1LI83GmVVooq12/gJ7D 1D3zQuieotlmicpyPL9bhJmBJFAB+yLHekqkMLdQxcG4c1oWcIcLFbR/cXDlPTIccD6B XS/d0EbPw7nFq3auRqpJjpDK55MYHRy3vD7bvX+HC0NMDs4qFecLe2QHLzTyFa6p/3nn +7cB9yuvnccNUO4BV756CPQNhLgJBXDmkzR9zOz3ErMtA/I1elh3LWUTE4lTnbJmiU0A 87zja0Vp+FQi3Q7GQ2XO7BG6ISOAu93t82QRZMh+IafN+zRKeotLDkJiFxE4FRTsIwHq EsNg== X-Gm-Message-State: AD7BkJLPSRzzWu7GQ4uZtNYqM+n2sStLJhTiiYhFrYrhgbya6QMKpx/ZBTL+cP8b1vG+pg== X-Received: by 10.194.142.135 with SMTP id rw7mr8505015wjb.84.1457097954959; Fri, 04 Mar 2016 05:25:54 -0800 (PST) Received: from localhost (host86-138-94-184.range86-138.btcentralplus.com. [86.138.94.184]) by smtp.gmail.com with ESMTPSA id t8sm3325576wjy.41.2016.03.04.05.25.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Mar 2016 05:25:54 -0800 (PST) From: Andrew Burgess To: gcc-patches@gcc.gnu.org Cc: noamca@mellanox.com, Claudiu.Zissulescu@synopsys.com, Andrew Burgess Subject: [PATCH 03/10] gcc/arc: generate jump tables in code section for nps400 Date: Fri, 04 Mar 2016 13:26:00 -0000 Message-Id: <3367cdd06dd628f831d3382ebbbe7eaf7c51102d.1457097757.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00350.txt.bz2 When code runs from section loaded into fast memory we do not want it to use rodata section from a slow memory for any jump tables. This commit turns on CASE_VECTOR_PC_RELATIVE by default for NPS400 targets, which in turn turns on JUMP_TABLES_IN_TEXT_SECTION, which will place the jump tables into the code section. As a later optimisation we could be smarter about this, only turning on inline jump tables when the code section is not the default code section (.text), which we assume is not loaded into fast memory. gcc/ChangeLog: * config/arc/arc.opt (TARGET_CASE_VECTOR_PC_RELATIVE): Default on for NPS400. --- gcc/ChangeLog.NPS400 | 7 +++++++ gcc/config/arc/arc.opt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog.NPS400 b/gcc/ChangeLog.NPS400 index 0281640..716e413 100644 --- a/gcc/ChangeLog.NPS400 +++ b/gcc/ChangeLog.NPS400 @@ -1,3 +1,10 @@ +2015-09-08 Andrew Burgess + Joern Rennecke + Noam Camus + + * config/arc/arc.opt (TARGET_CASE_VECTOR_PC_RELATIVE): Default on + for NPS400. + 2016-02-02 Joern Rennecke Andrew Burgess diff --git a/gcc/config/arc/arc.opt b/gcc/config/arc/arc.opt index f8e062c..55a5b32 100644 --- a/gcc/config/arc/arc.opt +++ b/gcc/config/arc/arc.opt @@ -283,7 +283,7 @@ Target Var(TARGET_BBIT_PEEPHOLE) Enable bbit peephole2. mcase-vector-pcrel -Target Var(TARGET_CASE_VECTOR_PC_RELATIVE) +Target Var(TARGET_CASE_VECTOR_PC_RELATIVE) Init(ARC_NPS400 != 0) Use pc-relative switch case tables - this enables case table shortening. mcompact-casesi -- 2.6.4