diff options
author | Geoffrey Keating <geoffk@apple.com> | 2003-07-26 07:34:21 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2003-07-26 07:34:21 +0000 |
commit | 0e5da0beef9a58af4db3edb962bfe3112d85ddbc (patch) | |
tree | 3aa8b05535b3a74da7ebaa96fcb7e04cdfbd3f9b /gcc | |
parent | 863d3dfb5ad7baa783d1de86f64f1bca7f82e188 (diff) | |
download | gcc-0e5da0beef9a58af4db3edb962bfe3112d85ddbc.zip gcc-0e5da0beef9a58af4db3edb962bfe3112d85ddbc.tar.gz gcc-0e5da0beef9a58af4db3edb962bfe3112d85ddbc.tar.bz2 |
rs6000.c (rs6000_output_function_epilogue): Don't insert a label at the end of an function under Mach-O.
* 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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 17 |
2 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fa369f4..23f7780 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,7 @@ -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. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 10a6a53..19a77fd 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -12116,6 +12116,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. |