The preprocessor symbol __MMX__ indicates whether this gcc 
includes mmx support.  This is extremely useful, but undocumented.
I only found out by finding the symbol in other peoples' code.

The particular symbol __MMX__ should be documented in 
the obvious place, namely where the -mmmx flag is documented
in the x86-specific page.

And of course, similarly for other such predefined flags.
I assume there's one for sse, but I haven't actually tried to find out.

Here's a shell transcript, again compiling my favorite
source file, /dev/null:

([EMAIL PROTECTED]) ~ $ gcc -mmmx -E -dD -x c /dev/null | sort > /tmp/t1
([EMAIL PROTECTED]) ~ $ gcc -mno-mmx -E -dD -x c /dev/null | sort > /tmp/t2
([EMAIL PROTECTED]) ~ $ diff /tmp/t[12]
92d91
< #define __MMX__ 1


-- 
           Summary: Please document predefined sub-architecture support
                    macros
           Product: gcc
           Version: 4.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: martinrb at google dot com
  GCC host triplet: x86_64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37550

Reply via email to