cur_cpu_spec is a pointer

Alan Modra amodra at bigpond.net.au
Tue Apr 13 12:34:43 EST 2004


On Mon, Apr 12, 2004 at 10:41:46AM -0400, David Edelsohn wrote:
>
> >>>>> Anton Blanchard writes:
>
> Anton> A question for Alan, why cant we put variables directly in the TOC? I
> Anton> admit it will become a right pain once you get multiple TOCs.
>
> 	One definitely can store data directly in the TOC.  GCC does this
> for floating-point constants, but does not know how to do this for normal
> variables nor on a variable-by-variable basis.  If one always accesses the
> data through assembly language, this will not be a problem.  The PPC64 ABI
> specifically provides examples of accessing data directly stored in the
> TOC.

Adding a GCC capability to store vars directly in the TOC would likely
be limited to static vars because of the problem Anton identified.  (And
-mminimal-toc probably should limit to function scope static vars).

--
Alan Modra
IBM OzLabs - Linux Technology Centre

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list