From patchwork Sat Nov 28 11:00:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1407506 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CjpTF0XTHz9sRR for ; Sat, 28 Nov 2020 22:01:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 69DD120108; Sat, 28 Nov 2020 11:01:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yTM6kX-8FMz5; Sat, 28 Nov 2020 11:01:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1690620471; Sat, 28 Nov 2020 11:00:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3D5721BF3F0 for ; Sat, 28 Nov 2020 11:00:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2BA0420452 for ; Sat, 28 Nov 2020 11:00:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZirLaAWq3ukb for ; Sat, 28 Nov 2020 11:00:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout03.t-online.de (mailout03.t-online.de [194.25.134.81]) by silver.osuosl.org (Postfix) with ESMTPS id 29B512045E for ; Sat, 28 Nov 2020 11:00:49 +0000 (UTC) Received: from fwd07.aul.t-online.de (fwd07.aul.t-online.de [172.20.27.150]) by mailout03.t-online.de (Postfix) with SMTP id 9297642B81BC; Sat, 28 Nov 2020 12:00:45 +0100 (CET) Received: from fli4l.lan.fli4l (GQ1zMoZXYh6dLiG46ThsUTFpAV05kVPfFEZQ30b3JLrKSeX8zp6+OE98BxHJBH1g2H@[79.214.202.88]) by fwd07.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1kixy6-0GojSK0; Sat, 28 Nov 2020 12:00:42 +0100 Received: from mahler.lan.fli4l ([192.168.1.1]:36654) by fli4l.lan.fli4l with esmtp (Exim 4.94) (envelope-from ) id 1kixy5-0005oM-SB; Sat, 28 Nov 2020 12:00:42 +0100 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sat, 28 Nov 2020 12:00:40 +0100 Message-Id: <20201128110041.2198596-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-ID: GQ1zMoZXYh6dLiG46ThsUTFpAV05kVPfFEZQ30b3JLrKSeX8zp6+OE98BxHJBH1g2H X-TOI-EXPURGATEID: 150726::1606561242-0000DD00-380157DC/0/0 CLEAN NORMAL X-TOI-MSGID: f35e0801-e59c-48c7-84b2-37e4018ef45b Subject: [Buildroot] [PATCH 1/2] toolchain: update option descriptions for ARC tools arc-2020.09-release X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" https://git.buildroot.net/buildroot/commit/?id=0791abfba0227803b19895ea22326f4e17ac93dc bumped * Binutils 2.34.50 with additional ARC patches * GCC 10.0.2 with additional ARC patches * GDB 10.0.50 with additional ARC patches but forgot to update the version numbers stored in option descriptions. Signed-off-by: Bernd Kuhls --- package/binutils/Config.in.host | 2 +- package/gcc/Config.in.host | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host index b690b952dc..89c6894a1f 100644 --- a/package/binutils/Config.in.host +++ b/package/binutils/Config.in.host @@ -39,7 +39,7 @@ config BR2_BINUTILS_VERSION_2_35_X depends on !BR2_BINFMT_FLAT config BR2_BINUTILS_VERSION_ARC - bool "binutils arc (2.31)" + bool "binutils arc (2.34.50)" depends on BR2_arc config BR2_BINUTILS_VERSION_CSKY diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host index 10688ff568..2ed159314c 100644 --- a/package/gcc/Config.in.host +++ b/package/gcc/Config.in.host @@ -9,7 +9,7 @@ choice Select the version of gcc you wish to use. config BR2_GCC_VERSION_ARC - bool "gcc arc (9.x)" + bool "gcc arc (10.x)" # Only supported architecture depends on BR2_arc select BR2_TOOLCHAIN_GCC_AT_LEAST_9 From patchwork Sat Nov 28 11:00:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1407505 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CjpT26LNSz9sRR for ; Sat, 28 Nov 2020 22:01:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A14D920108; Sat, 28 Nov 2020 11:01:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kvt0Hvjlsg6a; Sat, 28 Nov 2020 11:00:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3BBAA20468; Sat, 28 Nov 2020 11:00:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 40A8E1BF3F0 for ; Sat, 28 Nov 2020 11:00:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3C736879F3 for ; Sat, 28 Nov 2020 11:00:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3fZRA8Sc59i6 for ; Sat, 28 Nov 2020 11:00:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout10.t-online.de (mailout10.t-online.de [194.25.134.21]) by hemlock.osuosl.org (Postfix) with ESMTPS id C9A6587964 for ; Sat, 28 Nov 2020 11:00:49 +0000 (UTC) Received: from fwd07.aul.t-online.de (fwd07.aul.t-online.de [172.20.27.150]) by mailout10.t-online.de (Postfix) with SMTP id 94750417477E; Sat, 28 Nov 2020 12:00:45 +0100 (CET) Received: from fli4l.lan.fli4l (TzIDmyZOghV47tC0+0KsO1-OgmwFHgKYhTTugt9CrFkBFdP8LFO5lHlr25ktWcQZHq@[79.214.202.88]) by fwd07.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1kixy8-0IYng00; Sat, 28 Nov 2020 12:00:44 +0100 Received: from mahler.lan.fli4l ([192.168.1.1]:36654) by fli4l.lan.fli4l with esmtp (Exim 4.94) (envelope-from ) id 1kixy6-0005oM-Gj; Sat, 28 Nov 2020 12:00:43 +0100 From: Bernd Kuhls To: buildroot@buildroot.org Date: Sat, 28 Nov 2020 12:00:41 +0100 Message-Id: <20201128110041.2198596-2-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201128110041.2198596-1-bernd.kuhls@t-online.de> References: <20201128110041.2198596-1-bernd.kuhls@t-online.de> MIME-Version: 1.0 X-ID: TzIDmyZOghV47tC0+0KsO1-OgmwFHgKYhTTugt9CrFkBFdP8LFO5lHlr25ktWcQZHq X-TOI-EXPURGATEID: 150726::1606561244-0000DD00-FB0C3766/0/0 CLEAN NORMAL X-TOI-MSGID: ced8622f-9a71-4676-9dec-b0c0734b13b1 Subject: [Buildroot] [PATCH 2/2] toolchain: add upstream fix for arc gcc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: http://autobuild.buildroot.net/results/792/792e69eefc87d28b92972c452d5e230d86d9e114/ Upstream issue: https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/issues/310 Signed-off-by: Bernd Kuhls --- .../0001-arc-Refurbish-adc-sbc-patterns.patch | 243 ++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 package/gcc/arc-2020.09-release/0001-arc-Refurbish-adc-sbc-patterns.patch diff --git a/package/gcc/arc-2020.09-release/0001-arc-Refurbish-adc-sbc-patterns.patch b/package/gcc/arc-2020.09-release/0001-arc-Refurbish-adc-sbc-patterns.patch new file mode 100644 index 0000000000..3292b26a4e --- /dev/null +++ b/package/gcc/arc-2020.09-release/0001-arc-Refurbish-adc-sbc-patterns.patch @@ -0,0 +1,243 @@ +From b92c22b144d063c4436a6693045ceb57d344c495 Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Wed, 11 Nov 2020 12:31:10 +0200 +Subject: [PATCH] arc: Refurbish adc/sbc patterns + +The adc/sbc patterns were unecessary spliting, remove that and +associated functions. + +gcc/ChangeLog: + +2020-10-11 Claudiu Zissulescu + + * config/arc/arc-protos.h (arc_scheduling_not_expected): Remove + it. + (arc_sets_cc_p): Likewise. + (arc_need_delay): Likewise. + * config/arc/arc.c (arc_sets_cc_p): Likewise. + (arc_need_delay): Likewise. + (arc_scheduling_not_expected): Likewise. + * config/arc/arc.md: Convert adc/sbc patterns to simple + instruction definitions. + +Signed-off-by: Claudiu Zissulescu + +Downloaded from upstream commit +https://github.com/foss-for-synopsys-dwc-arc-processors/gcc/commit/b92c22b144d063c4436a6693045ceb57d344c495 + +Signed-off-by: Bernd Kuhls +--- + gcc/config/arc/arc-protos.h | 3 -- + gcc/config/arc/arc.c | 53 --------------------- + gcc/config/arc/arc.md | 95 +++++++++++-------------------------- + 3 files changed, 29 insertions(+), 122 deletions(-) + +diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h +index c72d78e3b9e..de4cf47c818 100644 +--- a/gcc/config/arc/arc-protos.h ++++ b/gcc/config/arc/arc-protos.h +@@ -90,10 +90,7 @@ extern void split_subsi (rtx *); + extern void arc_split_move (rtx *); + extern const char *arc_short_long (rtx_insn *insn, const char *, const char *); + extern rtx arc_regno_use_in (unsigned int, rtx); +-extern bool arc_scheduling_not_expected (void); +-extern bool arc_sets_cc_p (rtx_insn *insn); + extern int arc_label_align (rtx_insn *label); +-extern bool arc_need_delay (rtx_insn *insn); + extern bool arc_text_label (rtx_insn *insn); + + extern bool arc_short_comparison_p (rtx, int); +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index 5a7b0cb6696..c3ee9181f93 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -10341,59 +10341,6 @@ arc_attr_type (rtx_insn *insn) + return get_attr_type (insn); + } + +-/* Return true if insn sets the condition codes. */ +- +-bool +-arc_sets_cc_p (rtx_insn *insn) +-{ +- if (NONJUMP_INSN_P (insn)) +- if (rtx_sequence *seq = dyn_cast (PATTERN (insn))) +- insn = seq->insn (seq->len () - 1); +- return arc_attr_type (insn) == TYPE_COMPARE; +-} +- +-/* Return true if INSN is an instruction with a delay slot we may want +- to fill. */ +- +-bool +-arc_need_delay (rtx_insn *insn) +-{ +- rtx_insn *next; +- +- if (!flag_delayed_branch) +- return false; +- /* The return at the end of a function needs a delay slot. */ +- if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE +- && (!(next = next_active_insn (insn)) +- || ((!NONJUMP_INSN_P (next) || GET_CODE (PATTERN (next)) != SEQUENCE) +- && arc_attr_type (next) == TYPE_RETURN)) +- && (!TARGET_PAD_RETURN +- || (prev_active_insn (insn) +- && prev_active_insn (prev_active_insn (insn)) +- && prev_active_insn (prev_active_insn (prev_active_insn (insn)))))) +- return true; +- if (NONJUMP_INSN_P (insn) +- ? (GET_CODE (PATTERN (insn)) == USE +- || GET_CODE (PATTERN (insn)) == CLOBBER +- || GET_CODE (PATTERN (insn)) == SEQUENCE) +- : JUMP_P (insn) +- ? (GET_CODE (PATTERN (insn)) == ADDR_VEC +- || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC) +- : !CALL_P (insn)) +- return false; +- return num_delay_slots (insn) != 0; +-} +- +-/* Return true if the scheduling pass(es) has/have already run, +- i.e. where possible, we should try to mitigate high latencies +- by different instruction selection. */ +- +-bool +-arc_scheduling_not_expected (void) +-{ +- return cfun->machine->arc_reorg_started; +-} +- + /* Code has a minimum p2 alignment of 1, which we must restore after + an ADDR_DIFF_VEC. */ + +diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md +index f91adbc0d94..c635b69ddd5 100644 +--- a/gcc/config/arc/arc.md ++++ b/gcc/config/arc/arc.md +@@ -2847,43 +2847,25 @@ archs4x, archs4xd" + (set_attr "type" "compare") + (set_attr "length" "4,4,8")]) + +-; w/c/c comes first (rather than w/0/C_0) to prevent the middle-end +-; needlessly prioritizing the matching constraint. +-; Rcw/0/C_0 comes before w/c/L so that the lower latency conditional +-; execution is used where possible. +-(define_insn_and_split "adc" +- [(set (match_operand:SI 0 "dest_reg_operand" "=w,Rcw,w,Rcw,w") +- (plus:SI (plus:SI (ltu:SI (reg:CC_C CC_REG) (const_int 0)) +- (match_operand:SI 1 "nonmemory_operand" +- "%c,0,c,0,cCal")) +- (match_operand:SI 2 "nonmemory_operand" "c,C_0,L,I,cCal")))] ++(define_insn "adc" ++ [(set (match_operand:SI 0 "register_operand" "=r, r,r,r, r,r") ++ (plus:SI ++ (plus:SI ++ (ltu:SI (reg:CC_C CC_REG) (const_int 0)) ++ (match_operand:SI 1 "nonmemory_operand" "%r, 0,r,0,Cal,r")) ++ (match_operand:SI 2 "nonmemory_operand" "r,C_0,L,I, r,Cal")))] + "register_operand (operands[1], SImode) + || register_operand (operands[2], SImode)" + "@ +- adc %0,%1,%2 +- add.cs %0,%1,1 +- adc %0,%1,%2 +- adc %0,%1,%2 +- adc %0,%1,%2" +- ; if we have a bad schedule after sched2, split. +- "reload_completed +- && !optimize_size && (!TARGET_ARC600_FAMILY) +- && arc_scheduling_not_expected () +- && arc_sets_cc_p (prev_nonnote_insn (insn)) +- /* If next comes a return or other insn that needs a delay slot, +- expect the adc to get into the delay slot. */ +- && next_nonnote_insn (insn) +- && !arc_need_delay (next_nonnote_insn (insn)) +- /* Restore operands before emitting. */ +- && (extract_insn_cached (insn), 1)" +- [(set (match_dup 0) (match_dup 3)) +- (cond_exec +- (ltu (reg:CC_C CC_REG) (const_int 0)) +- (set (match_dup 0) (plus:SI (match_dup 0) (const_int 1))))] +- "operands[3] = simplify_gen_binary (PLUS, SImode, operands[1], operands[2]);" ++ adc\\t%0,%1,%2 ++ add.cs\\t%0,%1,1 ++ adc\\t%0,%1,%2 ++ adc\\t%0,%1,%2 ++ adc\\t%0,%1,%2 ++ adc\\t%0,%1,%2" + [(set_attr "cond" "use") + (set_attr "type" "cc_arith") +- (set_attr "length" "4,4,4,4,8")]) ++ (set_attr "length" "4,4,4,4,8,8")]) + + ; combiner-splitter cmp / scc -> cmp / adc + (define_split +@@ -3015,7 +2997,7 @@ archs4x, archs4xd" + DONE; + } + emit_insn (gen_sub_f (l0, l1, l2)); +- emit_insn (gen_sbc (h0, h1, h2, gen_rtx_REG (CCmode, CC_REG))); ++ emit_insn (gen_sbc (h0, h1, h2)); + DONE; + ") + +@@ -3030,44 +3012,25 @@ archs4x, archs4xd" + (set_attr "type" "cc_arith") + (set_attr "length" "4")]) + +-; w/c/c comes first (rather than Rcw/0/C_0) to prevent the middle-end +-; needlessly prioritizing the matching constraint. +-; Rcw/0/C_0 comes before w/c/L so that the lower latency conditional execution +-; is used where possible. +-(define_insn_and_split "sbc" +- [(set (match_operand:SI 0 "dest_reg_operand" "=w,Rcw,w,Rcw,w") +- (minus:SI (minus:SI (match_operand:SI 1 "nonmemory_operand" +- "c,0,c,0,cCal") +- (ltu:SI (match_operand:CC_C 3 "cc_use_register") +- (const_int 0))) +- (match_operand:SI 2 "nonmemory_operand" "c,C_0,L,I,cCal")))] ++(define_insn "sbc" ++ [(set (match_operand:SI 0 "dest_reg_operand" "=r,r,r,r,r,r") ++ (minus:SI ++ (minus:SI ++ (match_operand:SI 1 "nonmemory_operand" "r, 0,r,0, r,Cal") ++ (ltu:SI (reg:CC_C CC_REG) (const_int 0))) ++ (match_operand:SI 2 "nonmemory_operand" "r,C_0,L,I,Cal,r")))] + "register_operand (operands[1], SImode) + || register_operand (operands[2], SImode)" + "@ +- sbc %0,%1,%2 +- sub.cs %0,%1,1 +- sbc %0,%1,%2 +- sbc %0,%1,%2 +- sbc %0,%1,%2" +- ; if we have a bad schedule after sched2, split. +- "reload_completed +- && !optimize_size && (!TARGET_ARC600_FAMILY) +- && arc_scheduling_not_expected () +- && arc_sets_cc_p (prev_nonnote_insn (insn)) +- /* If next comes a return or other insn that needs a delay slot, +- expect the adc to get into the delay slot. */ +- && next_nonnote_insn (insn) +- && !arc_need_delay (next_nonnote_insn (insn)) +- /* Restore operands before emitting. */ +- && (extract_insn_cached (insn), 1)" +- [(set (match_dup 0) (match_dup 4)) +- (cond_exec +- (ltu (reg:CC_C CC_REG) (const_int 0)) +- (set (match_dup 0) (plus:SI (match_dup 0) (const_int -1))))] +- "operands[4] = simplify_gen_binary (MINUS, SImode, operands[1], operands[2]);" ++ sbc\\t%0,%1,%2 ++ sub.cs\\t%0,%1,1 ++ sbc\\t%0,%1,%2 ++ sbc\\t%0,%1,%2 ++ sbc\\t%0,%1,%2 ++ sbc\\t%0,%1,%2" + [(set_attr "cond" "use") + (set_attr "type" "cc_arith") +- (set_attr "length" "4,4,4,4,8")]) ++ (set_attr "length" "4,4,4,4,8,8")]) + + (define_insn "sub_f" + [(set (reg:CC CC_REG)