How to use MSVC intrinsics to get the equivalent of this GCC code?

后端 未结 5 1155
甜味超标
甜味超标 2020-11-29 06:46

The following code calls the builtin functions for clz/ctz in GCC and, on other systems, has C versions. Obviously, the C versions are a bit suboptimal if the system has a

5条回答
  •  时光说笑
    2020-11-29 07:24

    If MSVC has a compiler intrinsic for this, it'll be here:

    Compiler Intrinsics on MSDN

    Otherwise, you'll have to write it using __asm

提交回复
热议问题