diff options
author | Asher Langton <langton2@llnl.gov> | 2006-06-29 21:49:19 +0000 |
---|---|---|
committer | Asher Langton <langton@gcc.gnu.org> | 2006-06-29 21:49:19 +0000 |
commit | f8c2645c2d21a86b81a2480e3ab18b8cea2bceee (patch) | |
tree | 80e64b3209e9edf29029ebf8843efcfbffa0c1e5 | |
parent | 6cbd871cb0dfadb1a91a68afefc7920674a81687 (diff) | |
download | gcc-f8c2645c2d21a86b81a2480e3ab18b8cea2bceee.zip gcc-f8c2645c2d21a86b81a2480e3ab18b8cea2bceee.tar.gz gcc-f8c2645c2d21a86b81a2480e3ab18b8cea2bceee.tar.bz2 |
i386.c (ix86_output_function_epilogue): Don't insert a label at the end of an function under Mach-O.
* config/i386/i386.c (ix86_output_function_epilogue): Don't
insert a label at the end of an function under Mach-O.
From-SVN: r115079
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdcc4b8..5a8cb4a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-06-29 Asher Langton <langton2@llnl.gov> + + PR target/25765 + * config/i386/i386.c (ix86_output_function_epilogue): Don't + insert a label at the end of an function under Mach-O. + 2006-06-29 Eric Christopher <echristo@apple.com> Evan Cheng <evan.cheng@apple.com> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index bce7991..6c8e1a7 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5700,6 +5700,23 @@ ix86_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED, { if (pic_offset_table_rtx) REGNO (pic_offset_table_rtx) = REAL_PIC_OFFSET_TABLE_REGNUM; +#if TARGET_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 + } /* Extract the parts of an RTL expression that is a valid memory address |