This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: The usage of _dl_hwcap and dl_hwcap_mask is confusing
On Tue, Jun 24, 2003 at 07:43:41PM -0700, Roland McGrath wrote:
> > The usage of _dl_hwcap and dl_hwcap_mask is very confusing to me. If
> > I understand right, dl_hwcap_mask is optional and each platform can
> > decide which features are important. Igoring it shouldn't cause the
> > correctness problem.
>
> That used to be the case.
>
> > sysdeps/i386/fpu/fe*.c checks dl_hwcap_mask
> > to decide if MXCSR should be used or not. Is that intentional?
>
> It seems to be the only thing to do. The bit must come from somewhere for
> it to behave correctly.
But dl_hwcap_mask is NOT set based on the hardware the binary is running
on. It is a compile-time constant. It can only be overridden via an env
variable. It seems to me that checking _dl_hwcap is more appropriate here.
Did I miss something?
H.J.