Collin Funk

Results 26 comments of Collin Funk

> Sorry to see this happening. No worries at all. :) > Yes after that PR, all non-EVP API will not use `cpuid` to determine supported instructions. I had the...

It is undefined behavior invoke a function that was casted from a non-function pointer type. In practice, it is perfectly fine. The correct behavior is required to implement dlsym [1]:...

I think some ARM and RISC-V extensions have popcount instructions too. Maybe it would be better to use __builtin_popcountll [1]? It would help other architectures assuming their compiler supports it....

Where did you see that `__builtin_cpu_supports` is required? I was under the impression that GCC would use the optimal method for the specific target, regardless if it supports a popcnt...

> what if we compile with popcnt instruction using gcc, but execute it on another cpu that doesn't support popcnt? i found a similar issue: [simdjson/simdjson#34](https://github.com/simdjson/simdjson/issues/34) This seems like an...

> yes, but this is all at compile phase, not runtime. `__has_builtin` is only used to check whether the compiler supports `__builtin_popcount`, and has nothing to do with the popcnt...