Changeset 1661
- Timestamp:
- Nov 5, 2011, 12:32:19 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/idisa_cpp/idisa_avx.cpp
r1584 r1661 101 101 IDISA_ALWAYS_INLINE bitblock256_t simd_andc(bitblock256_t arg1, bitblock256_t arg2); 102 102 IDISA_ALWAYS_INLINE bitblock256_t simd_or(bitblock256_t arg1, bitblock256_t arg2); 103 IDISA_ALWAYS_INLINE bitblock256_t simd_xor(bitblock256_t arg1, bitblock256_t arg2); 103 104 IDISA_ALWAYS_INLINE bitblock256_t simd_and(bitblock256_t arg1, bitblock256_t arg2); 104 IDISA_ALWAYS_INLINE bitblock256_t simd_xor(bitblock256_t arg1, bitblock256_t arg2);105 105 template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::max(bitblock256_t arg1, bitblock256_t arg2); 106 106 template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::max(bitblock256_t arg1, bitblock256_t arg2); … … 562 562 563 563 //The total number of operations is 1 564 IDISA_ALWAYS_INLINE bitblock256_t simd_xor(bitblock256_t arg1, bitblock256_t arg2) 565 { 566 return _mm256_xor_ps(arg1, arg2); 567 } 568 569 //The total number of operations is 1 564 570 IDISA_ALWAYS_INLINE bitblock256_t simd_and(bitblock256_t arg1, bitblock256_t arg2) 565 571 { 566 572 return _mm256_and_ps(arg1, arg2); 567 }568 569 //The total number of operations is 1570 IDISA_ALWAYS_INLINE bitblock256_t simd_xor(bitblock256_t arg1, bitblock256_t arg2)571 {572 return _mm256_xor_ps(arg1, arg2);573 573 } 574 574 … … 3097 3097 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::srli(bitblock256_t arg1) 3098 3098 { 3099 return simd256<256>::srli<(sh*4)>(arg1);3099 return mvmd256<(2)>::srli<(sh*2)>(arg1); 3100 3100 } 3101 3101 … … 3109 3109 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::srli(bitblock256_t arg1) 3110 3110 { 3111 return simd256<256>::srli<(sh*16)>(arg1);3111 return mvmd256<(8)>::srli<(sh*2)>(arg1); 3112 3112 } 3113 3113 … … 3127 3127 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::srli(bitblock256_t arg1) 3128 3128 { 3129 return simd256<256>::srli<(sh*128)>(arg1);3129 return mvmd256<(64)>::srli<(sh*2)>(arg1); 3130 3130 } 3131 3131 … … 3241 3241 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::slli(bitblock256_t arg1) 3242 3242 { 3243 return simd256<256>::slli<(sh*16)>(arg1);3243 return mvmd256<(8)>::slli<(sh*2)>(arg1); 3244 3244 } 3245 3245 … … 3259 3259 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::slli(bitblock256_t arg1) 3260 3260 { 3261 return simd256<256>::slli<(sh*128)>(arg1);3261 return mvmd256<(64)>::slli<(sh*2)>(arg1); 3262 3262 } 3263 3263 -
trunk/lib/idisa_cpp/idisa_sse2.cpp
r1585 r1661 106 106 IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2); 107 107 IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2); 108 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2); 108 109 IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2); 109 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2);110 110 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2); 111 111 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2); … … 519 519 520 520 //The total number of operations is 1 521 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2) 522 { 523 return _mm_xor_si128(arg1, arg2); 524 } 525 526 //The total number of operations is 1 521 527 IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2) 522 528 { 523 529 return _mm_and_si128(arg1, arg2); 524 }525 526 //The total number of operations is 1527 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2)528 {529 return _mm_xor_si128(arg1, arg2);530 530 } 531 531 … … 2547 2547 } 2548 2548 2549 //The total number of operations is 92549 //The total number of operations is 3 2550 2550 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dsrli(bitblock128_t arg1, bitblock128_t arg2) 2551 2551 { … … 2553 2553 } 2554 2554 2555 //The total number of operations is 92555 //The total number of operations is 3 2556 2556 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dsrli(bitblock128_t arg1, bitblock128_t arg2) 2557 2557 { … … 2559 2559 } 2560 2560 2561 //The total number of operations is 92561 //The total number of operations is 3 2562 2562 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dsrli(bitblock128_t arg1, bitblock128_t arg2) 2563 2563 { … … 2565 2565 } 2566 2566 2567 //The total number of operations is 92567 //The total number of operations is 3 2568 2568 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dsrli(bitblock128_t arg1, bitblock128_t arg2) 2569 2569 { … … 2571 2571 } 2572 2572 2573 //The total number of operations is 92573 //The total number of operations is 3 2574 2574 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dsrli(bitblock128_t arg1, bitblock128_t arg2) 2575 2575 { … … 2790 2790 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1) 2791 2791 { 2792 return simd128<128>::srli<(sh*4)>(arg1);2793 } 2794 2795 //The total number of operations is 42792 return mvmd128<(2)>::srli<(sh*2)>(arg1); 2793 } 2794 2795 //The total number of operations is 1 2796 2796 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::srli(bitblock128_t arg1) 2797 2797 { 2798 return simd128<128>::srli<(sh*8)>(arg1);2799 } 2800 2801 //The total number of operations is 42798 return _mm_srli_si128(arg1, (int32_t)(sh)); 2799 } 2800 2801 //The total number of operations is 1 2802 2802 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::srli(bitblock128_t arg1) 2803 2803 { 2804 return simd128<128>::srli<(sh*16)>(arg1);2805 } 2806 2807 //The total number of operations is 42804 return mvmd128<(8)>::srli<(sh*2)>(arg1); 2805 } 2806 2807 //The total number of operations is 1 2808 2808 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1) 2809 2809 { 2810 return simd128<128>::srli<(sh*32)>(arg1);2811 } 2812 2813 //The total number of operations is 42810 return mvmd128<(16)>::srli<(sh*2)>(arg1); 2811 } 2812 2813 //The total number of operations is 1 2814 2814 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::srli(bitblock128_t arg1) 2815 2815 { 2816 return simd128<128>::srli<(sh*64)>(arg1);2817 } 2818 2819 //The total number of operations is 42816 return mvmd128<(32)>::srli<(sh*2)>(arg1); 2817 } 2818 2819 //The total number of operations is 1 2820 2820 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1) 2821 2821 { 2822 return simd128<128>::srli<(sh*128)>(arg1);2822 return mvmd128<(64)>::srli<(sh*2)>(arg1); 2823 2823 } 2824 2824 … … 2877 2877 } 2878 2878 2879 //The total number of operations is 92879 //The total number of operations is 3 2880 2880 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dslli(bitblock128_t arg1, bitblock128_t arg2) 2881 2881 { … … 2883 2883 } 2884 2884 2885 //The total number of operations is 92885 //The total number of operations is 3 2886 2886 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dslli(bitblock128_t arg1, bitblock128_t arg2) 2887 2887 { … … 2889 2889 } 2890 2890 2891 //The total number of operations is 92891 //The total number of operations is 3 2892 2892 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dslli(bitblock128_t arg1, bitblock128_t arg2) 2893 2893 { … … 2895 2895 } 2896 2896 2897 //The total number of operations is 92897 //The total number of operations is 3 2898 2898 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dslli(bitblock128_t arg1, bitblock128_t arg2) 2899 2899 { … … 2901 2901 } 2902 2902 2903 //The total number of operations is 92903 //The total number of operations is 3 2904 2904 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dslli(bitblock128_t arg1, bitblock128_t arg2) 2905 2905 { … … 2916 2916 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1) 2917 2917 { 2918 return simd128<128>::slli<(sh*4)>(arg1);2919 } 2920 2921 //The total number of operations is 42918 return mvmd128<(2)>::slli<(sh*2)>(arg1); 2919 } 2920 2921 //The total number of operations is 1 2922 2922 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::slli(bitblock128_t arg1) 2923 2923 { 2924 return simd128<128>::slli<(sh*8)>(arg1);2925 } 2926 2927 //The total number of operations is 42924 return _mm_slli_si128(arg1, (int32_t)(sh)); 2925 } 2926 2927 //The total number of operations is 1 2928 2928 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1) 2929 2929 { 2930 return simd128<128>::slli<(sh*16)>(arg1);2931 } 2932 2933 //The total number of operations is 42930 return mvmd128<(8)>::slli<(sh*2)>(arg1); 2931 } 2932 2933 //The total number of operations is 1 2934 2934 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::slli(bitblock128_t arg1) 2935 2935 { 2936 return simd128<128>::slli<(sh*32)>(arg1);2937 } 2938 2939 //The total number of operations is 42936 return mvmd128<(16)>::slli<(sh*2)>(arg1); 2937 } 2938 2939 //The total number of operations is 1 2940 2940 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1) 2941 2941 { 2942 return simd128<128>::slli<(sh*64)>(arg1);2943 } 2944 2945 //The total number of operations is 42942 return mvmd128<(32)>::slli<(sh*2)>(arg1); 2943 } 2944 2945 //The total number of operations is 1 2946 2946 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::slli(bitblock128_t arg1) 2947 2947 { 2948 return simd128<128>::slli<(sh*128)>(arg1);2948 return mvmd128<(64)>::slli<(sh*2)>(arg1); 2949 2949 } 2950 2950 -
trunk/lib/idisa_cpp/idisa_sse3.cpp
r1585 r1661 106 106 IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2); 107 107 IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2); 108 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2); 108 109 IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2); 109 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2);110 110 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2); 111 111 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2); … … 519 519 520 520 //The total number of operations is 1 521 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2) 522 { 523 return _mm_xor_si128(arg1, arg2); 524 } 525 526 //The total number of operations is 1 521 527 IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2) 522 528 { 523 529 return _mm_and_si128(arg1, arg2); 524 }525 526 //The total number of operations is 1527 IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2)528 {529 return _mm_xor_si128(arg1, arg2);530 530 } 531 531 … … 2790 2790 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1) 2791 2791 { 2792 return simd128<128>::srli<(sh*4)>(arg1);2792 return mvmd128<(2)>::srli<(sh*2)>(arg1); 2793 2793 } 2794 2794 … … 2808 2808 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1) 2809 2809 { 2810 return simd128<128>::srli<(sh*32)>(arg1);2810 return mvmd128<(16)>::srli<(sh*2)>(arg1); 2811 2811 } 2812 2812 … … 2820 2820 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1) 2821 2821 { 2822 return simd128<128>::srli<(sh*128)>(arg1);2822 return mvmd128<(64)>::srli<(sh*2)>(arg1); 2823 2823 } 2824 2824 … … 2916 2916 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1) 2917 2917 { 2918 return simd128<128>::slli<(sh*4)>(arg1);2918 return mvmd128<(2)>::slli<(sh*2)>(arg1); 2919 2919 } 2920 2920 … … 2928 2928 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1) 2929 2929 { 2930 return simd128<128>::slli<(sh*16)>(arg1);2930 return mvmd128<(8)>::slli<(sh*2)>(arg1); 2931 2931 } 2932 2932 … … 2940 2940 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1) 2941 2941 { 2942 return simd128<128>::slli<(sh*64)>(arg1);2942 return mvmd128<(32)>::slli<(sh*2)>(arg1); 2943 2943 } 2944 2944 -
trunk/lib/idisa_cpp/idisa_sse4_1.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 … … 2822 2822 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1) 2823 2823 { 2824 return simd128<128>::srli<(sh*4)>(arg1);2824 return mvmd128<(2)>::srli<(sh*2)>(arg1); 2825 2825 } 2826 2826 … … 2840 2840 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1) 2841 2841 { 2842 return simd128<128>::srli<(sh*32)>(arg1);2842 return mvmd128<(16)>::srli<(sh*2)>(arg1); 2843 2843 } 2844 2844 … … 2852 2852 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1) 2853 2853 { 2854 return simd128<128>::srli<(sh*128)>(arg1);2854 return mvmd128<(64)>::srli<(sh*2)>(arg1); 2855 2855 } 2856 2856 … … 2948 2948 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1) 2949 2949 { 2950 return simd128<128>::slli<(sh*4)>(arg1);2950 return mvmd128<(2)>::slli<(sh*2)>(arg1); 2951 2951 } 2952 2952 … … 2960 2960 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1) 2961 2961 { 2962 return simd128<128>::slli<(sh*16)>(arg1);2962 return mvmd128<(8)>::slli<(sh*2)>(arg1); 2963 2963 } 2964 2964 … … 2972 2972 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1) 2973 2973 { 2974 return simd128<128>::slli<(sh*64)>(arg1);2974 return mvmd128<(32)>::slli<(sh*2)>(arg1); 2975 2975 } 2976 2976 -
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 -
trunk/lib/idisa_cpp/idisa_ssse3.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 … … 2825 2825 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1) 2826 2826 { 2827 return simd128<128>::srli<(sh*4)>(arg1);2827 return mvmd128<(2)>::srli<(sh*2)>(arg1); 2828 2828 } 2829 2829 … … 2843 2843 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1) 2844 2844 { 2845 return simd128<128>::srli<(sh*32)>(arg1);2845 return mvmd128<(16)>::srli<(sh*2)>(arg1); 2846 2846 } 2847 2847 … … 2855 2855 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1) 2856 2856 { 2857 return simd128<128>::srli<(sh*128)>(arg1);2857 return mvmd128<(64)>::srli<(sh*2)>(arg1); 2858 2858 } 2859 2859 … … 2951 2951 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1) 2952 2952 { 2953 return simd128<128>::slli<(sh*4)>(arg1);2953 return mvmd128<(2)>::slli<(sh*2)>(arg1); 2954 2954 } 2955 2955 … … 2963 2963 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1) 2964 2964 { 2965 return simd128<128>::slli<(sh*16)>(arg1);2965 return mvmd128<(8)>::slli<(sh*2)>(arg1); 2966 2966 } 2967 2967 … … 2975 2975 template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1) 2976 2976 { 2977 return simd128<128>::slli<(sh*64)>(arg1);2977 return mvmd128<(32)>::slli<(sh*2)>(arg1); 2978 2978 } 2979 2979 -
trunk/libgen/Library_Generator/SSE2Instructions.py
r1570 r1661 164 164 "fws":[8, 16, 32, 64], 165 165 }, 166 "mvmd_srli":\ 167 { 168 "signature":"SIMD_type _mm_srli_si128(SIMD_type arg1, int sh)", 169 "args_type":{"arg1":"SIMD_type", "sh":"signed_int(32)"}, 170 "return_type":"SIMD_type", 171 "fws":[8], 172 }, 173 "mvmd_slli":\ 174 { 175 "signature":"SIMD_type _mm_slli_si128(SIMD_type arg1, int sh)", 176 "args_type":{"arg1":"SIMD_type", "sh":"signed_int(32)"}, 177 "return_type":"SIMD_type", 178 "fws":[8], 179 }, 166 180 "mvmd_fill":\ 167 181 { -
trunk/libgen/Library_Generator/StrategyPool.py
r1579 r1661 1796 1796 "Platforms":[configure.ALL], 1797 1797 }, 1798 1798 1799 "mvmd_srli_halving":\ 1800 { 1801 "body":r''' 1802 return (mvmd_srli(fw/2, sh*2, arg1))''', 1803 "Ops":["mvmd_srli"], 1804 "Fws":[-1], 1805 "Platforms":[configure.ALL], 1806 }, 1807 1808 "mvmd_slli_halving":\ 1809 { 1810 "body":r''' 1811 return (mvmd_slli(fw/2, sh*2, arg1))''', 1812 "Ops":["mvmd_slli"], 1813 "Fws":[-1], 1814 "Platforms":[configure.ALL], 1815 }, 1816 1799 1817 "simd_add_2_logic":\ 1800 1818 {
Note: See TracChangeset
for help on using the changeset viewer.