This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: X86 Built-in Functions


Ok, I partially solved this with:

#define	_mm_setzero_si128	__builtin_ia32_setzero128
#define	_mm_or_si128		__builtin_ia32_por128
#define	_mm_xor_si128		__builtin_ia32_pxor128
#define	_mm_and_si128		__builtin_ia32_pand128
#define	_mm_andnot_si128       	__builtin_ia32_pandn128
#define	_mm_srli_epi64		__builtin_ia32_psrlqi128
#define	_mm_slli_epi64		__builtin_ia32_psllqi128
#define	_mm_slli_si128		__builtin_ia32_pslldqi128
#define	_mm_srli_si128		__builtin_ia32_psrldqi128
#define	_mm_add_epi64		__builtin_ia32_paddq128
#define	_mm_sub_epi64		__builtin_ia32_psubq128

But I still haven't figured out the following:

_mm_cvtsi32_si128, _mm_cvtsi128_si32, _mm_set_epi32

Anyone?

> You can access the mmx/3dnow/sse instructions using built-in functions.
> These are documented (for gcc 3.3) in:
> 
> http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/X86-Built-in-Functions.html#X86%20Built-in%20Functions
> 
> However, the sse2 instructions are missing from the documentation, but it 
> seems that they are implemented by gcc 3.3... Any documentation anywhere?
> Or are these broken as they are not documented?
> 
> I'd need the equivalents for the following icc (intel cc) builtins:
> 
> _mm_add_epi64
> _mm_andnot_si128
> _mm_and_si128
> _mm_cvtsi128_si32
> _mm_cvtsi32_si128
> _mm_or_si128
> _mm_set_epi32
> _mm_setzero_si128
> _mm_slli_epi64
> _mm_slli_si128
> _mm_srli_epi64
> _mm_srli_si128
> _mm_sub_epi64
> _mm_xor_si128
> 
> What the built-ins in gcc, and what are the corresponding modes?
> 
> Thanks.
> 
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]