glibc/sysdeps/powerpc/bits
Gabriel F. T. Gomes 183a34dc4a powerpc: Remove uses of operand modifier (%s) in inline asm
The operand modifier %s on powerpc is an undocumented internal implementation
detail of GCC.  Besides that, the GCC community wants to remove it.  This patch
rewrites the expressions that use this modifier with logically equivalent
expressions that don't require it.

Explanation for the substitution:

The %s modifier takes an immediate operand and prints 32 less such immediate.
Thus, in the previous code, the expression resulted in:

  32 - __builtin_ffs(e)

where e was guaranteed to have exactly a single bit set, by the following
expressions:

  (e & (e-1) == 0) : e has at most one bit set.
  (e != 0)         : e is not zero, thus it has at least one bit set.

Since we guarantee that there is exactly only one bit set, the following
statement is true:

  32 - __builtin_ffs(e) == __builtin_clz(e)

Thus, we can replace __builtin_ffs with __builtin_clz and remove the %s operand
modifier.
2016-03-08 15:30:28 -03:00
..
endian.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fenv.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fenvinline.h powerpc: Remove uses of operand modifier (%s) in inline asm 2016-03-08 15:30:28 -03:00
hwcap.h powerpc: Add hwcap2 bits for POWER9. 2016-01-08 11:19:40 -02:00
link.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mathdef.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
mathinline.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setjmp.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00