This is the mail archive of the 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

This looks OK.


Thanks, Andrew Pinski


    * 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)
+ {
+ {
+ /* 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);
+ return (t[0] == '&' && (t[1] == 'T' || t[1] == 'D'));
+ }
+ }
+ return true;
+ }
return (GET_CODE (op) == SYMBOL_REF


Andrew Pinski

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