Thread (3 messages) flat view 3 messages, 3 authors, 2017-10-12

Re: [v2] powerpc/lib/sstep: Fix count leading zeros instructions

From: Michael Ellerman <hidden>
Date: 2017-10-12 00:20:12

On Tue, 2017-10-10 at 06:45:30 UTC, Sandipan Das wrote:
According to the GCC documentation, the behaviour of __builtin_clz()
and __builtin_clzl() is undefined if the value of the input argument
is zero. Without handling this special case, these builtins have been
used for emulating the following instructions:
  * Count Leading Zeros Word (cntlzw[.])
  * Count Leading Zeros Doubleword (cntlzd[.])

This fixes the emulated behaviour of these instructions by adding an
additional check for this special case.

Fixes: 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify *regs")
Signed-off-by: Sandipan Das <redacted>
Reviewed-by: Naveen N. Rao <redacted>
Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/b0490a04e736356e427e227902b17f

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help