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]

[Patch, updated] Fix PR44132/PR43602 - was Re: [patch] fix PR43602 for emutls targets.



On 11 May 2010, at 15:13, Diego Novillo wrote:


<snip old patch>

The patch looks OK otherwise. TLS is not my area, though. Jakub, could
you double check?

Jakub commented in... http://gcc.gnu.org/ml/gcc-patches/2010-05/msg00826.html ... that (other than formatting and comment issues) he thought it OK.

I hope I've now addressed formatting/commenting correctly.

This should reduce test-suite noise and restore emutls functionality until we can finish moving the variable substitution to a more appropriate place.
Discussion of the latter will carry on on PR44132 thread (I'm making progress, but slowly).
This current patch would be part of the overall solution anyway, I believe.


Minor additions to the PR4306 version (other than commenting)

1/ Setting DECL_PRESERVE_P to work around PR44132 (that addition agreed in the PR thread, but requires all of this patch to clear the PR).
copy DECL_RESTRICTED_P (for FORTRAN). The init template is read- only - it doesn't need to be marked as thread-local.


2/ guarding the emutls finalization, such that it is only carried out in emutls_finish () if it has not been done earlier.

tested on i686-apple-darwin9 and x86_86-apple-darwin10.

Iain


gcc/Changelog:


PR target/44132
PR middle-end/43602
* varasm.c (get_emutls_init_templ_addr): Copy DECL_VISIBILITY_SPECIFIED,
DECL_PRESERVE_P.
(emutls_decl): Copy DECL_VISIBILITY_SPECIFIED, DECL_RESTRICTED_P,
and set DECL_PRESERVE_P.
(emutls_finalize_control_var): New callback.
(emutls_finish): Finalize emutls control variables.
* toplev.c (compile_file): Move the call to emutls_finish () before
varpool_assemble_pending_decls ().


Attachment: 159759-PR44132-43602-diff.txt
Description: Text document





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