X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fadt%2Fbitset_ia32.h;h=934a3a567f95d35db72e97f1e62677ff2b6f3a3b;hb=184602875611495e608c27263d0a5a8f24078a70;hp=09f120e418f7dab10f5a04471a50e82292694f96;hpb=e2020488798f2f1bfe636bc2cb2a388353e90fe6;p=libfirm diff --git a/ir/adt/bitset_ia32.h b/ir/adt/bitset_ia32.h index 09f120e41..934a3a567 100644 --- a/ir/adt/bitset_ia32.h +++ b/ir/adt/bitset_ia32.h @@ -1,4 +1,6 @@ +#ifndef _BITSET_IA32_H +#define _BITSET_IA32_H #undef _bitset_inside_clear #undef _bitset_inside_set @@ -99,18 +101,6 @@ static INLINE unsigned long *_bitset_sse_data_ptr(void *data, size_t bitset_base #define _bitset_inside_binop_or(tgt,src) _bitset_sse_inside_binop_or(tgt,src) #define _bitset_inside_binop_xor(tgt,src) _bitset_sse_inside_binop_xor(tgt,src) -/* and with zero sets everything to zero. */ -#define _bitset_inside_binop_with_zero_and(tgt) _bitset_sse_inside_binop_with_zero_and(tgt) - -/* And Not with 0 is the identity (its like and with 1) */ -#define _bitset_inside_binop_with_zero_andnot(tgt) - -/* Or with zero is also the identity */ -#define _bitset_inside_binop_with_zero_or(tgt) - -/* Xor with 0 is like negation, we have to do it. */ -#define _bitset_inside_binop_with_zero_xor(tgt) _bitset_sse_inside_binop_with_zero_xor(tgt) - #define _BITSET_SSE_BINOP(name) \ static INLINE void _bitset_sse_inside_binop_ ## name(unsigned long *tgt, unsigned long *src) \ { \ @@ -123,35 +113,10 @@ static INLINE void _bitset_sse_inside_binop_ ## name(unsigned long *tgt, unsigne static INLINE void _bitset_sse_inside_binop_with_zero_and(unsigned long *tgt) { -#ifdef _BITSET_SSE_USE_INLINE_ASM - asm("pxor %%xmm0,%%xmm0\n\t" - "movapd %%xmm0,%0" - : - : "m" (tgt) - : "xmm0", "memory"); -#else tgt[0] = 0; tgt[1] = 0; tgt[2] = 0; tgt[3] = 0; -#endif -} - -static INLINE void _bitset_sse_inside_binop_with_zero_xor(unsigned long *tgt) -{ -#ifdef _BITSET_SSE_USE_INLINE_ASM - asm("pxor %%xmm0,%%xmm0\n\t" - "pxor %0,%%xmm0\n\t" - "movapd %%xmm0,%0" - : - : "m" (tgt) - : "xmm0", "memory"); -#else - __m128i src_op = _mm_setzero_si128(); - __m128i tgt_op = _mm_load_si128((void *) tgt); - __m128i res = _mm_xor_si128(tgt_op, src_op); - _mm_store_si128((__m128i *) tgt, res); -#endif } static INLINE void _bitset_sse_inside_binop_andnot(unsigned long *tgt, unsigned long *src) @@ -168,3 +133,4 @@ _BITSET_SSE_BINOP(xor) #endif +#endif