#56352 closed defect (duplicate)
as from cctools not recognizing tzcntl or lzcntl though my processor does
Reported by: | dubiousjim | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | jeremyhu (Jeremy Huddleston Sequoia) | |
Port: | cctools |
Description
As I explain at this StackOverflow post, if I compile this C function:
int function(unsigned u) { int r = __builtin_clz(u) + __builtin_ctz(u); return r; }
in clang or gcc using -march=native
, it will generate assembly containing the instructions lzcntl
and tzcntl
. Clang is fine to go ahead and assemble that into object code, and the result gives me the expected results. (My computer has a Haswell chip and has the BMI1 and LZCNT capabilities which include those two instructions.) However, the gcc build fails because the assembler it invokes, /opt/local/bin/as, reporting "Apple Inc version cctools-895, GNU assembler version 1.38", from the MacPorts port cctools @895_4+llvm50, doesn't know what to do with those instructions. It gives me "no such instruction" errors.
Change History (2)
comment:1 Changed 7 years ago by raimue (Rainer Müller)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 Changed 7 years ago by dubiousjim
Thanks, searched but didn't see that. So this problem has been around for 5 years!
Duplicate of #37846.