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

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/lib/idisa_cpp/idisa_ssse3.cpp
r1923 r1924 1001 1001 } 1002 1002 1003 //The total number of operations is 1 1.01003 //The total number of operations is 13.0 1004 1004 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sll(bitblock128_t arg1, bitblock128_t shift_mask) 1005 1005 { 1006 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)))); 1006 bitblock128_t shift = simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(127))); 1007 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)))); 1007 1008 } 1008 1009 … … 1389 1390 } 1390 1391 1391 //The total number of operations is 1 1.01392 //The total number of operations is 13.0 1392 1393 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srl(bitblock128_t arg1, bitblock128_t shift_mask) 1393 1394 { 1394 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)))); 1395 bitblock128_t shift = simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(127))); 1396 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)))); 1395 1397 } 1396 1398 … … 3004 3006 } 3005 3007 3006 //The total number of operations is 1 1.03008 //The total number of operations is 13.0 3007 3009 IDISA_ALWAYS_INLINE bitblock128_t bitblock128::sll(bitblock128_t arg1, bitblock128_t arg2) 3008 3010 { … … 3040 3042 } 3041 3043 3042 //The total number of operations is 1 1.03044 //The total number of operations is 13.0 3043 3045 IDISA_ALWAYS_INLINE bitblock128_t bitblock128::srl(bitblock128_t arg1, bitblock128_t arg2) 3044 3046 {
Note: See TracChangeset
for help on using the changeset viewer.