* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Don't
insert a label at the end of an function under Mach-O.
From-SVN: r69809
-2003-07-25 Geoffrey Keating <geoffk@apple.com>
+2003-07-26 Geoffrey Keating <geoffk@apple.com>
+
+ * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Don't
+ insert a label at the end of an function under Mach-O.
* c-decl.c (c_static_assembler_name): Remove TREE_STATIC test.
}
}
+#if TARGET_OBJECT_FORMAT == OBJECT_MACHO
+ /* Mach-O doesn't support labels at the end of objects, so if
+ it looks like we might want one, insert a NOP. */
+ {
+ rtx insn = get_last_insn ();
+ while (insn
+ && NOTE_P (insn)
+ && NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED_LABEL)
+ insn = PREV_INSN (insn);
+ if (insn
+ && (LABEL_P (insn)
+ || (NOTE_P (insn)
+ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL)))
+ fputs ("\tnop\n", file);
+ }
+#endif
+
/* Output a traceback table here. See /usr/include/sys/debug.h for info
on its format.