[MacPorts] #56352: as from cctools not recognizing tzcntl or lzcntl though my processor does

MacPorts noreply at macports.org
Wed Apr 25 00:52:55 UTC 2018


#56352: as from cctools not recognizing tzcntl or lzcntl though my processor does
------------------------+---------------------
 Reporter:  dubiousjim  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:
 Keywords:              |       Port:  cctools
------------------------+---------------------
 As I explain at [https://stackoverflow.com/questions/49981445 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/56352>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list