mmix: When debug-dump, revert to "standard" pseudos for emitting integers
authorHans-Peter Nilsson <hp@bitrange.com>
Mon, 20 Jul 2020 01:17:04 +0000 (03:17 +0200)
committerHans-Peter Nilsson <hp@bitrange.com>
Mon, 20 Jul 2020 01:17:04 +0000 (03:17 +0200)
commitdd64a7fd274b148c6a1ba2772f8f981625412928
tree68a5491bd4feb5795d120ff1ab119985b68371a3
parent5154dab3da6401c6d7a875fd0a4a6ba9d25835d5
mmix: When debug-dump, revert to "standard" pseudos for emitting integers

The sole purpose of not providing pseudos and forcing use of
TARGET_ASM_INTEGER is to arrange for assembly output that people can,
instead of using gas, usefullt feed to mmixal (Knuth's assembler).  It
uses pseudos with slightly different semantics (BYTE, WYDE, TETRA,
OCTA).  Nice when it works, but that only happens for limited
use-cases and debug-information is excluded.

The dwarf2out.c shortcuts, looking up the pseudo-strings and doing the
output on its own, has the result that in absence of such
integer-emitting pseudos, the target TARGET_ASM_INTEGER hook is
called, which by definition outputs a newline, and then the
dwarf2out.c code redundantly adds another.  That uglifies output and
breaks the expectations of the dwarf2 parts of the test-suite.

The wart by which an extra newline is emitted is ripe for a cleanup,
and I started out thinking I'd add a default argument for emitting a
newline to the assemble_integer family of functions, but then
reconsidered.  I also can't bring myself to use different pseudos
with/without -g so instead I check for options for the more detailed
dumps, as used by the test-suite to get those DW_* strings in detailed
assembly output.

This eliminates all FAILs in the dwarf2-specific parts of the gcc
test-suite for mmix-knuth-mmixware, with no regressions.  Committed.

gcc:
* config/mmix/mmix.c (mmix_option_override): Reinstate default
integer-emitting targetm.asm_out pseudos when dumping detailed
assembly-code.
(mmix_assemble_integer): Update comment.
gcc/config/mmix/mmix.c