diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-03-22 15:04:27 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-03-22 07:04:27 -0800 |
commit | aa6d25c99d99aef40d7df9e2157c8ec82fe39e96 (patch) | |
tree | 8c30d1f6b382123562ef4301fe86834c0168de41 /gcc | |
parent | 24105bab8c2cf186720770b33176f0880136fa68 (diff) | |
download | gcc-aa6d25c99d99aef40d7df9e2157c8ec82fe39e96.zip gcc-aa6d25c99d99aef40d7df9e2157c8ec82fe39e96.tar.gz gcc-aa6d25c99d99aef40d7df9e2157c8ec82fe39e96.tar.bz2 |
rs6000.c (symbol_ref_operand): Reject symbols who are not local for Darwin PIC.
2004-03-22 Andrew Pinski <pinskia@physics.uc.edu>
* config/rs6000/rs6000.c (symbol_ref_operand): Reject symbols
who are not local for Darwin PIC.
From-SVN: r79830
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ede0742..d374850 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-03-22 Andrew Pinski <pinskia@physics.uc.edu> + + * config/rs6000/rs6000.c (symbol_ref_operand): Reject symbols + who are not local for Darwin PIC. + 2004-03-22 Ulrich Weigand <uweigand@de.ibm.com> * regrename.c (regrename_optimize): Set regs_ever_live for all diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e046aa4..8fa0ae6 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -2260,6 +2260,23 @@ 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))); } |