Go to file
Daniel Santos 173399a0b4 PR target/82002 Part 2: Correct non-immediate offset/invalid INSN
When we are realigning the stack pointer, making an ms_abi to sysv_abi
call and allocating 2GiB or more on the stack we end up with an invalid
INSN due to a non-immediate offset.  This occurs both with and without
-mcall-ms2sysv-xlogues.  Additionally, the stack allocation with
-mcall-ms2sysv-xlogues is ignoring (silently disabling) stack checking,
stack clash checking and probing.

This patch fixes these problems by:

1. No longer allocate stack space in ix86_emit_outlined_ms2sysv_save.
2. Rearrange where we emit SSE saves or stub call:
   a. Before frame allocation when offset from frame to save area is >= 2GiB.
   b. After frame allocation when frame is < 2GiB.  (Stack allocations
      prior to the stub call can't be combined with those afterwards, so
      this is better when possible.)
3. Modify choose_baseaddr to take an optional scratch_regno argument
   and never return rtx that cannot be used as an immediate.

gcc:
	config/i386/i386.c (choose_basereg): Use optional scratch
	register and add assertion.
	(x86_emit_outlined_ms2sysv_save): Use scratch register when
	needed, and don't allocate stack.
	(ix86_expand_prologue): Rearrange where SSE saves/stub call is
	emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
	(ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.

gcc/testsuite:
	gcc.target/i386/pr82002-2a.c: Change from xfail to fail.
	gcc.target/i386/pr82002-2b.c: Likewise.

From-SVN: r254412
2017-11-04 22:38:43 +00:00
config Add bootstrap-cet.mk to bootstrap GCC with Intel CET 2017-10-24 05:50:03 -07:00
contrib Handle libbacktrace in contrib/gcc_update 2017-10-02 13:56:50 +02:00
fixincludes fixinc.in (dirname): Change sed from 's|[^/]*/||' to 's|[^/]*//*||'. 2017-10-13 09:28:41 -06:00
gcc PR target/82002 Part 2: Correct non-immediate offset/invalid INSN 2017-11-04 22:38:43 +00:00
gnattools
gotools Makefile.am (check-go-tool): Output colon after ${fl}. 2017-10-25 22:00:50 +00:00
include Add INCLUDE_UNIQUE_PTR and use it (PR bootstrap/82610) 2017-10-23 20:25:58 +00:00
INSTALL
intl
libada
libatomic [arm] Fix architecture selection when building libatomic with automatic FPU selection 2017-10-20 12:33:39 +00:00
libbacktrace ztest.c (test_large): Pass unsigned long *, not size_t *, to zlib uncompress function. 2017-10-06 13:37:20 +00:00
libcc1 [C++ PATCH] overloaded operator fns [6/N] 2017-11-01 15:46:42 +00:00
libcilkrts
libcpp diagnostics: get rid of *_at_rich_loc in favor of overloading 2017-10-31 20:21:58 +00:00
libdecnumber
libffi Import from libffi master repository. 2017-10-03 14:26:31 -04:00
libgcc re PR libgcc/82635 (std::thread's join broken on FreeBSD with all GCCs >= 5) 2017-11-04 20:40:23 +01:00
libgfortran re PR libfortran/81938 (valgrind error message and heap-buffer-overflow on address sanitized libgfortran.so) 2017-10-27 17:50:22 +00:00
libgo debug/dwarf: support 64-bit DWARF in byte order check 2017-10-20 18:34:36 +00:00
libgomp Remove semicolon after do {} while (false) in HSA_LOG 2017-10-31 12:56:41 +00:00
libhsail-rt
libiberty re PR lto/82757 (r251560 causes: plugin needed to handle lto object) 2017-10-30 12:48:53 +00:00
libitm
libmpx
libobjc
liboffloadmic
libquadmath
libsanitizer re PR sanitizer/82595 (bootstrap fails in libsanitizer on powerpc64-unknown-linux-gnu) 2017-10-20 09:32:35 +02:00
libssp
libstdc++-v3 Define std::endian for C++2a (P0463R1) 2017-11-03 15:45:49 +00:00
libvtv
lto-plugin
maintainer-scripts update_version_svn: Ignore the GCC 5 branch. 2017-10-10 15:10:28 +02:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog Fix profiledbootstrap. 2017-10-27 13:13:05 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS (write after approval): Add myself. 2017-10-16 23:36:39 +02:00
Makefile.def
Makefile.in Fix profiledbootstrap. 2017-10-27 13:13:05 +00:00
Makefile.tpl Fix profiledbootstrap. 2017-10-27 13:13:05 +00:00
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.