------- Comment #1 from pinskia at gmail dot com 2008-09-17 03:12 ------- Subject: Re: New: Please document predefined sub-architecture support macros
Sent from my iPhone On Sep 16, 2008, at 7:35 PM, "martinrb at google dot com" <[EMAIL PROTECTED] > wrote: > 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. Some targets actually define this based some specifications of the target. Spu and -mcpu=cell on powerpc define __SPU__/__PPU__ as specified by the C/C++ language extension for the cbea document. I bet x86 has this specified in their documentation rather than in GCC's documentation. > > > 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 > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37550