From e7a4755f6a1e18a546e774d7082fa19ae96c95b7 Mon Sep 17 00:00:00 2001 From: xiaoji <345865759@163.com> Date: Wed, 24 Jul 2024 19:52:14 +0800 Subject: [PATCH 1/2] updated to 12.4.0 --- ...ch64-Fix-loose-ldpstp-check-PR111411.patch | 119 ------------------ gcc.spec | 10 +- 2 files changed, 6 insertions(+), 123 deletions(-) delete mode 100644 0001-aarch64-Fix-loose-ldpstp-check-PR111411.patch diff --git a/0001-aarch64-Fix-loose-ldpstp-check-PR111411.patch b/0001-aarch64-Fix-loose-ldpstp-check-PR111411.patch deleted file mode 100644 index 3df5b6f..0000000 --- a/0001-aarch64-Fix-loose-ldpstp-check-PR111411.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 74f99f1adc696f446115f36974a3f94f66294a53 Mon Sep 17 00:00:00 2001 -From: Richard Sandiford -Date: Wed, 20 Sep 2023 11:13:20 +0100 -Subject: [PATCH] aarch64: Fix loose ldpstp check [PR111411] - -aarch64_operands_ok_for_ldpstp contained the code: - - /* One of the memory accesses must be a mempair operand. - If it is not the first one, they need to be swapped by the - peephole. */ - if (!aarch64_mem_pair_operand (mem_1, GET_MODE (mem_1)) - && !aarch64_mem_pair_operand (mem_2, GET_MODE (mem_2))) - return false; - -But the requirement isn't just that one of the accesses must be a -valid mempair operand. It's that the lower access must be, since -that's the access that will be used for the instruction operand. - -gcc/ - PR target/111411 - * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp): Require - the lower memory access to a mem-pair operand. - -gcc/testsuite/ - PR target/111411 - * gcc.dg/rtl/aarch64/pr111411.c: New test. - -(cherry picked from commit 2d38f45bcca62ca0c7afef4b579f82c5c2a01610) ---- - gcc/config/aarch64/aarch64.cc | 8 ++- - gcc/testsuite/gcc.dg/rtl/aarch64/pr111411.c | 57 +++++++++++++++++++++ - 2 files changed, 60 insertions(+), 5 deletions(-) - create mode 100644 gcc/testsuite/gcc.dg/rtl/aarch64/pr111411.c - -diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc -index 96c3f48fdc4..a979accd90a 100644 ---- a/gcc/config/aarch64/aarch64.cc -+++ b/gcc/config/aarch64/aarch64.cc -@@ -26031,11 +26031,9 @@ aarch64_operands_ok_for_ldpstp (rtx *operands, bool load, - gcc_assert (known_eq (GET_MODE_SIZE (GET_MODE (mem_1)), - GET_MODE_SIZE (GET_MODE (mem_2)))); - -- /* One of the memory accesses must be a mempair operand. -- If it is not the first one, they need to be swapped by the -- peephole. */ -- if (!aarch64_mem_pair_operand (mem_1, GET_MODE (mem_1)) -- && !aarch64_mem_pair_operand (mem_2, GET_MODE (mem_2))) -+ /* The lower memory access must be a mem-pair operand. */ -+ rtx lower_mem = reversed ? mem_2 : mem_1; -+ if (!aarch64_mem_pair_operand (lower_mem, GET_MODE (lower_mem))) - return false; - - if (REG_P (reg_1) && FP_REGNUM_P (REGNO (reg_1))) -diff --git a/gcc/testsuite/gcc.dg/rtl/aarch64/pr111411.c b/gcc/testsuite/gcc.dg/rtl/aarch64/pr111411.c -new file mode 100644 -index 00000000000..ad07e9c6c89 ---- /dev/null -+++ b/gcc/testsuite/gcc.dg/rtl/aarch64/pr111411.c -@@ -0,0 +1,57 @@ -+/* { dg-do compile { target aarch64*-*-* } } */ -+/* { dg-require-effective-target lp64 } */ -+/* { dg-options "-O -fdisable-rtl-postreload -fpeephole2 -fno-schedule-fusion" } */ -+ -+extern int data[]; -+ -+void __RTL (startwith ("ira")) foo (void *ptr) -+{ -+ (function "foo" -+ (param "ptr" -+ (DECL_RTL (reg/v:DI <0> [ ptr ])) -+ (DECL_RTL_INCOMING (reg/v:DI x0 [ ptr ])) -+ ) ;; param "ptr" -+ (insn-chain -+ (block 2 -+ (edge-from entry (flags "FALLTHRU")) -+ (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK) -+ (insn 4 (set (reg:DI <0>) (reg:DI x0))) -+ (insn 5 (set (reg:DI <1>) -+ (plus:DI (reg:DI <0>) (const_int 768)))) -+ (insn 6 (set (mem:SI (plus:DI (reg:DI <0>) -+ (const_int 508)) [1 &data+508 S4 A4]) -+ (const_int 0))) -+ (insn 7 (set (mem:SI (plus:DI (reg:DI <1>) -+ (const_int -256)) [1 &data+512 S4 A4]) -+ (const_int 0))) -+ (edge-to exit (flags "FALLTHRU")) -+ ) ;; block 2 -+ ) ;; insn-chain -+ ) ;; function -+} -+ -+void __RTL (startwith ("ira")) bar (void *ptr) -+{ -+ (function "bar" -+ (param "ptr" -+ (DECL_RTL (reg/v:DI <0> [ ptr ])) -+ (DECL_RTL_INCOMING (reg/v:DI x0 [ ptr ])) -+ ) ;; param "ptr" -+ (insn-chain -+ (block 2 -+ (edge-from entry (flags "FALLTHRU")) -+ (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK) -+ (insn 4 (set (reg:DI <0>) (reg:DI x0))) -+ (insn 5 (set (reg:DI <1>) -+ (plus:DI (reg:DI <0>) (const_int 768)))) -+ (insn 6 (set (mem:SI (plus:DI (reg:DI <1>) -+ (const_int -256)) [1 &data+512 S4 A4]) -+ (const_int 0))) -+ (insn 7 (set (mem:SI (plus:DI (reg:DI <0>) -+ (const_int 508)) [1 &data+508 S4 A4]) -+ (const_int 0))) -+ (edge-to exit (flags "FALLTHRU")) -+ ) ;; block 2 -+ ) ;; insn-chain -+ ) ;; function -+} --- -2.37.3 - diff --git a/gcc.spec b/gcc.spec index 7a46813..f974b4c 100644 --- a/gcc.spec +++ b/gcc.spec @@ -1,6 +1,6 @@ -%global gcc_version 12.3.1.2 +%global gcc_version 12.4.0 %global gcc_major 12 -%global gcc_release 2 +%global gcc_release 1 %global isl_version 0.18 %global tgcc_summary Tencent Compiler %global _unpackaged_files_terminate_build 0 @@ -111,7 +111,6 @@ Source1: https://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2 #Patch0002: gcc12-fortran-flogical-as-integer.patch #Patch0003: gcc12-fortran-fdec-override-kind.patch #Patch0004: gcc12-fortran-fdec-non-logical-if.patch -Patch0001: 0001-aarch64-Fix-loose-ldpstp-check-PR111411.patch Patch3000: gcc12-hack.patch Patch3001: gcc12-libtool-no-rpath.patch @@ -834,7 +833,6 @@ for cross toolchains %prep %setup -q -n tgcc-%{version} -%patch 0001 -p1 %patch 3000 -p0 %patch 3001 -p0 %if %{build_isl} @@ -2398,6 +2396,10 @@ end %changelog +* Wed Jul 24 2024 Zhao Zhen - 12.4.0-1 +- Updated to upstream version 12.4.0 +- fixed a bug which will cause gnome desktop error on Loongarch64 + * Mon Jun 24 2024 Zhao Zhen - 12.3.1.2-2 - provides a new subpackage included patched source for cross toolchains -- Gitee From 4dad06709491251194a9067146ad5f6e5885ab3d Mon Sep 17 00:00:00 2001 From: xiaoji <345865759@163.com> Date: Wed, 24 Jul 2024 19:53:36 +0800 Subject: [PATCH 2/2] small fix --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 8f9b1a0..e0b7a39 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (tgcc-12.3.1.2.tar.gz) = 200c68a7b39eef3d621ea9ebab6051755627709a1cac4cb995b6d731f537831d89c670404c8e355a9f6be12bd70f58a7479e9944a6d3e12a4b582735aa45721b +SHA512 (tgcc-12.4.0.tar.gz) = ea987bb3e757f823cc0821e51146e8f32f6e8a3bd63b78ddc1a02764600322a9dcf637114e72d7ede3d4637ab388895bc5bf02c0554978d6d06a620ae4bfa6bf SHA512 (isl-0.18.tar.bz2) = 85d0b40f4dbf14cb99d17aa07048cdcab2dc3eb527d2fbb1e84c41b2de5f351025370e57448b63b2b8a8cf8a0843a089c3263f9baee1542d5c2e1cb37ed39d94 -- Gitee