This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: List of CPU architecture-specific macros?
- From: Liu Hao <lh_mouse at 126 dot com>
- To: noloader at gmail dot com
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Mon, 13 Feb 2017 10:13:34 +0800
- Subject: Re: List of CPU architecture-specific macros?
- Authentication-results: sourceware.org; auth=none
- References: <3220ae09-ade1-b0bd-976c-bb4c8aeb10c3@126.com> <CAH8yC8nyG15UsQqikZUfnH9L=CeVLK=tLBPKmOUznMmFJaMrbQ@mail.gmail.com>
On 2017/2/13 9:59, Jeffrey Walton wrote:
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 know a few of them and am wondering whether they are subject to change
in future releases.
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.
Good to know. Thank you.
--
Best regards,
LH_Mouse