diff options
Diffstat (limited to 'contrib/gcc/config/rs6000/rs6000.c')
-rw-r--r-- | contrib/gcc/config/rs6000/rs6000.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/gcc/config/rs6000/rs6000.c b/contrib/gcc/config/rs6000/rs6000.c index 591f77d..3c17f21 100644 --- a/contrib/gcc/config/rs6000/rs6000.c +++ b/contrib/gcc/config/rs6000/rs6000.c @@ -11110,6 +11110,23 @@ rs6000_output_function_epilogue (file, size) } } +#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. |