Commit: Add note merging to strip, and add merging of stack size notes

Florian Weimer fweimer@redhat.com
Sat Apr 15 14:44:00 GMT 2017


On 04/13/2017 03:50 PM, Nick Clifton wrote:
> +  /* FIXME: There must be a faster way to do this.  */
> +  while (val)
> +    {
> +      count ++;
> +      val >>= 8;
> +    }

__builtin_clz.  It's a single instruction on many targets, but its 
performance characteristics on modern x86-64 CPUs are a bit weird.  If 
the values are small (almost always just one bytes), it's unlikely to be 
a win over your loop.  And __builtin_clz is much worse on targets which 
do not have a dedicated instruction for this, or a building block for 
building it.

Florian



More information about the Binutils mailing list