Re: List of CPU architecture-specific macros?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 12, 2017 at 7:24 AM, Liu Hao <lh_mouse@xxxxxxx> wrote:
> Hello,
> Do we have a complete list of CPU architecture-specific macros (e.g.
> __SSE__, __FMA__ on x86)? The doc
> (https://gcc.gnu.org/onlinedocs/cpp/System-specific-Predefined-Macros.html)
> doesn't seem to mention it. Thanks.

For x86 machines, you often want to use 'gcc -march=native -dM -E
</dev/null | sort' (or similar). The '-march=native' is important to
get most of the defines for the native machine.

I can only say "most of the defines" because I know some of them are
omitted, like __MOVBE__, even when the processor supports it. To see
__MOVBE__ in the list, yo have to check /proc/cpuinfo and then add
-mmovbe if the cpu feature flag is set.

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux