This commit is contained in:
Jakub Jelinek 2020-10-05 10:44:00 +02:00
parent 888bd7b767
commit a7c26b2bf9
4 changed files with 16 additions and 95 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@
/gcc-10.2.1-20200804.tar.xz /gcc-10.2.1-20200804.tar.xz
/gcc-10.2.1-20200826.tar.xz /gcc-10.2.1-20200826.tar.xz
/gcc-10.2.1-20200916.tar.xz /gcc-10.2.1-20200916.tar.xz
/gcc-10.2.1-20201005.tar.xz

View File

@ -1,10 +1,10 @@
%global DATE 20200916 %global DATE 20201005
%global gitrev c65817433fde22de2a18a00be00c2c3d83228453 %global gitrev 2417bb617beaf81ca86c86977e1589ee77c59a99
%global gcc_version 10.2.1 %global gcc_version 10.2.1
%global gcc_major 10 %global gcc_major 10
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line. # %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 4 %global gcc_release 5
%global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e %global nvptx_tools_gitrev 5f6f343a302d620b0868edab376c00b15741e39e
%global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0 %global newlib_cygwin_gitrev 50e2a63b04bdd018484605fbb954fd1bd5147fa0
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
@ -272,7 +272,6 @@ Patch12: gcc10-pr96383.patch
Patch13: gcc10-pr96939.patch Patch13: gcc10-pr96939.patch
Patch14: gcc10-pr96939-2.patch Patch14: gcc10-pr96939-2.patch
Patch15: gcc10-pr96939-3.patch Patch15: gcc10-pr96939-3.patch
Patch16: gcc10-pr97032.patch
# On ARM EABI systems, we do want -gnueabi to be part of the # On ARM EABI systems, we do want -gnueabi to be part of the
# target triple. # target triple.
@ -788,7 +787,6 @@ to NVidia PTX capable devices if available.
%patch13 -p0 -b .pr96939~ %patch13 -p0 -b .pr96939~
%patch14 -p0 -b .pr96939-2~ %patch14 -p0 -b .pr96939-2~
%patch15 -p0 -b .pr96939-3~ %patch15 -p0 -b .pr96939-3~
%patch16 -p0 -b .pr97032~
find gcc/testsuite -name \*.pr96939~ | xargs rm -f find gcc/testsuite -name \*.pr96939~ | xargs rm -f
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
@ -3056,6 +3054,17 @@ end
%endif %endif
%changelog %changelog
* Mon Oct 5 2020 Jakub Jelinek <jakub@redhat.com> 10.2.1-5
- update from releases/gcc-10 branch
- PRs bootstrap/97163, bootstrap/97183, c++/96994, c++/97145, c++/97195,
fortran/93423, fortran/95614, fortran/96041, gcov-profile/64636,
gcov-profile/96913, gcov-profile/97069, gcov-profile/97193,
libstdc++/94160, libstdc++/94681, libstdc++/96803, libstdc++/97101,
libstdc++/97167, middle-end/95464, middle-end/97054, middle-end/97073,
preprocessor/96935, target/71233, target/96683, target/96795,
target/96827, target/97166, target/97184, target/97231, target/97247,
tree-optimization/96979, tree-optimization/97053
* Wed Sep 16 2020 Jakub Jelinek <jakub@redhat.com> 10.2.1-4 * Wed Sep 16 2020 Jakub Jelinek <jakub@redhat.com> 10.2.1-4
- update from releases/gcc-10 branch - update from releases/gcc-10 branch
- PRs bootstrap/96203, c++/95164, c++/96862, c++/96901, d/96157, d/96924, - PRs bootstrap/96203, c++/95164, c++/96862, c++/96901, d/96157, d/96924,

View File

@ -1,89 +0,0 @@
2020-09-14 H.J. Lu <hjl.tools@gmail.com>
PR target/97032
* cfgexpand.c (asm_clobber_reg_kind): Set sp_is_clobbered_by_asm
to true if the stack pointer is clobbered by asm statement.
* emit-rtl.h (rtl_data): Add sp_is_clobbered_by_asm.
* config/i386/i386.c (ix86_get_drap_rtx): Set need_drap to true
if the stack pointer is clobbered by asm statement.
* gcc.target/i386/pr97032.c: New test.
--- gcc/cfgexpand.c
+++ gcc/cfgexpand.c
@@ -2879,11 +2879,15 @@ asm_clobber_reg_is_valid (int regno, int nregs, const char *regname)
as it was before, so no asm can validly clobber the stack pointer in
the usual sense. Adding the stack pointer to the clobber list has
traditionally had some undocumented and somewhat obscure side-effects. */
- if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM)
- && warning (OPT_Wdeprecated, "listing the stack pointer register"
- " %qs in a clobber list is deprecated", regname))
- inform (input_location, "the value of the stack pointer after an %<asm%>"
- " statement must be the same as it was before the statement");
+ if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM))
+ {
+ crtl->sp_is_clobbered_by_asm = true;
+ if (warning (OPT_Wdeprecated, "listing the stack pointer register"
+ " %qs in a clobber list is deprecated", regname))
+ inform (input_location, "the value of the stack pointer after"
+ " an %<asm%> statement must be the same as it was before"
+ " the statement");
+ }
return is_valid;
}
--- gcc/config/i386/i386.c
+++ gcc/config/i386/i386.c
@@ -12283,10 +12283,12 @@ ix86_update_stack_boundary (void)
static rtx
ix86_get_drap_rtx (void)
{
- /* We must use DRAP if there are outgoing arguments on stack and
+ /* We must use DRAP if there are outgoing arguments on stack or
+ the stack pointer register is clobbered by asm statment and
ACCUMULATE_OUTGOING_ARGS is false. */
if (ix86_force_drap
- || (cfun->machine->outgoing_args_on_stack
+ || ((cfun->machine->outgoing_args_on_stack
+ || crtl->sp_is_clobbered_by_asm)
&& !ACCUMULATE_OUTGOING_ARGS))
crtl->need_drap = true;
--- gcc/emit-rtl.h
+++ gcc/emit-rtl.h
@@ -266,6 +266,9 @@ struct GTY(()) rtl_data {
pass_stack_ptr_mod has run. */
bool sp_is_unchanging;
+ /* True if the stack pointer is clobbered by asm statement. */
+ bool sp_is_clobbered_by_asm;
+
/* Nonzero if function being compiled doesn't contain any calls
(ignoring the prologue and epilogue). This is set prior to
register allocation in IRA and is valid for the remaining
--- gcc/testsuite/gcc.target/i386/pr97032.c
+++ gcc/testsuite/gcc.target/i386/pr97032.c
@@ -0,0 +1,23 @@
+/* { dg-do compile { target { ia32 && fstack_protector } } } */
+/* { dg-options "-O2 -mincoming-stack-boundary=2 -fstack-protector-all" } */
+
+#include <stdarg.h>
+
+extern int *__errno_location (void);
+
+long
+sys_socketcall (int op, ...)
+{
+ long int res;
+ va_list ap;
+ va_start (ap, op);
+ asm volatile ("push %%ebx; movl %2, %%ebx; int $0x80; pop %%ebx"
+ /* { dg-warning "listing the stack pointer register" "" { target *-*-* } .-1 } */
+ : "=a" (res) : "0" (102), "ri" (16), "c" (ap) : "memory", "esp");
+ if (__builtin_expect (res > 4294963200UL, 0))
+ *__errno_location () = -res;
+ va_end (ap);
+ return res;
+}
+
+/* { dg-final { scan-assembler "call\[ \t\]*_?__errno_location" } } */

View File

@ -1,3 +1,3 @@
SHA512 (gcc-10.2.1-20200916.tar.xz) = 1dd5ef9b6eb785e8356751b198462f61ed6a06b460285f4ddf274a85ed79a452723fd71b6bf5eb3c68821bf798299a1a352481e265e61bd836976927187879e5 SHA512 (gcc-10.2.1-20201005.tar.xz) = f330ba17ed2b3fb3d2eb0f4552055192605d4a762e11e0fdc0b11a29d1309cb36eae60e79863226a0bd51425bde312662272874482748480aad9732770f88f5a
SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c SHA512 (newlib-cygwin-50e2a63b04bdd018484605fbb954fd1bd5147fa0.tar.xz) = 002a48a7b689a81abbf16161bcaec001a842e67dfbe372e9e109092703bfc666675f16198f60ca429370e8850d564547dc505df81bc3aaca4ce6defbc014ad6c
SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7 SHA512 (nvptx-tools-5f6f343a302d620b0868edab376c00b15741e39e.tar.xz) = f6d10db94fa1570ae0f94df073fa3c73c8e5ee16d59070b53d94f7db0de8a031bc44d7f3f1852533da04b625ce758e022263855ed43cfc6867e0708d001e53c7