This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix the last known bootstrap problem on PPC Darwin (PRtarget/14580)


Andrew Pinski wrote:


On Mar 21, 2004, at 09:48, Andrew Pinski wrote:


This patch combined with the two other patches which I posted today
and yesterday, I am finally able to bootstrap (with java turned on)
on PowerPC Darwin again on the mainline.

Here is a patch which should workaround the problem. The correct fix is
have the back-end only determine when it the symbol needs to be a stub at the
last momement but that is not going to be done for a while so this just rejects
the references who is not local (stubs are considered local).


Note this is a slightly different patch which I posted in the bug as I figured
that I should also test for local data too. And I though I would fix the comment
too.


This looks OK.

Stan


Thanks, Andrew Pinski

ChangeLog:

    * config/rs6000/rs6000.c (symbol_ref_operand): Reject symbols
    who are not local.


I knew I would mess up even with testing, here is the patch which fixes the issue that Andreas found.


------------------------------------------------------------------------

Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.613
diff -u -p -r1.613 rs6000.c
--- rs6000.c	20 Mar 2004 02:56:52 -0000	1.613
+++ rs6000.c	21 Mar 2004 21:25:32 -0000
@@ -2260,6 +2260,23 @@ symbol_ref_operand (rtx op, enum machine
  if (mode != VOIDmode && GET_MODE (op) != mode)
    return 0;

+ if (GET_CODE (op) == SYMBOL_REF)
+ {
+ if (TARGET_MACHO)
+ {
+ /* Macho says it has to go through a stub or be local + when indirect mode. Stubs are considered local. */
+#if TARGET_MACHO
+ if (MACHOPIC_INDIRECT)
+ {
+ const char *t = XSTR (op, 0);
+ return (t[0] == '&' && (t[1] == 'T' || t[1] == 'D'));
+ }
+#endif
+ }
+ return true;
+ }
+
return (GET_CODE (op) == SYMBOL_REF
&& (DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)));
}



------------------------------------------------------------------------




Thanks,
Andrew Pinski



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]