• Linus Torvalds's avatar
    x86: improve bitop code generation with clang · b9b60b31
    Linus Torvalds authored
    This uses the new ASM_INPUT_RM macro to avoid the bad code generation
    issue that clang has with more generic asm inputs.
    
    This ends up avoiding generating code like this:
    
     	mov    %r10,(%rsp)
     	tzcnt  (%rsp),%rcx
    
    which now becomes just
    
     	tzcnt  %r10,%rcx
    
    and in the process ends up also removing a few unnecessary stack frames
    when the only use was that pointless "asm uses memory location off stack".
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    b9b60b31
bitops.h 11.1 KB