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: [RFC] use symbol_ref flags for rs6000


On Thu, May 01, 2003 at 05:54:11PM -0400, David Edelsohn wrote:
> >>>>> Richard Henderson writes:
> 
> Richard> One problem with this:
> 
> Richard> User code of the form
> 
> Richard> static int thunk[5];
> Richard> ((void (*)(void))thunk) ();
> 
> Richard> that generates a call to the data section.  If the linker
> Richard> will handle this, fine, otherwise you need to return false
> Richard> so that the address gets loaded into a register.
> 
> 	This is similar to an example in ffitest.c, where one needs to
> hide the data object from the compiler.  The above example fails, but
> 
>         static int thunk[5];
>         int * pthunk = thunk;
>         asm ("" : "=g" (pthunk) : "0" (pthunk));

This line was added by me because of ppc64.
If ppc64 backend is fixed, it should be deleted again IMHO.

	Jakub


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