Changeset 3573


Ignore:
Timestamp:
Nov 29, 2013, 12:03:24 PM (6 years ago)
Author:
cameron
Message:

Eliminate signed numeric literals for compatibility with uint types.

File:
1 edited

Legend:

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

    r3526 r3573  
    555555IDISA_ALWAYS_INLINE bitblock128_t simd_not(bitblock128_t arg1)
    556556{
    557         return simd_xor(arg1, simd128<32>::constant<-1>());
     557        return simd_xor(arg1, simd128<32>::constant<4294967295>());
    558558}
    559559
     
    755755
    756756//The total number of operations is 51.75
    757 template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2)
     757/*template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2)
    758758{
    759759        bitblock128_t hiAns = simd128<(64)>::gt(arg1, arg2);
     
    762762        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
    763763        return simd_or(simd128<128>::srai<(64)>(hiAns), mask);
    764 }
     764}*/
    765765
    766766//The total number of operations is 289.0
     
    14411441
    14421442//The total number of operations is 4.5
    1443 template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1)
     1443/*template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1)
    14441444{
    14451445        return simd_or(simd_and(simd128<64>::himask(), simd128<(32)>::srai<((sh < (32)) ? sh : (32))>(arg1)), ((sh <= (32)) ? simd128<64>::srli<sh>(arg1) : simd128<(32)>::srai<(sh-(32))>(simd128<64>::srli<(32)>(arg1))));
    1446 }
     1446}*/
    14471447
    14481448//The total number of operations is 11.0833333333
    1449 template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1)
     1449/*template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1)
    14501450{
    14511451        return simd_or(simd_and(simd128<128>::himask(), simd128<(64)>::srai<((sh < (64)) ? sh : (64))>(arg1)), ((sh <= (64)) ? simd128<128>::srli<sh>(arg1) : simd128<(64)>::srai<(sh-(64))>(simd128<128>::srli<(64)>(arg1))));
    1452 }
     1452}*/
    14531453
    14541454//The total number of operations is 10.0
     
    15721572template <> template <FieldType<1>::T val> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::constant()
    15731573{
    1574         return simd128<32>::constant<(-1*val)>();
     1574        return simd128<2>::constant<(val+val+val)>();
    15751575}
    15761576
     
    19201920template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::himask()
    19211921{
    1922         return simd128<32>::constant<-65536>();
     1922        return simd128<32>::constant<4294901760>();
    19231923}
    19241924
     
    31693169IDISA_ALWAYS_INLINE bool bitblock128::all(bitblock128_t arg1)
    31703170{
    3171         return hsimd128<8>::signmask(simd128<8>::eq(arg1, simd128<8>::constant<-1>())) == 65535;
     3171        return hsimd128<8>::signmask(simd128<8>::eq(arg1, simd128<8>::constant<255>())) == 65535;
    31723172}
    31733173
Note: See TracChangeset for help on using the changeset viewer.