public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47631] New: Support native TLS on Tru64 UNIX
@ 2011-02-07 12:54 ro at gcc dot gnu.org
  2012-03-09 16:12 ` [Bug target/47631] " ro at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: ro at gcc dot gnu.org @ 2011-02-07 12:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47631

           Summary: Support native TLS on Tru64 UNIX
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
                CC: rth@gcc.gnu.org
              Host: alpha-dec-osf5.1b
            Target: alpha-dec-osf5.1b
             Build: alpha-dec-osf5.1b


I've just noticed that Tru64 UNIX does have native support for TLS, obviously
already in V4.0.  The details are described in the Object File and Symbol Table
Format Specification:

http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/SUPPDOCS/OBJSPEC/TITLE.HTM

especially 

3.3.9        Thread Local Storage (TLS) Data
4.3.3.7      TLS Relocations
4.3.4.26     R_TLS_LITERAL
4.3.4.27     R_TLS_HIGH
4.3.4.28     R_TLS_LOW
8.3.5        Finding Thread Local Storage (TLS) Symbols
13.3.5       TLS Symbols

Compiling th example in 4.3.4.26

__declspec(thread) long foo;
main(){
foo = 2;
}

with cc -S, I get

        .set noat
        .set noreorder
        .tlscomm foo 8
        .rdata
$$1:
        .extern __tlsoffset 8
        .text
        .arch   generic
        .align 4
        .file 1 "osf-tls.c"
        .loc 1 2
 #      2 main(){
        .globl  main
        .ent    main
        .loc 1 2
main:
        .context full
        ldah    $gp, ($27)!gpdisp!1
        lda     $gp, ($gp)!gpdisp!1
        .frame  $sp, 0, $26
        .prologue 1
L$2:
        .loc 1 3
 #      3 foo = 2;
        call_pal 0x9E # rdunique                                               
  # 000003
        ldq     $0, 96($0)
        ldq     $28, __tlsoffset($gp)!tlsliteral!2
        addq    $0, $28, $0
        ldq     $0, ($0)
        mov     2, $3
        ldah    $0, foo($0)!tlshigh!3
        stq     $3, foo($0)!tlslow!3
        .loc 1 4
 #      4 }
        mov     $31, $0                                                        
  # 000004
        unop
        ret     ($26)
        .end    main
        .loc 1 2

A port will probably be somewhat different from an ELF port since there aren't
the 4 different access models.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/47631] Support native TLS on Tru64 UNIX
  2011-02-07 12:54 [Bug target/47631] New: Support native TLS on Tru64 UNIX ro at gcc dot gnu.org
@ 2012-03-09 16:12 ` ro at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: ro at gcc dot gnu.org @ 2012-03-09 16:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47631

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> 2012-03-09 16:11:41 UTC ---
Given that the Tru64 UNIX port is about to be removed in 4.8 and the TLS model
differs sufficiently from the ELF one, this won't be fixed anywhere.

  Rainer


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-09 16:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07 12:54 [Bug target/47631] New: Support native TLS on Tru64 UNIX ro at gcc dot gnu.org
2012-03-09 16:12 ` [Bug target/47631] " ro at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).