This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug soft-fp/15483] New: ppc-nofpu emulated fpu status and control should be thread-local


http://sourceware.org/bugzilla/show_bug.cgi?id=15483

             Bug #: 15483
           Summary: ppc-nofpu emulated fpu status and control should be
                    thread-local
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: soft-fp
        AssignedTo: unassigned@sourceware.org
        ReportedBy: aoliva@sourceware.org
                CC: joseph@codesourcery.com
    Classification: Unclassified
              Host: powerpc-nofpu


ports/sysdeps/powerpc/nofpu/sim-full.c, ports/sysdeps/powerpc/nofpu/soft-supp.h
and ports/sysdeps/powerpc/soft-fp/sfp-machine.h declare and/or define variables
__sim_exceptions, __sim_disabled_exceptions and __sim_round_mode, that should
all have been thread-local and private to libc.  However, they're shared by all
threads (their introduction precedes TLS support), and exported as part of the
ABI in ports/sysdeps/powerpc/nofpu/Versions (probably a mistake).

Making them thread-local would break the ABI too hard (changing symbols from
non-TLS to TLS is a no-no); since these variables were never meant to be
accessed directly anyway, removing them from the exported list would be a
better option, and even one we could get away with.

A non-ABI-breaking solution for this problem is to introduce alternate
thread-local variables, use them to read the fpu state, and set both the
thread-local variable and the global variable when modifying them.  If there
are any old multi-threaded binaries that still refer directly to the old
symbols (rather than using the published interfaces), they'd likely experience
problems even with this arrangement.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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