[llvmlinux] [PATCH] x86/hweight: LLVMLinux: Fix __arch_hweight{32, 64}() for compilation with clang

Jan-Simon Moeller dl9pf at gmx.de
Sun Sep 13 16:50:34 UTC 2015


Hi,


Am Sonntag, 13. September 2015, 17:20:24 schrieb Sedat Dilek:
> Adapted partly from the original patch (see [1]).
> This patch was formerly together with [2] and provided as a single 
patch.
> 
> To quote [3]:
> "interesting, Jan-Simon said that patch was still part of the llvmlinux
> tree (it is really mandatory for clang) so i'm not sure what's going 
on."

Read the code, Luke.
We still patch it, but in the Makefile: see [1]

[1] 
http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=arch/x86_64/patches/hweight-x86.patch;h=959ec0711e84b195632f63a2f0ddd0c31f3c14d7;hb=HEAD


> See also [3] for an explanation of PaX Team on how to do a proper fix.
What might manifest is an issue with the asm ALTERNATIVE.
This is _already_ filed as

https://llvm.org/bugs/show_bug.cgi?id=24487

Please comment there and help to get it fixed.


Nack on the patch as it won't go upstream like this in the linux kernel.

Best,
JS


More information about the LLVMLinux mailing list