Ignore:
Timestamp:
Nov 5, 2011, 12:32:19 PM (8 years ago)
Author:
ksherdy
Message:

Added mvmd srli slli builtins and strategies.

File:
1 edited

Legend:

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

    r1585 r1661  
    107107IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2);
    108108IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2);
     109IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2);
    109110IDISA_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);
    111111template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2);
    112112template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2);
     
    524524
    525525//The total number of operations is 1
     526IDISA_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
    526532IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2)
    527533{
    528534        return _mm_and_si128(arg1, arg2);
    529 }
    530 
    531 //The total number of operations is 1
    532 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2)
    533 {
    534         return _mm_xor_si128(arg1, arg2);
    535535}
    536536
     
    28252825template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1)
    28262826{
    2827         return simd128<128>::srli<(sh*4)>(arg1);
     2827        return mvmd128<(2)>::srli<(sh*2)>(arg1);
    28282828}
    28292829
     
    28432843template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1)
    28442844{
    2845         return simd128<128>::srli<(sh*32)>(arg1);
     2845        return mvmd128<(16)>::srli<(sh*2)>(arg1);
    28462846}
    28472847
     
    28552855template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1)
    28562856{
    2857         return simd128<128>::srli<(sh*128)>(arg1);
     2857        return mvmd128<(64)>::srli<(sh*2)>(arg1);
    28582858}
    28592859
     
    29512951template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1)
    29522952{
    2953         return simd128<128>::slli<(sh*4)>(arg1);
     2953        return mvmd128<(2)>::slli<(sh*2)>(arg1);
    29542954}
    29552955
     
    29632963template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1)
    29642964{
    2965         return simd128<128>::slli<(sh*16)>(arg1);
     2965        return mvmd128<(8)>::slli<(sh*2)>(arg1);
    29662966}
    29672967
     
    29752975template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1)
    29762976{
    2977         return simd128<128>::slli<(sh*64)>(arg1);
     2977        return mvmd128<(32)>::slli<(sh*2)>(arg1);
    29782978}
    29792979
Note: See TracChangeset for help on using the changeset viewer.