diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c index 68f7ec3ab88..66e3d585a0a 100644 --- a/gcc/config/mmix/mmix.c +++ b/gcc/config/mmix/mmix.c @@ -318,6 +318,32 @@ mmix_option_override (void) (flag_pic > 1) ? "PIC" : "pic"); flag_pic = 0; } + + /* Don't bother with mmixal-compatible syntax if it's likely that a + certain format of the assembly is expected, like no new-line + after the .byte (or BYTE) parameter, when scanning debug-info + output, as happens in many places in the gcc testsuite. The + dwarf2 output code (maybe others) takes a shortcut based on the + presence of certain assembler directives, instead of calling + assemble_integer. Not worthwhile editing the test-cases: + mixed-syntax assembly output already looks too ugly for the + intent of being readable, and the resulting mix certainly fails + the intent of being compatible with mmixal. See + varasm.c:default_file_start for this triple. See also + mmix_assemble_integer. */ + if (flag_verbose_asm || flag_debug_asm || flag_dump_rtl_in_asm) + { + /* "Reinstate" the defaults from target-def.h that we + overrode. */ + targetm.asm_out.byte_op = "\t.byte\t"; + targetm.asm_out.aligned_op.hi = "\t.short\t"; + targetm.asm_out.aligned_op.si = "\t.long\t"; + + /* Note that TARGET_ASM_ALIGNED_DI_OP is default NULL, so + there's nothing to "reinstate". Still, we add the universal + default (with "recent" gas) for an address. */ + targetm.asm_out.aligned_op.di = "\t.dc.a\t"; + } } /* INIT_EXPANDERS. */ @@ -1379,10 +1405,11 @@ mmix_assemble_integer (rtx x, unsigned int size, int aligned_p) that's ok, because we can punt to generic functions. We then pretend that aligned data isn't needed, so the usual . syntax is used (which works for aligned data too). We actually - *must* do that, since we say we don't have simple aligned - pseudos, causing this function to be called. We just try and - keep as much compatibility as possible with mmixal syntax for - normal cases (i.e. without GNU extensions and C only). */ + *must* do that, since we (usually) say we don't have simple aligned + pseudos, causing this function to be called. See + mmix_option_override for an exception. We just try and keep as + much compatibility as possible with mmixal syntax for normal + cases (i.e. without GNU extensions and C only). */ case 1: if (GET_CODE (x) != CONST_INT) {