ef22e9c725
This bug made me dive into some of the murkier waters of gcc, namely the source of operand 2 to the "call" pattern. It can be pretty poisonous, but is unused (either directly or later) by most targets. The target function_arg (and function_incoming_arg), can unless specially handled, cause a VOIDmode reg RTX to be generated, for the function arguments end-marker. This is then passed on by expand_call to the target "call" pattern, as operand[2] (which is wrongly documented or wrongly implemented, see comment in mmix.c) but unused by most targets that do not handle it specially, as in operand 2 not making it into the insn generated for the "call" (et al) patterns. Of course, the MMIX port stands out here: the RTX makes it into the generated RTX but is then actually unused and is just a placeholder; see mmix_print_operand 'p'. Anyway, df-scan inspects the emitted call rtx and horks on the void-mode RTX (actually: that it represents a zero-sized register range) from r12-1702. While I could replace or remove the emitted unused call insn operand, that would still leave unusable rtx to future users of function_arg actually looking for next_arg_reg. Better replace VOIDmode with DImode here; that's the "natural" mode of MMIX registers. (As a future improvement, I'll also remove the placeholder argument and replace the intended user; the print_operand output modifier 'p' modifier (as in "PUSHJ $%p2,%0") with some punctuation, perhaps '!' (as in "PUSHJ $%!,%0"). I inspected all ports, but other targets emit a special function_arg_info::end_marker cookie or just don't emit "call" operand[2] (etc) in the expanded "call" pattern. gcc: * config/mmix/mmix.c (mmix_function_arg_1): Avoid generating a VOIDmode register for e.g the function_arg_info::end_marker. |
||
---|---|---|
c++tools | ||
config | ||
contrib | ||
fixincludes | ||
gcc | ||
gnattools | ||
gotools | ||
include | ||
INSTALL | ||
intl | ||
libada | ||
libatomic | ||
libbacktrace | ||
libcc1 | ||
libcody | ||
libcpp | ||
libdecnumber | ||
libffi | ||
libgcc | ||
libgfortran | ||
libgo | ||
libgomp | ||
libiberty | ||
libitm | ||
libobjc | ||
liboffloadmic | ||
libphobos | ||
libquadmath | ||
libsanitizer | ||
libssp | ||
libstdc++-v3 | ||
libvtv | ||
lto-plugin | ||
maintainer-scripts | ||
zlib | ||
.dir-locals.el | ||
.gitattributes | ||
.gitignore | ||
ABOUT-NLS | ||
ar-lib | ||
ChangeLog | ||
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 | ||
Makefile.def | ||
Makefile.in | ||
Makefile.tpl | ||
missing | ||
mkdep | ||
mkinstalldirs | ||
move-if-change | ||
multilib.am | ||
README | ||
symlink-tree | ||
test-driver | ||
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.