svn commit: r280279 - head/sys/sys
John Baldwin
jhb at freebsd.org
Mon Mar 30 20:44:36 UTC 2015
On Monday, March 30, 2015 08:24:34 PM Konstantin Belousov wrote:
> > That is not what Bruce said. He suggested using bitcount64() for the fallback
> > if the cpuid check fails. He did not say to remove the runtime check to use
> > popcnt if it is available:
> >
> > "Always using [bitcount64] would lose the micro-optimization... [to] keep
> > [it], it seems best to keep the inline asm but replace popcnt_pc_map_elem(elem)
> > by [bitcount64(elem)]."
> Ok, thank you for the clarification.
>
> I updated the pmap patch, see the end of the message.
I think the pmap change looks fine. If we know which compilers include a
workaround we might also consider specifying "-mno-popcount" for everything
except known-ok compilers in at least kern.mk.
> > This looks fine to me. It seems to be manually converting certain symbols
> > to use a dynamic lookup that must be explicitly resolved before first
> > use?
> I am not sure what do you mean by dynamic lookup, but possibly it
> was mentioned. I can emulate the ifuncs more sincerely, by requiring
> a resolver function, which is called on the first real function
> invocation. I did not see it as very useful, but it is definitely
> doable.
I just mean that the effect at runtime is similar to that of dynamic
symbols once they are resolved (a call into a PLT entry (or is it GOT?
I keep getting those confused) that does a jump to the resolved symbol).
--
John Baldwin
More information about the svn-src-head
mailing list