diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-21 15:27:17 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-21 15:27:17 +0000 |
commit | 54ec2a40e023563fc136d7084f397706bf8141de (patch) | |
tree | 6d7b09b2b0dc8ca480915577670151e718699420 | |
parent | e58f24c002703f9ad53d9f90a4e039b30b88100f (diff) | |
download | gcc-54ec2a40e023563fc136d7084f397706bf8141de.tar.gz |
2004-04-21 Andrew Pinski <pinskia@physics.uc.edu>
* config/rs6000/rs6000.c (symbol_ref_operand): Remove hack
for TARGET_MACHO.
(print_operand): For TARGET_MACHO check to see if we need a stub
and output one if we need it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80966 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 29 |
2 files changed, 17 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 998fe5459a9..3fc6309c5f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,9 @@ -2004-04-12 Andrew Pinski <pinskia@physics.uc.edu> +2004-04-21 Andrew Pinski <pinskia@physics.uc.edu> + + * config/rs6000/rs6000.c (symbol_ref_operand): Remove hack + for TARGET_MACHO. + (print_operand): For TARGET_MACHO check to see if we need a stub + and output one if we need it. PR debug/15033 * dwarf2out.c (rtl_for_decl_location): Check for NULL diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5384c79c2d4..c9a5558396e 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2315,23 +2315,6 @@ symbol_ref_operand (rtx op, enum machine_mode mode) if (mode != VOIDmode && GET_MODE (op) != mode) return 0; -#if TARGET_MACHO - if (GET_CODE (op) == SYMBOL_REF && TARGET_MACHO && MACHOPIC_INDIRECT) - { - /* Macho says it has to go through a stub or be local - when indirect mode. Stubs are considered local. */ - const char *t = XSTR (op, 0); - /* "&" means that it is it a local defined symbol - so it is okay to call to. */ - if (t[0] == '&') - return true; - - /* "!T" means that the function is local defined. */ - return (t[0] == '!' && t[1] == 'T'); - } -#endif - - return (GET_CODE (op) == SYMBOL_REF && (DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op))); } @@ -9507,7 +9490,17 @@ print_operand (FILE *file, rtx x, int code) break; } } - if (TARGET_AIX) + /* For macho, we need to check it see if we need a stub. */ + if (TARGET_MACHO) + { + const char *name = XSTR (x, 0); +#ifdef TARGET_MACHO + if (machopic_classify_name (name) == MACHOPIC_UNDEFINED_FUNCTION) + name = machopic_stub_name (name); +#endif + assemble_name (file, name); + } + else if (TARGET_AIX) RS6000_OUTPUT_BASENAME (file, XSTR (x, 0)); else assemble_name (file, XSTR (x, 0)); |