From patchwork Mon Mar 25 11:03:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Zissulescu Ianculescu X-Patchwork-Id: 1064133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-498371-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Fywbjutt"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="TCID6ght"; dkim-atps=neutral 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 44SWbj6J6sz9sSH for ; Mon, 25 Mar 2019 22:04:00 +1100 (AEDT) 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 :mime-version:content-transfer-encoding; q=dns; s=default; b=jC/ isrkaHQ7PVS6hY+0GzguX08njjXqv66nNVoU7KCZat4745JFEsiEe8OYDs3BYSJq 8iI3s/04htQEU2PghGZzKaLw8oogJGqhTbeVtBwC5xamdziUrJ1lV2cRUoNshBNb MSripd9XcfK2vAqHSOioWnemNLhiD3ixDEU1lTz4= 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 :mime-version:content-transfer-encoding; s=default; bh=Z/TBCDGNc xZ72CpY3fwNcbGqgG0=; b=FywbjuttNopVhzFZTc232SmTBJ8KBosM1fC63E6/g K862r3TGXuJr/iitnOZ+ZErNpeHD8+2rIUXAvsfKu4VvvshyqUzWF6eS8V/DGKDz V1kBZdXqJ1TlLso3bAUcD814YTEnKH3L5QrJPj6SWKlywvJSuivbP5+SJsLQejXb pk= Received: (qmail 107050 invoked by alias); 25 Mar 2019 11:03:28 -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 106980 invoked by uid 89); 25 Mar 2019 11:03:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=tg, Codes, five, proof X-HELO: mail-ed1-f52.google.com Received: from mail-ed1-f52.google.com (HELO mail-ed1-f52.google.com) (209.85.208.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Mar 2019 11:03:25 +0000 Received: by mail-ed1-f52.google.com with SMTP id h22so7101784edw.7 for ; Mon, 25 Mar 2019 04:03:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0ORvcek4N+tYIjmjfGRRQXFyHaOV24K2v0tkA2PEYL0=; b=TCID6ght5j9Xrn7etOb/k7cX7WwBTE5gkdBglBXMZzmwXO/X/R9wNJV6McE6Qy4q02 NM7EhwwSxqw67X1VLCUMe2K2gmModunHaaccnV7CTgKdHoanF6i9bIN5axrmpUen30K6 wlUCNZq80GeuAm4pMJZ/hSMPCTxPn5v+dmhsg5DGymw2SR6Mb49TgR4sjJkzypjojw0E jjsB7aB7kJjBekIyES9V1GevsOcyCsAY2dXi/OAGXKa7pLJVfgGf18Np8/c+QJ8PoI9W zhbLoxAyywuk8D9NAP2/GdUedacplq8tp4IYPwbkbSeS3+GjIKj+3fpuOYsF7TYby0Dy /Mgw== Received: from engy.ddns.hightechcampus.nl ([80.255.245.234]) by smtp.gmail.com with ESMTPSA id i8sm2967594eda.1.2019.03.25.04.03.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Mar 2019 04:03:23 -0700 (PDT) From: Claudiu Zissulescu To: gcc-patches@gcc.gnu.org Cc: fbedard@synopsys.com, andrew.burgess@embecosm.com Subject: [PATCH 3/3] [ARC] Remove Rs5 constraint. Date: Mon, 25 Mar 2019 12:03:13 +0100 Message-Id: <20190325110313.9271-4-claziss@gmail.com> In-Reply-To: <20190325110313.9271-1-claziss@gmail.com> References: <20190325110313.9271-1-claziss@gmail.com> MIME-Version: 1.0 X-IsSubscribed: yes New LRA algorithms require the all the register constraints to be defined using define_register_constraint keyword. However, Rs5 constraint was not LRA proof. Remove it and replace it by equivalent Rcd constraint. gcc/ xxxx-xx-xx Claudiu Zissulescu * config/arc/arc.md (sibcall_insn): Use Rcd constraint. (sibcall_value_insn): Likewise. * config/arc/constraints.md (Rs5): Remove. --- gcc/config/arc/arc.md | 24 +++++++++++------------ gcc/config/arc/constraints.md | 10 ---------- gcc/testsuite/gcc.target/arc/long-calls.c | 4 ++-- 3 files changed, 14 insertions(+), 24 deletions(-) diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md index 7ac5a1b5785..54d073107a8 100644 --- a/gcc/config/arc/arc.md +++ b/gcc/config/arc/arc.md @@ -4703,17 +4703,17 @@ core_3, archs4x, archs4xd, archs4xd_slow" (define_insn "*sibcall_insn" [(call (mem:SI (match_operand:SI 0 "call_address_operand" - "Cbp,Cbr,Rs5,Rsc,Cal")) + "Cbp,Cbr,!Rcd,Rsc,Cal")) (match_operand 1 "" "")) (simple_return) (use (match_operand 2 "" ""))] "" "@ - b%!%* %P0 - b%!%* %P0 - j%!%* [%0]%& - j%!%* [%0] - j%! %P0" + b%!%*\\t%P0 + b%!%*\\t%P0 + j%!%*\\t[%0] + j%!%*\\t[%0] + j%!\\t%P0" [(set_attr "type" "call,call,call,call,call_no_delay_slot") (set_attr "predicable" "yes,no,no,yes,yes") (set_attr "iscompact" "false,false,maybe,false,false") @@ -4723,17 +4723,17 @@ core_3, archs4x, archs4xd, archs4xd_slow" (define_insn "*sibcall_value_insn" [(set (match_operand 0 "dest_reg_operand" "") (call (mem:SI (match_operand:SI 1 "call_address_operand" - "Cbp,Cbr,Rs5,Rsc,Cal")) + "Cbp,Cbr,!Rcd,Rsc,Cal")) (match_operand 2 "" ""))) (simple_return) (use (match_operand 3 "" ""))] "" "@ - b%!%* %P1 - b%!%* %P1 - j%!%* [%1]%& - j%!%* [%1] - j%! %P1" + b%!%*\\t%P1 + b%!%*\\t%P1 + j%!%*\\t[%1] + j%!%*\\t[%1] + j%!\\t%P1" [(set_attr "type" "call,call,call,call,call_no_delay_slot") (set_attr "predicable" "yes,no,no,yes,yes") (set_attr "iscompact" "false,false,maybe,false,false") diff --git a/gcc/config/arc/constraints.md b/gcc/config/arc/constraints.md index 523210432da..494e4792316 100644 --- a/gcc/config/arc/constraints.md +++ b/gcc/config/arc/constraints.md @@ -480,16 +480,6 @@ (and (match_code "reg") (match_test "REGNO (op) == 31"))) -(define_constraint "Rs5" - "@internal - sibcall register - only allow one of the five available 16 bit isnsn. - Registers usable in ARCompact 16-bit instructions: @code{r0}-@code{r3}, - @code{r12}" - (and (match_code "reg") - (match_test "!arc_ccfsm_cond_exec_p ()") - (ior (match_test "(unsigned) REGNO (op) <= 3") - (match_test "REGNO (op) == 12")))) - (define_constraint "Rcc" "@internal Condition Codes" diff --git a/gcc/testsuite/gcc.target/arc/long-calls.c b/gcc/testsuite/gcc.target/arc/long-calls.c index 63fafbcc674..9ae36ca0df3 100644 --- a/gcc/testsuite/gcc.target/arc/long-calls.c +++ b/gcc/testsuite/gcc.target/arc/long-calls.c @@ -5,7 +5,7 @@ int g (void); int f (void) { - g(); + g(); } -/* { dg-final { scan-assembler "j @g" } } */ +/* { dg-final { scan-assembler "j\\t@g" } } */