53 unsigned int index, lastIndex;
55 uint32_t wordRem, wordShiftedRem, wordProd;
60 dwordProd = (
uint64_t) bPtr[index] * q;
61 wordRem = remPtr[index];
62 wordShiftedRem = wordRem<<dist;
64 zPtr[index] = wordShiftedRem - wordProd;
65 if ( index != lastIndex ) {
67 borrow = (wordShiftedRem < wordProd);
69 wordShiftedRem = wordRem>>(uNegDist & 31);
71 dwordProd = (
uint64_t) bPtr[index] * q + (dwordProd>>32);
72 wordRem = remPtr[index];
73 wordShiftedRem |= wordRem<<dist;
75 zPtr[index] = wordShiftedRem - wordProd - borrow;
76 if ( index == lastIndex )
break;
78 borrow ? (wordShiftedRem <= wordProd)
79 : (wordShiftedRem < wordProd);
void softfloat_remStepMBy32(uint_fast8_t size_words, const uint32_t *remPtr, uint_fast8_t dist, const uint32_t *bPtr, uint32_t q, uint32_t *zPtr)