PATCH: break MIPS16 TLS

Sandra Loosemore sandra@codesourcery.com
Wed Sep 5 01:05:00 GMT 2007


OK -- the attached revised patch seems to DTRT now.  I'm still in the 
midst of retesting this with my complete set of patches related to 
mips16 function attributes (including i686 bootstrap as well as MIPS 
tests both with and without -mflip-mips16).  This is the only piece that 
hasn't been approved yet; is it OK to commit if the tests look good?

-Sandra


2007-09-04  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/mips/mips.c (mips_legitimize_tls_address): Call sorry
	if we encounter TLS address in MIPS16 mode.
	(mips_legitimize_const_move):  Check cannot_force_const_mem for
	the (const (plus symbol offset)) case; this forces invalid TLS
	address in MIPS16 mode to be caught by the above call to sorry.
	(override_options): Don't reset targetm.have_tls in MIPS16 mode,
	because that now enables emutls, which is not ABI compatible
	with native TLS in non-MIPS16 mode.

	gcc/testsuite/
	* lib/target-supports.exp (check_effective_tls_supported): New.
	* gcc.dg/tls/tls.exp: Skip all TLS tests if TLS not supported.
	* gcc.target/mips/pr26765.c: Skip if TLS not supported.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 36b-break-mips16-tls.patch
Type: text/x-patch
Size: 4950 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070905/40c21a8d/attachment.bin>


More information about the Gcc-patches mailing list