Ignore:
Timestamp:
Feb 11, 2012, 5:04:23 PM (7 years ago)
Author:
cameron
Message:

Update simd<128>::srl/sll

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/idisa_cpp/idisa_ssse3.cpp

    r1923 r1924  
    10011001}
    10021002
    1003 //The total number of operations is 11.0
     1003//The total number of operations is 13.0
    10041004template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sll(bitblock128_t arg1, bitblock128_t shift_mask)
    10051005{
    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))));
    10071008}
    10081009
     
    13891390}
    13901391
    1391 //The total number of operations is 11.0
     1392//The total number of operations is 13.0
    13921393template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srl(bitblock128_t arg1, bitblock128_t shift_mask)
    13931394{
    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))));
    13951397}
    13961398
     
    30043006}
    30053007
    3006 //The total number of operations is 11.0
     3008//The total number of operations is 13.0
    30073009IDISA_ALWAYS_INLINE bitblock128_t bitblock128::sll(bitblock128_t arg1, bitblock128_t arg2)
    30083010{
     
    30403042}
    30413043
    3042 //The total number of operations is 11.0
     3044//The total number of operations is 13.0
    30433045IDISA_ALWAYS_INLINE bitblock128_t bitblock128::srl(bitblock128_t arg1, bitblock128_t arg2)
    30443046{
Note: See TracChangeset for help on using the changeset viewer.