Changeset 1073 for trunk


Ignore:
Timestamp:
Apr 7, 2011, 6:40:50 PM (8 years ago)
Author:
cameron
Message:

carry_flip primitive

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/block_carry.h

    r961 r1073  
    5757#define Carry0 0
    5858
     59#define carry_flip(c) ((c) ^ 1)
     60
    5961#define test_carry(x) ((x) > 0)
    6062
    6163#define carry_or(carry1, carry2) (carry1 | carry2)
    62 
    63 #define clc() \
    64   __asm__ __volatile__ ("clc\n\t":::)
    6564
    6665#define adc(x,y,carry,sum) \
     
    160159#define test_carry(x) (((x)&256) > 0)
    161160
     161#define carry_flip(c) ((c)^256)
     162
    162163#define carry_or(carry1, carry2) (carry1 | carry2)
    163164
     
    236237
    237238#define Carry0 simd_const_1(0)
     239
     240#define carry_flip(c) simd_xor(c, sisd_from_int(1))
    238241
    239242#define test_carry(x) bitblock_has_bit(x)
Note: See TracChangeset for help on using the changeset viewer.