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 libc/6411] PowerPC: Extend fpu fenv operations to operate on 64-bit FPSCR


------- Additional Comments From rsa at us dot ibm dot com  2008-08-19 16:15 -------
(In reply to comment #9)
> You miss the point.  We have to get back to having only one DSO.  We'll have
> some technologies to handle widely diverging functions but for cases like this,
> which are trivial to resolve, we should switch dynamically.

Point taken.  Since there is no public interface to the auxv hwcap information
I'll have to take the following steps in order to provide the dynamic feature
check to a macro that is available to userspace applications.

1.) Export a boolean symbol for runtime querying of the FPSCR feature
availability, e.g. something like __ppc_feature_dfp_available.

2.) In __libc_start_main search the auxv hwcap for the specific feature, i.e.
PPC_FEATURE_HAS_DFP, and set the symbol __ppc_feature_dfp_available.

3.) In fpu_control.h __[SG]ET_FPUCW access the boolean symbol for feature
checks.  This way applications which #include fpu_control.h and use said macros
are able gather the feature availability.

The other methods for gathering the hwcap information from userspace
applications are expensive at best (map and query /proc/self/auxv) and
unreliable at worst (read off the end of the ENV variable array or have access
to the applications argument variables).

Implication: Publish feature availability permanently, i.e. ABI addition.

Benefit: The expense of the feature check is mitigated to application startup.

Alternative: Use the above mentioned method but rather than exporting the symbol
allow the userspace application to access an 'attribute_hidden' symbol if that
is possible.

Ulrich what direction do you prefer?  Have I missed another alternative?

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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