Merge remote-tracking branch 'up/main' into main-riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-02-01 16:21:10 +02:00
commit 41859538e5
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
20 changed files with 112 additions and 152 deletions

2
.gitignore vendored
View File

@ -86,3 +86,5 @@
/gcc-13.0.0-20230112.tar.xz
/gcc-13.0.0-20230115.tar.xz
/gcc-13.0.1-20230117.tar.xz
/gcc-13.0.1-20230127.tar.xz
/newlib-cygwin-9e09d6ed83cce4777a5950412647ccc603040409.tar.xz

View File

@ -1,12 +1,12 @@
%global DATE 20230117
%global gitrev fedc064ac31b465edcfd22884b94bbdd05312224
%global DATE 20230127
%global gitrev 4faac89a6b542c0d94019eeadc333ef789f37c9d
%global gcc_version 13.0.1
%global gcc_major 13
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 0
%global nvptx_tools_gitrev 472b6e78b3ba918d727698f79911360b7c808247
%global newlib_cygwin_gitrev a8526cb52bedabd4d6ba4b227a5185627f871aa1
%global newlib_cygwin_gitrev 9e09d6ed83cce4777a5950412647ccc603040409
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
# Hardening slows the compiler way too much.
@ -136,7 +136,7 @@
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
Release: %{gcc_release}.1.3.riscv64%{?dist}
Release: %{gcc_release}.2.0.riscv64%{?dist}
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
# GCC Runtime Exception.
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
@ -286,8 +286,7 @@ Patch8: gcc13-no-add-needed.patch
Patch9: gcc13-Wno-format-security.patch
Patch10: gcc13-rh1574936.patch
Patch11: gcc13-d-shared-libphobos.patch
Patch12: gcc13-pr107678.patch
Patch13: gcc13-pr108411.patch
Patch12: gcc13-pr106746-revert.patch
Patch50: isl-rh2155127.patch
@ -862,8 +861,7 @@ so that there cannot be any synchronization problems.
%patch10 -p0 -b .rh1574936~
%endif
%patch11 -p0 -b .d-shared-libphobos~
%patch12 -p0 -b .pr107678~
%patch13 -p0 -b .pr108411~
%patch12 -p0 -b .pr106746-revert~
%patch50 -p0 -b .rh2155127~
touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4
@ -3470,11 +3468,35 @@ end
%endif
%changelog
* Wed Jan 18 2023 David Abdurachmanov <davidlt@rivosinc.com> 13.0.1-0.1.0.riscv64
* Wed Feb 01 2023 David Abdurachmanov <davidlt@rivosinc.com> 13.0.1-0.2.0.riscv64
- Update config.{sub,guess} scripts for ISL
- Fix annobin plugin Fedora version check
- Package riscv_vector.h (vector intrinsics) header
* Sat Jan 28 2023 Jakub Jelinek <jakub@redhat.com> 13.0.1-0.2
- update from trunk
- PRs analyzer/108455, analyzer/108507, analyzer/108524, bootstrap/90543,
c++/53288, c++/53932, c++/105300, c++/107267, c++/107303, c++/107329,
c++/107797, c++/108195, c++/108437, c++/108474, c++/108496,
c++/108503, c++/108504, c++/108525, c++/108526, c/108424,
fortran/102331, fortran/102595, fortran/108420, fortran/108434,
fortran/108501, fortran/108502, fortran/108528, fortran/108529,
fortran/108544, fortran/108558, ipa/106061, ipa/107944,
libstdc++/102301, libstdc++/108530, libstdc++/108554,
libstdc++/108568, lto/108445, middle-end/108086, middle-end/108459,
middle-end/108543, modula2/102343, modula2/108144, modula2/108182,
modula2/108405, modula2/108480, modula2/108553, modula2/108555,
other/108560, target/107568, target/107678, target/107731,
target/108177, target/108348, target/108396, target/108411,
target/108436, target/108442, target/108505, testsuite/104756,
testsuite/107808, testsuite/108533, tree-optimization/96373,
tree-optimization/108306, tree-optimization/108440,
tree-optimization/108447, tree-optimization/108449,
tree-optimization/108457, tree-optimization/108482,
tree-optimization/108498, tree-optimization/108500,
tree-optimization/108522, tree-optimization/108523,
tree-optimization/108540, tree-optimization/108547
* Tue Jan 17 2023 Jakub Jelinek <jakub@redhat.com> 13.0.1-0.1
- update from trunk
- PRs c++/105593, fortran/108421, go/108426, ipa/106077, libstdc++/108288,

View File

@ -0,0 +1,63 @@
Revert:
[PR106746] drop cselib addr lookup in debug insn mem
The testcase used to get scheduled differently depending on the
presence of debug insns with MEMs. It's not clear to me why those
MEMs affected scheduling, but the cselib pre-canonicalization of the
MEM address is not used at all when analyzing debug insns, so the
memory allocation and lookup are pure waste. Somehow, avoiding that
waste fixes the problem, or makes it go latent.
2023-01-19 Alexandre Oliva <oliva@adacore.com>
PR debug/106746
* sched-deps.cc (sched_analyze_2): Skip cselib address lookup
within debug insns.
--- gcc/sched-deps.cc
+++ gcc/sched-deps.cc
@@ -2605,26 +2605,26 @@ sched_analyze_2 (class deps_desc *deps, rtx x, rtx_insn *insn)
case MEM:
{
- if (!DEBUG_INSN_P (insn))
- {
- /* Reading memory. */
- rtx_insn_list *u;
- rtx_insn_list *pending;
- rtx_expr_list *pending_mem;
- rtx t = x;
+ /* Reading memory. */
+ rtx_insn_list *u;
+ rtx_insn_list *pending;
+ rtx_expr_list *pending_mem;
+ rtx t = x;
- if (sched_deps_info->use_cselib)
- {
- machine_mode address_mode = get_address_mode (t);
-
- t = shallow_copy_rtx (t);
- cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1,
- GET_MODE (t), insn);
- XEXP (t, 0)
- = cselib_subst_to_values_from_insn (XEXP (t, 0), GET_MODE (t),
- insn);
- }
+ if (sched_deps_info->use_cselib)
+ {
+ machine_mode address_mode = get_address_mode (t);
+
+ t = shallow_copy_rtx (t);
+ cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1,
+ GET_MODE (t), insn);
+ XEXP (t, 0)
+ = cselib_subst_to_values_from_insn (XEXP (t, 0), GET_MODE (t),
+ insn);
+ }
+ if (!DEBUG_INSN_P (insn))
+ {
t = canon_rtx (t);
pending = deps->pending_read_insns;
pending_mem = deps->pending_read_mems;

View File

@ -1,113 +0,0 @@
A recent change only initializes the regs.how[] during Dwarf unwinding
which resulted in an uninitialized offset used in return address signing
and random failures during unwinding. The fix is to encode the return
address signing state in REG_UNSAVED and REG_UNDEFINED.
2023-01-10 Wilco Dijkstra <Wilco.Dijkstra@arm.com>
PR target/107678
* unwind-dw2.c (RA_SIGNED_BIT): Remove.
* unwind-dw2-execute_cfa.h: Use REG_UNSAVED/UNDEFINED
to encode return address signing state.
* config/aarch64/aarch64-unwind.h (aarch64_demangle_return_addr)
Check current return address signing state.
(aarch64_frob_update_contex): Remove.
--- libgcc/config/aarch64/aarch64-unwind.h
+++ libgcc/config/aarch64/aarch64-unwind.h
@@ -29,8 +29,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define MD_DEMANGLE_RETURN_ADDR(context, fs, addr) \
aarch64_demangle_return_addr (context, fs, addr)
-#define MD_FROB_UPDATE_CONTEXT(context, fs) \
- aarch64_frob_update_context (context, fs)
static inline int
aarch64_cie_signed_with_b_key (struct _Unwind_Context *context)
@@ -55,42 +53,27 @@ aarch64_cie_signed_with_b_key (struct _Unwind_Context *context)
static inline void *
aarch64_demangle_return_addr (struct _Unwind_Context *context,
- _Unwind_FrameState *fs ATTRIBUTE_UNUSED,
+ _Unwind_FrameState *fs,
_Unwind_Word addr_word)
{
void *addr = (void *)addr_word;
- if (context->flags & RA_SIGNED_BIT)
+ const int reg = DWARF_REGNUM_AARCH64_RA_STATE;
+
+ if (fs->regs.how[reg] == REG_UNSAVED)
+ return addr;
+
+ /* Return-address signing state is toggled by DW_CFA_GNU_window_save (where
+ REG_UNDEFINED means enabled), or set by a DW_CFA_expression. */
+ if (fs->regs.how[reg] == REG_UNDEFINED
+ || (_Unwind_GetGR (context, reg) & 0x1) != 0)
{
_Unwind_Word salt = (_Unwind_Word) context->cfa;
if (aarch64_cie_signed_with_b_key (context) != 0)
return __builtin_aarch64_autib1716 (addr, salt);
return __builtin_aarch64_autia1716 (addr, salt);
}
- else
- return addr;
-}
-
-/* Do AArch64 private initialization on CONTEXT based on frame info FS. Mark
- CONTEXT as return address signed if bit 0 of DWARF_REGNUM_AARCH64_RA_STATE is
- set. */
-
-static inline void
-aarch64_frob_update_context (struct _Unwind_Context *context,
- _Unwind_FrameState *fs)
-{
- const int reg = DWARF_REGNUM_AARCH64_RA_STATE;
- int ra_signed;
- if (fs->regs.how[reg] == REG_UNSAVED)
- ra_signed = fs->regs.reg[reg].loc.offset & 0x1;
- else
- ra_signed = _Unwind_GetGR (context, reg) & 0x1;
- if (ra_signed)
- /* The flag is used for re-authenticating EH handler's address. */
- context->flags |= RA_SIGNED_BIT;
- else
- context->flags &= ~RA_SIGNED_BIT;
- return;
+ return addr;
}
#endif /* defined AARCH64_UNWIND_H && defined __ILP32__ */
--- libgcc/unwind-dw2.c
+++ libgcc/unwind-dw2.c
@@ -137,9 +137,6 @@ struct _Unwind_Context
#define SIGNAL_FRAME_BIT ((~(_Unwind_Word) 0 >> 1) + 1)
/* Context which has version/args_size/by_value fields. */
#define EXTENDED_CONTEXT_BIT ((~(_Unwind_Word) 0 >> 2) + 1)
- /* Bit reserved on AArch64, return address has been signed with A or B
- key. */
-#define RA_SIGNED_BIT ((~(_Unwind_Word) 0 >> 3) + 1)
_Unwind_Word flags;
/* 0 for now, can be increased when further fields are added to
struct _Unwind_Context. */
--- libgcc/unwind-dw2-execute_cfa.h 2023-01-02 17:53:56.003021412 +0100
+++ libgcc/unwind-dw2-execute_cfa.h 2023-01-12 19:52:05.456327742 +0100
@@ -278,10 +278,15 @@
case DW_CFA_GNU_window_save:
#if defined (__aarch64__) && !defined (__ILP32__)
/* This CFA is multiplexed with Sparc. On AArch64 it's used to toggle
- return address signing status. */
+ return address signing status. The REG_UNDEFINED/UNSAVED states
+ mean RA signing is enabled/disabled. */
reg = DWARF_REGNUM_AARCH64_RA_STATE;
- gcc_assert (fs->regs.how[reg] == REG_UNSAVED);
- fs->regs.reg[reg].loc.offset ^= 1;
+ gcc_assert (fs->regs.how[reg] == REG_UNSAVED
+ || fs->regs.how[reg] == REG_UNDEFINED);
+ if (fs->regs.how[reg] == REG_UNSAVED)
+ fs->regs.how[reg] = REG_UNDEFINED;
+ else
+ fs->regs.how[reg] = REG_UNSAVED;
#else
/* ??? Hardcoded for SPARC register window configuration. */
if (__LIBGCC_DWARF_FRAME_REGISTERS__ >= 32)

View File

@ -1,14 +0,0 @@
PR108411 workaround
--- gcc/config/aarch64/aarch64.cc 2023-01-15 13:20:00.569241815 +0100
+++ gcc/config/aarch64/aarch64.cc 2023-01-15 13:30:05.061513817 +0100
@@ -7707,8 +7707,7 @@ aarch64_layout_arg (cumulative_args_t pc
unsigned int alignment
= aarch64_function_arg_alignment (mode, type, &abi_break,
&abi_break_packed);
- gcc_assert (alignment <= 16 * BITS_PER_UNIT
- && (!alignment || abi_break < alignment)
+ gcc_assert ((!alignment || abi_break < alignment)
&& (!abi_break_packed || alignment < abi_break_packed));
pcum->aapcs_arg_processed = true;

View File

@ -1,4 +1,4 @@
SHA512 (gcc-13.0.1-20230117.tar.xz) = 22bc806162976c843cfeb43d24bb33e7961fedb402ec2c5e3ca2d02b9058825a1b37258b2dd9cfe14de02e5a4a00b2cf32c1e97375fc04265d6215de6a25d611
SHA512 (gcc-13.0.1-20230127.tar.xz) = 437494fad0d688d8c81d1bc6827bb139894fc74af4ca2d2a71dc7332304a988c4a358af38ffc15ab7c19fd5172398d00d6447301f560517d03a5367967694906
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
SHA512 (newlib-cygwin-a8526cb52bedabd4d6ba4b227a5185627f871aa1.tar.xz) = b099246fe4a5d0a372cdaee5da49083df5b2f4440a4e83961600cdf22d37da50c99ce9ae46b769f188a67034ee038cf863260988fc9d594e8e5fb3905a381dec
SHA512 (newlib-cygwin-9e09d6ed83cce4777a5950412647ccc603040409.tar.xz) = bef3fa04f7b1a915fc1356ebed114698b5cc835e9fa04b0becff05a9efc76c59fb376482990873d222d7acdcfee3c4f30f5a4cb7f3be1f291f1fa5f1c7a9d983
SHA512 (nvptx-tools-472b6e78b3ba918d727698f79911360b7c808247.tar.xz) = 91690321bf96460c3b3e229199a6f752ed1c27c6933d4345dc7e237dc068f604ad211bb3a0373e14d4f332bee05b6227d6933e14e0b475ffdfea8b511ab735e6

View File

@ -4,7 +4,7 @@ description: |
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Regression/394271-gcc-optimization-error-for-neg-number-abs
framework: beakerlib
require:

View File

@ -7,7 +7,7 @@ description: |
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
framework: beakerlib
require:
- gcc

View File

@ -15,7 +15,7 @@ description: |+
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Regression/465974-DW_TAG_common_block-has-incorrect-placement-scope
framework: beakerlib
require:

View File

@ -11,7 +11,7 @@ description: |
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Regression/515799-RHEL5-gcc-if-more-than-one-fno-builtin
framework: beakerlib
require:

View File

@ -10,7 +10,7 @@ description: |
contact: Vaclav Kadlcik <vkadlcik@redhat.com>
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
framework: beakerlib
require:
- gcc

View File

@ -5,7 +5,7 @@ description: |
contact: Vaclav Kadlcik <vkadlcik@redhat.com>
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
framework: beakerlib
require:
- gcc-c++

View File

@ -4,7 +4,7 @@ contact: mcermak@redhat.com
component:
- gcc
- systemtap
test: ./runtest.sh
test: bash ./runtest.sh
framework: beakerlib
require:
- gcc

View File

@ -4,7 +4,7 @@ description: ''
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Regression/bz703059-g-fails-to-compile-a-program-that-has-a-template
framework: beakerlib
require:

View File

@ -3,7 +3,7 @@ summary: Check to see if g++ throws unused parameter warnings with standard libr
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Regression/unused_parameter_warning
framework: beakerlib
require:

View File

@ -3,7 +3,7 @@ description: ''
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Sanity/compile-rpm
framework: beakerlib
require:

View File

@ -14,7 +14,7 @@ contact: Michael Petlan <mpetlan@redhat.com>
component:
- gcc
- gcc-libraries
test: ./runtest.sh
test: bash ./runtest.sh
framework: beakerlib
require:
- gcc

View File

@ -3,7 +3,7 @@ description: ''
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Sanity/rebuild-binutils
framework: beakerlib
require:

View File

@ -4,7 +4,7 @@ summary: Rebuild glibc
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Sanity/rebuild-glibc
framework: beakerlib
require:

View File

@ -3,7 +3,7 @@ description: ''
contact: mcermak@redhat.com
component:
- gcc
test: ./runtest.sh
test: bash ./runtest.sh
path: /tests/Sanity/test-m32-m64-options
framework: beakerlib
require: