Changeset 1924 for trunk/lib/idisa_cpp/idisa_sse4_2.cpp
 Timestamp:
 Feb 11, 2012, 5:04:23 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/idisa_cpp/idisa_sse4_2.cpp
r1923 r1924 998 998 } 999 999 1000 //The total number of operations is 1 1.01000 //The total number of operations is 13.0 1001 1001 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sll(bitblock128_t arg1, bitblock128_t shift_mask) 1002 1002 { 1003 return simd_or(_mm_sll_epi64(arg1, shift_mask), simd_or(_mm_slli_si128(_mm_sll_epi64(arg1, simd128<32>::sub(shift_mask, _mm_cvtsi32_si128((int32_t)(64)))), (int32_t)(8)), _mm_slli_si128(_mm_srl_epi64(arg1, simd128<32>::sub(_mm_cvtsi32_si128((int32_t)(64)), shift_mask)), (int32_t)(8)))); 1003 bitblock128_t shift = simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(127))); 1004 return simd_or(_mm_sll_epi64(arg1, shift), simd_or(_mm_slli_si128(_mm_sll_epi64(arg1, simd128<32>::sub(shift, _mm_cvtsi32_si128((int32_t)(64)))), (int32_t)(8)), _mm_slli_si128(_mm_srl_epi64(arg1, simd128<32>::sub(_mm_cvtsi32_si128((int32_t)(64)), shift)), (int32_t)(8)))); 1004 1005 } 1005 1006 … … 1384 1385 } 1385 1386 1386 //The total number of operations is 1 1.01387 //The total number of operations is 13.0 1387 1388 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srl(bitblock128_t arg1, bitblock128_t shift_mask) 1388 1389 { 1389 return simd_or(_mm_srl_epi64(arg1, shift_mask), simd_or(_mm_srli_si128(_mm_srl_epi64(arg1, simd128<32>::sub(shift_mask, _mm_cvtsi32_si128((int32_t)(64)))), (int32_t)(8)), _mm_srli_si128(_mm_sll_epi64(arg1, simd128<32>::sub(_mm_cvtsi32_si128((int32_t)(64)), shift_mask)), (int32_t)(8)))); 1390 bitblock128_t shift = simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(127))); 1391 return simd_or(_mm_srl_epi64(arg1, shift), simd_or(_mm_srli_si128(_mm_srl_epi64(arg1, simd128<32>::sub(shift, _mm_cvtsi32_si128((int32_t)(64)))), (int32_t)(8)), _mm_srli_si128(_mm_sll_epi64(arg1, simd128<32>::sub(_mm_cvtsi32_si128((int32_t)(64)), shift)), (int32_t)(8)))); 1390 1392 } 1391 1393 … … 2989 2991 } 2990 2992 2991 //The total number of operations is 1 1.02993 //The total number of operations is 13.0 2992 2994 IDISA_ALWAYS_INLINE bitblock128_t bitblock128::sll(bitblock128_t arg1, bitblock128_t arg2) 2993 2995 { … … 3025 3027 } 3026 3028 3027 //The total number of operations is 1 1.03029 //The total number of operations is 13.0 3028 3030 IDISA_ALWAYS_INLINE bitblock128_t bitblock128::srl(bitblock128_t arg1, bitblock128_t arg2) 3029 3031 {
Note: See TracChangeset
for help on using the changeset viewer.