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 PR optimization/8366 (Sparc)


> I do not confirm.  These are two different got entries.

Ok.

> However, with "/usr/ccs/bin/ld z.o -lc" (ie. no startup files),
> I get an executable (though it won't run).  With a combination
> of nm and objdump I see:
>
> 0000000100100868 B a
>
> Contents of section .got:
>  100630 00000001 00100728 00000001 00100868  .......(.......h
>  100640 00000001 0010086c                    .......l
>
> Note that got+0x8 contains "a" and got+0x10 contains "a+4".

Yes, I see that too on the Solaris 9 box:

.got:
      00 00 00 01 00 10 0c 68 00 00 00 01 00 10 0e 80 00 00 00 01 00 10 0e 84


In other words, there is a mismatch as to what indexed addressing means with 
the PIC register:

GCC:   [%l7+a+4]  means 4 past the address containing the address of 'a'
Sun:    [%l7+a+4]  means the address containing 4 past the address of 'a'


So it would appear that we can't use the [pic_offset_table_rtx + CONST]
addressing mode?

-- 
Eric Botcazou


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