Changeset 934


Ignore:
Timestamp:
Mar 10, 2011, 10:23:48 PM (8 years ago)
Author:
cameron
Message:

Further fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/carryQ.h

    r933 r934  
    146146static inline BitBlock BitBlock_advance_ci(BitBlock strm, CarryQtype cq, const int carryno) {
    147147        BitBlock rslt;
    148         advance_with_carry(strm, cq[carryno], rslt);
     148        CarryType c = cq[carryno];
     149        advance_with_carry(strm, c, rslt);
    149150        return rslt;
    150151}
     
    167168}
    168169
     170static inline BitBlock BitBlock_add_ci(BitBlock strm1, BitBlock strm2, CarryQtype cq, const int carryno) {
     171        BitBlock sum;
     172        CarryType c = cq[carryno];
     173        adc128(strm1, strm2, c, sum);
     174        return sum;
     175}
     176
     177static inline BitBlock BitBlock_add(BitBlock strm1, BitBlock strm2) {
     178        BitBlock sum;
     179        CarryType c = Carry0;
     180        adc128(strm1, strm2, c, sum);
     181        return sum;
     182}
     183
    169184static inline BitBlock BitBlock_sub_ci_co(BitBlock strm1, BitBlock strm2, CarryQtype cq, const int carryno) {
    170185        BitBlock diff;
     
    180195}
    181196
     197static inline BitBlock BitBlock_sub_ci(BitBlock strm1, BitBlock strm2, CarryQtype cq, const int carryno) {
     198        BitBlock diff;
     199        CarryType c = cq[carryno];
     200        sbb128(strm1, strm2, c, diff);
     201        return diff;
     202}
     203
     204static inline BitBlock BitBlock_sub(BitBlock strm1, BitBlock strm2) {
     205        BitBlock diff;
     206        CarryType c = Carry0;
     207        sbb128(strm1, strm2, c, diff);
     208        return diff;
     209}
     210
    182211static inline BitBlock BitBlock_scanthru_ci_co(BitBlock markers0, BitBlock charclass, CarryQtype cq, const int carryno) {
    183212        BitBlock markers1;
     
    195224static inline BitBlock BitBlock_scanthru_ci(BitBlock markers0, BitBlock charclass, CarryQtype cq, const int carryno) {
    196225        BitBlock markers1;
    197         adc128(markers0, charclass, cq[carryno], markers1);
     226        CarryType c = cq[carryno];
     227        adc128(markers0, charclass, c, markers1);
    198228        return simd_andc(markers1, charclass);
    199229}
    200230
    201231static inline BitBlock BitBlock_scanthru(BitBlock markers0, BitBlock charclass) {
     232        BitBlock markers1;
    202233        CarryType c = Carry0;
    203234        adc128(markers0, charclass, c, markers1);
Note: See TracChangeset for help on using the changeset viewer.