Did you try to create your own replacement of '_mm_pause' intrinsic function in case of compiling
for Linux? I've just done a quick testand:
__asm__ ( "pause;" );
was easily compiled by a g++ compiler to:
Note: It is froman *.s file
PS1: I really don'tlikehow software developers ofGCC project implemented asupport for intrinsic
functions. I recently had a problem with '_mm_prefetch' on a Linux platform. Now another software
developer has issues with '_mm_pause'. There is a strange comment in'xmmintrin.h' header file:
/* Implemented from the specification included in the Intel C++ Compiler
User Guide and Reference, version 8.0. */
It would be nice to find that document and to investigate what Intel really recommends! Andin myGCC
installation'_mm_pause'is 'rep-nop-ed' as well:
static __inline void
__asm__ __volatile__ ("rep; nop" : : );
PS2: I could guess that an old version of GCC compiler couldn't compile 'pause'and a software
developer decided to use 'rep-nop' instructions instead. Later, everybody forgot about it.
Integration and portability problems existed, exist, and will exist as soon as developers are making new
features in existing software products. It getsworst when a compatibility with an older software product has
to be provided.
My recent "discovery" isin Visual Studio 98 ( some companies are still using it! ).For example, a
typedef union _RTALIGN16 tagRTm128i
could not be compiled by a Visual C++ 6.0 compiler from Visual Studio 98 because of _RTALIGN16 after
a key word 'union'.
A declaration without _RTALIGN16 like:
will be succesfullycompiled.
Another "little" problem isthat Visual Studio 98 doesn't have built-in types like m128, or m128i, etc, but
in some Microsoft's internal DLLs, I mean DLLs fromVisual Studio 98, these types are already used!
I've found another one. Pleasetake a look if interested:
and it is related to inline assembler used in GCC or MinGW C/C++ compilers and RDTSC instruction.