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: TLS support for ARM


On Sat, Oct 08, 2005 at 07:48:45PM +0100, Richard Earnshaw wrote:
> I really think making the compiler do the right thing as automatically
> as possible is keeping things simple (for the user at any rate).  One of

I spent a lot of time working with the MIPS options.  They did a lot of
this kind of guessing, and it was an absolute nightmare, because it's so
hard to predict what a combination will do.

> the nasty things about using the compiler is that so many of the options
> cannot be used together without generating an error.  This can make
> Makefile maintenance a nightmare.  There's no real reason to error out
> here because we know what to do when we can't honour the users request
> and at worst that just produces slightly slower code.  So I think the
> logic should be:

Errors don't bother me: they're nice and clear.  You asked for
something, we couldn't do it.  Maybe the user is working in a custom
system where the use of __aeabi_read_tp is inappropriate for some
reason.  They asked the compiler not to do it, but we did anyway.

> 
> 	tls_model = soft;
> 	if (hard_tls_requested)
> 		if (CPU and instruction set support hard tls)
> 			tls_model = hard;
> 
> This is easy to understand, easy to document and not much harder to
> implement.

I think it's a bad idea.  I'll implement it if you want me to, of
course, but I'd at least like a warning in the
hard_tls_requested-but-not-using-it-anyway case.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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