Changeset 1661 for trunk/lib/idisa_cpp/idisa_sse4_2.cpp
 Timestamp:
 Nov 5, 2011, 12:32:19 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/idisa_cpp/idisa_sse4_2.cpp
r1585 r1661 107 107 IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2); 108 108 IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2); 109 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2); 109 110 IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2); 110 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2);111 111 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2); 112 112 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2); … … 524 524 525 525 //The total number of operations is 1 526 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2) 527 { 528 return _mm_xor_si128(arg1, arg2); 529 } 530 531 //The total number of operations is 1 526 532 IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2) 527 533 { 528 534 return _mm_and_si128(arg1, arg2); 529 }530 531 //The total number of operations is 1532 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2)533 {534 return _mm_xor_si128(arg1, arg2);535 535 } 536 536 … … 2804 2804 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1) 2805 2805 { 2806 return simd128<128>::srli<(sh*4)>(arg1);2806 return mvmd128<(2)>::srli<(sh*2)>(arg1); 2807 2807 } 2808 2808 … … 2822 2822 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1) 2823 2823 { 2824 return simd128<128>::srli<(sh*32)>(arg1);2824 return mvmd128<(16)>::srli<(sh*2)>(arg1); 2825 2825 } 2826 2826 … … 2834 2834 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1) 2835 2835 { 2836 return simd128<128>::srli<(sh*128)>(arg1);2836 return mvmd128<(64)>::srli<(sh*2)>(arg1); 2837 2837 } 2838 2838 … … 2930 2930 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1) 2931 2931 { 2932 return simd128<128>::slli<(sh*4)>(arg1);2932 return mvmd128<(2)>::slli<(sh*2)>(arg1); 2933 2933 } 2934 2934 … … 2942 2942 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1) 2943 2943 { 2944 return simd128<128>::slli<(sh*16)>(arg1);2944 return mvmd128<(8)>::slli<(sh*2)>(arg1); 2945 2945 } 2946 2946 … … 2954 2954 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1) 2955 2955 { 2956 return simd128<128>::slli<(sh*64)>(arg1);2956 return mvmd128<(32)>::slli<(sh*2)>(arg1); 2957 2957 } 2958 2958
Note: See TracChangeset
for help on using the changeset viewer.