Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Predefined macros for -msse2

21 views
Skip to first unread message

Kevin Brandon

unread,
Dec 13, 2009, 9:07:49 PM12/13/09
to
Hi,

I wonder whether GCC makes a predefined macro for -msse2. That is, if
I compile my binary with -msse2, I get __SSE__ defined on a Mac OS X
but I couldn't find a relevant, and documented, predefined macro for -
mssse2. I want do something equivalent to following:

#if defined(__SSE__)
#define HAS_SSE 1 // defined for -msse2 - but what about following?
#endif
#if defined(__SSE2__)
#define HAS_SSE2 1 // ???? __SSE2__ is not defined
#else
#error "This translation unit requires SSE2 compilation."
#endif

Equivalent code for Microsoft Visual C++ works fine, as it sets and
documents predefined macros. I grep entire gcc source code for these
but got no relevant results (except those in intrinsic headers - which
are out of my scope). Is this Apple specific or am I missing
something?

Regards,
Kevin

0 new messages