From patchwork Wed May 24 15:39:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 766514 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wXxQq5cYXz9s9Y for ; Thu, 25 May 2017 01:39:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B1D3D87BF0; Wed, 24 May 2017 15:39:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S0vTfCLjOb8w; Wed, 24 May 2017 15:39:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 23C24879AB; Wed, 24 May 2017 15:39:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 04BB41C0424 for ; Wed, 24 May 2017 15:39:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0F454879AB for ; Wed, 24 May 2017 15:39:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1HAnhACgUr0Q for ; Wed, 24 May 2017 15:39:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.60.111]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4493E8775F for ; Wed, 24 May 2017 15:39:24 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 8DA1A10C07AB; Wed, 24 May 2017 08:39:23 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 78CF3D76; Wed, 24 May 2017 08:39:23 -0700 (PDT) Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 39212D71; Wed, 24 May 2017 08:39:22 -0700 (PDT) From: Alexey Brodkin To: buildroot@busybox.net Date: Wed, 24 May 2017 18:39:19 +0300 Message-Id: <20170524153919.44524-1-abrodkin@synopsys.com> X-Mailer: git-send-email 2.11.0 Cc: Thomas Petazzoni , Alexey Brodkin Subject: [Buildroot] [PATCH] gcc: arc: Fix tst_movb pattern X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes building of quagga [1]: ------------------------------>8--------------------------- 839:1: error: unrecognizable insn: } ^ (insn 183 24 26 4 (set (reg:CC_ZN 61 cc) (and:SI (reg:SI 0 r0 [orig:192 _12->id.s_addr ] [192]) (const_int -256 [0xffffffffffffff00]))) ospf_ri.c:790 -1 (nil)) ospf_ri.c:839:1: internal compiler error: in extract_insn, at recog.c:2287 ------------------------------>8--------------------------- Note this patch is prepared on top of arc-2017.03 release bump, that said there's a prerequisite [2]: "toolchain: Bump ARC tools to arc-2017.03 release". [1] http://autobuild.buildroot.net/results/3c1/3c12c4609d4a77ab8ccd3ea94840884d70520efai [2] http://patchwork.ozlabs.org/patch/766176/ Signed-off-by: Alexey Brodkin --- .../0001-ARC-Fix-tst_movb-pattern.patch | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch diff --git a/package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch b/package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch new file mode 100644 index 0000000000..3b09a13019 --- /dev/null +++ b/package/gcc/arc-2017.03/0001-ARC-Fix-tst_movb-pattern.patch @@ -0,0 +1,55 @@ +From 08235ef444fd32d311fc9edb65895133820462e3 Mon Sep 17 00:00:00 2001 +From: claziss +Date: Wed, 24 May 2017 12:53:43 +0200 +Subject: [PATCH] [ARC] Fix tst_movb pattern. + +The tst_movb pattern is missing guarding when spitting. + +gcc/ +2017-05-24 Claudiu Zissulescu + + * config/arc/arc.md (tst_movb): Add guard when splitting. + +testsuite/ +2017-05-24 Claudiu Zissulescu + + * gcc.target/arc/pr9001195952.c: New test. +--- + gcc/config/arc/arc.md | 2 +- + gcc/testsuite/gcc.target/arc/pr9001195952.c | 11 +++++++++++ + 2 files changed, 12 insertions(+), 1 deletion(-) + create mode 100755 gcc/testsuite/gcc.target/arc/pr9001195952.c + +diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md +index e78abaaafc42..d5510aeb0600 100644 +--- a/gcc/config/arc/arc.md ++++ b/gcc/config/arc/arc.md +@@ -863,7 +863,7 @@ archs4xd, archs4xd_slow" + (clobber (match_scratch:SI 3 "=X,X,X,X,X,X,Rrq,Rrq,c"))] + "TARGET_NPS_BITOPS" + "movb.f.cl %3,%1,%p2,%p2,%s2" +- "reload_completed ++ "TARGET_NPS_BITOPS && reload_completed + && (extract_constrain_insn_cached (insn), (which_alternative & ~1) != 6)" + [(set (match_dup 0) (match_dup 4))]) + +diff --git a/gcc/testsuite/gcc.target/arc/pr9001195952.c b/gcc/testsuite/gcc.target/arc/pr9001195952.c +new file mode 100755 +index 000000000000..252438d8d78b +--- /dev/null ++++ b/gcc/testsuite/gcc.target/arc/pr9001195952.c +@@ -0,0 +1,11 @@ ++/* { dg-do compile } */ ++/* { dg-skip-if "" { ! { clmcpu } } } */ ++/* { dg-options "-mcpu=archs -Os -w -fpic" } */ ++ ++/* tst_movb split pattern is wrong for anything else than NPS ++ chip. */ ++__bswap_32___bsx() { ++ int a = __builtin_bswap32(__bswap_32___bsx); ++ if (a & 1048575) ++ zlog_warn(); ++} +-- +2.7.4 +