Changeset 764 for trunk/lib


Ignore:
Timestamp:
Dec 2, 2010, 5:28:15 AM (9 years ago)
Author:
cameron
Message:

Use carry ADT abstractions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/carryQ.h

    r758 r764  
    55//
    66
    7 #define ADC64
    8 #undef SAHFLAHF
    97#include "block_carry.h"
    108
     
    1210
    1311#define CarryDeclare(name, count)\
    14 CarryType name[count]
     12CarryType name[count];\
     13for (int j=0; j < count; j++) name[j] = Carry0
    1514
    1615static inline BitBlock BitBlock_advance_ci_co(BitBlock strm, CarryQtype cq, int carryno) {
     
    7069  int i;
    7170  for (i = carryno + 1; i < carryno + carry_count; i++) {
    72     c1 |= cq[i];
     71    c1 = carry_or(c1, cq[i]);
    7372  }
    74   return !(c1 == 0);
     73  return test_carry(c1);
    7574}
    7675
     
    8584  int i;
    8685  for (i = 0; i < carry_count; i++) {
    87     cq[carryno+i] |= local_cq[i];
     86    cq[carryno+i] = carry_or(cq[carryno+i], local_cq[i]);
    8887  }
    89   return;
    9088}
    9189
Note: See TracChangeset for help on using the changeset viewer.