From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24676 invoked by alias); 19 May 2017 10:33:57 -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 24555 invoked by uid 89); 19 May 2017 10:33:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: smtprelay.synopsys.com Received: from smtprelay4.synopsys.com (HELO smtprelay.synopsys.com) (198.182.47.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 May 2017 10:33:55 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id DFC4124E0DF2; Fri, 19 May 2017 03:33:56 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id C7F078D0; Fri, 19 May 2017 03:33:56 -0700 (PDT) Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id B7AC28CC; Fri, 19 May 2017 03:33:56 -0700 (PDT) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 19 May 2017 03:33:56 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 19 May 2017 16:03:54 +0530 Received: from nl20droid1.internal.synopsys.com (10.100.24.228) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.266.1; Fri, 19 May 2017 16:03:53 +0530 From: Claudiu Zissulescu To: CC: , , Subject: [PATCH 3/7] [ARC] Allow r30 to be used by the reg-alloc. Date: Fri, 19 May 2017 10:35:00 -0000 Message-ID: <1495189862-20533-4-git-send-email-claziss@synopsys.com> In-Reply-To: <1495189862-20533-1-git-send-email-claziss@synopsys.com> References: <1495189862-20533-1-git-send-email-claziss@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2017-05/txt/msg01541.txt.bz2 gcc/ 2016-12-12 Claudiu Zissulescu * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to be used by the reg-alloc. --- gcc/config/arc/arc.c | 9 ++++++++- gcc/config/arc/arc.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index fd4bf2c..ff86f6c 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -1551,7 +1551,14 @@ arc_conditional_register_usage (void) /* For ARCv2 the core register set is changed. */ strcpy (rname29, "ilink"); strcpy (rname30, "r30"); - fixed_regs[30] = call_used_regs[30] = 1; + call_used_regs[30] = 1; + fixed_regs[30] = 0; + + arc_regno_reg_class[30] = WRITABLE_CORE_REGS; + SET_HARD_REG_BIT (reg_class_contents[WRITABLE_CORE_REGS], 30); + SET_HARD_REG_BIT (reg_class_contents[CHEAP_CORE_REGS], 30); + SET_HARD_REG_BIT (reg_class_contents[GENERAL_REGS], 30); + SET_HARD_REG_BIT (reg_class_contents[MPY_WRITABLE_CORE_REGS], 30); } if (TARGET_MUL64_SET) diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 0a4c745..fbc1195 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -641,7 +641,8 @@ extern enum reg_class arc_regno_reg_class[]; ((REGNO) < 29 || ((REGNO) == ARG_POINTER_REGNUM) || ((REGNO) == 63) \ || ((unsigned) reg_renumber[REGNO] < 29) \ || ((unsigned) (REGNO) == (unsigned) arc_tp_regno) \ - || (fixed_regs[REGNO] == 0 && IN_RANGE (REGNO, 32, 59))) + || (fixed_regs[REGNO] == 0 && IN_RANGE (REGNO, 32, 59)) \ + || ((REGNO) == 30 && fixed_regs[REGNO] == 0)) #define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO) -- 1.9.1