res 379 src/decNumber/decContext.c Int res=0; // optimist res 385 src/decNumber/decContext.c res=(Int)LITEND-dle; res 387 src/decNumber/decContext.c return res; res 416 src/decNumber/decNumber.c Unit *res; // where result will be built res 569 src/decNumber/decNumber.c if (d<=set->digits) res=dn->lsu; // fits into supplied decNumber res 572 src/decNumber/decNumber.c res=resbuff; // assume use local buffer res 576 src/decNumber/decNumber.c res=allocres; res 585 src/decNumber/decNumber.c up=res+D2U(d)-1; // -> msu res 586 src/decNumber/decNumber.c cut=d-(up-res)*DECDPUN; // digits in top unit res 602 src/decNumber/decNumber.c up=res; // -> lsu res 617 src/decNumber/decNumber.c decSetCoeff(dn, set, res, d, &residue, &status); res 656 src/decNumber/decNumber.c decNumber * decNumberAbs(decNumber *res, const decNumber *rhs, res 663 src/decNumber/decNumber.c decAddOp(res, &dzero, rhs, set, (uByte)(rhs->bits & DECNEG), &status); res 664 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 665 src/decNumber/decNumber.c return res; res 681 src/decNumber/decNumber.c decNumber * decNumberAdd(decNumber *res, const decNumber *lhs, res 684 src/decNumber/decNumber.c decAddOp(res, lhs, rhs, set, 0, &status); res 685 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 686 src/decNumber/decNumber.c return res; res 704 src/decNumber/decNumber.c decNumber * decNumberAnd(decNumber *res, const decNumber *lhs, res 713 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 714 src/decNumber/decNumber.c return res; res 720 src/decNumber/decNumber.c uc=res->lsu; // .. res 743 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 744 src/decNumber/decNumber.c return res; res 751 src/decNumber/decNumber.c res->digits=decGetDigits(res->lsu, uc-res->lsu); res 752 src/decNumber/decNumber.c res->exponent=0; // integer res 753 src/decNumber/decNumber.c res->bits=0; // sign=0 res 754 src/decNumber/decNumber.c return res; // [no status to set] res 769 src/decNumber/decNumber.c decNumber * decNumberCompare(decNumber *res, const decNumber *lhs, res 772 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPARE, &status); res 773 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 774 src/decNumber/decNumber.c return res; res 789 src/decNumber/decNumber.c decNumber * decNumberCompareSignal(decNumber *res, const decNumber *lhs, res 792 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPSIG, &status); res 793 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 794 src/decNumber/decNumber.c return res; res 810 src/decNumber/decNumber.c decNumber * decNumberCompareTotal(decNumber *res, const decNumber *lhs, res 813 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPTOTAL, &status); res 814 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 815 src/decNumber/decNumber.c return res; res 831 src/decNumber/decNumber.c decNumber * decNumberCompareTotalMag(decNumber *res, const decNumber *lhs, res 871 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPTOTAL, &status); res 876 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 877 src/decNumber/decNumber.c return res; res 892 src/decNumber/decNumber.c decNumber * decNumberDivide(decNumber *res, const decNumber *lhs, res 895 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, DIVIDE, &status); res 896 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 897 src/decNumber/decNumber.c return res; res 912 src/decNumber/decNumber.c decNumber * decNumberDivideInteger(decNumber *res, const decNumber *lhs, res 915 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, DIVIDEINT, &status); res 916 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 917 src/decNumber/decNumber.c return res; res 945 src/decNumber/decNumber.c decNumber * decNumberExp(decNumber *res, const decNumber *rhs, res 967 src/decNumber/decNumber.c decExpOp(res, rhs, set, &status); res 974 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 975 src/decNumber/decNumber.c return res; res 994 src/decNumber/decNumber.c decNumber * decNumberFMA(decNumber *res, const decNumber *lhs, res 1041 src/decNumber/decNumber.c decNumberZero(res); // acc not yet set res 1042 src/decNumber/decNumber.c res->bits=DECNAN; res 1049 src/decNumber/decNumber.c decAddOp(res, acc, fhs, set, 0, &status); res 1053 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1054 src/decNumber/decNumber.c return res; res 1071 src/decNumber/decNumber.c decNumber * decNumberInvert(decNumber *res, const decNumber *rhs, res 1078 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 1079 src/decNumber/decNumber.c return res; res 1083 src/decNumber/decNumber.c uc=res->lsu; // .. res 1100 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 1101 src/decNumber/decNumber.c return res; res 1107 src/decNumber/decNumber.c res->digits=decGetDigits(res->lsu, uc-res->lsu); res 1108 src/decNumber/decNumber.c res->exponent=0; // integer res 1109 src/decNumber/decNumber.c res->bits=0; // sign=0 res 1110 src/decNumber/decNumber.c return res; // [no status to set] res 1141 src/decNumber/decNumber.c decNumber * decNumberLn(decNumber *res, const decNumber *rhs, res 1165 src/decNumber/decNumber.c decLnOp(res, rhs, set, &status); res 1172 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1173 src/decNumber/decNumber.c return res; res 1200 src/decNumber/decNumber.c decNumber * decNumberLogB(decNumber *res, const decNumber *rhs, res 1205 src/decNumber/decNumber.c if (decNumberIsNaN(rhs)) decNaNs(res, rhs, NULL, set, &status); res 1206 src/decNumber/decNumber.c else if (decNumberIsInfinite(rhs)) decNumberCopyAbs(res, rhs); res 1208 src/decNumber/decNumber.c decNumberZero(res); // prepare for Infinity res 1209 src/decNumber/decNumber.c res->bits=DECNEG|DECINF; // -Infinity res 1214 src/decNumber/decNumber.c if (set->digits>=10) decNumberFromInt32(res, ae); // lay it out res 1219 src/decNumber/decNumber.c decNumberPlus(res, t, set); // round as necessary res 1223 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1224 src/decNumber/decNumber.c return res; res 1258 src/decNumber/decNumber.c decNumber * decNumberLog10(decNumber *res, const decNumber *rhs, res 1283 src/decNumber/decNumber.c decNumberPlus(res, rhs, set); res 1284 src/decNumber/decNumber.c return res; res 1323 src/decNumber/decNumber.c decCopyFit(res, w, set, &residue, &status); // copy & round res 1324 src/decNumber/decNumber.c decFinish(res, set, &residue, &status); // cleanup/set flags res 1355 src/decNumber/decNumber.c decNumberCopy(res, a); // [will fit] res 1380 src/decNumber/decNumber.c decDivideOp(res, a, b, &aset, DIVIDE, &status); // into result res 1389 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1390 src/decNumber/decNumber.c return res; res 1405 src/decNumber/decNumber.c decNumber * decNumberMax(decNumber *res, const decNumber *lhs, res 1408 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMAX, &status); res 1409 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1410 src/decNumber/decNumber.c return res; res 1425 src/decNumber/decNumber.c decNumber * decNumberMaxMag(decNumber *res, const decNumber *lhs, res 1428 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMAXMAG, &status); res 1429 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1430 src/decNumber/decNumber.c return res; res 1445 src/decNumber/decNumber.c decNumber * decNumberMin(decNumber *res, const decNumber *lhs, res 1448 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMIN, &status); res 1449 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1450 src/decNumber/decNumber.c return res; res 1465 src/decNumber/decNumber.c decNumber * decNumberMinMag(decNumber *res, const decNumber *lhs, res 1468 src/decNumber/decNumber.c decCompareOp(res, lhs, rhs, set, COMPMINMAG, &status); res 1469 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1470 src/decNumber/decNumber.c return res; res 1487 src/decNumber/decNumber.c decNumber * decNumberMinus(decNumber *res, const decNumber *rhs, res 1494 src/decNumber/decNumber.c decAddOp(res, &dzero, rhs, set, DECNEG, &status); res 1495 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1496 src/decNumber/decNumber.c return res; res 1510 src/decNumber/decNumber.c decNumber * decNumberNextMinus(decNumber *res, const decNumber *rhs, res 1518 src/decNumber/decNumber.c decSetMaxValue(res, set); // is +ve res 1520 src/decNumber/decNumber.c return res; res 1525 src/decNumber/decNumber.c decNumberPlus(res, rhs, &workset); res 1528 src/decNumber/decNumber.c return res; res 1534 src/decNumber/decNumber.c decAddOp(res, rhs, &dtiny, &workset, DECNEG, &status); res 1536 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1537 src/decNumber/decNumber.c return res; res 1551 src/decNumber/decNumber.c decNumber * decNumberNextPlus(decNumber *res, const decNumber *rhs, res 1559 src/decNumber/decNumber.c decSetMaxValue(res, set); res 1560 src/decNumber/decNumber.c res->bits=DECNEG; // negative res 1562 src/decNumber/decNumber.c return res; res 1567 src/decNumber/decNumber.c decNumberPlus(res, rhs, &workset); res 1570 src/decNumber/decNumber.c return res; res 1576 src/decNumber/decNumber.c decAddOp(res, rhs, &dtiny, &workset, 0, &status); res 1578 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1579 src/decNumber/decNumber.c return res; res 1596 src/decNumber/decNumber.c decNumber * decNumberNextToward(decNumber *res, const decNumber *lhs, res 1604 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); res 1610 src/decNumber/decNumber.c if (result==0) decNumberCopySign(res, lhs, rhs); // easy res 1616 src/decNumber/decNumber.c decSetMaxValue(res, set); res 1617 src/decNumber/decNumber.c res->bits=DECNEG; // negative res 1618 src/decNumber/decNumber.c return res; // there is no status to set res 1626 src/decNumber/decNumber.c decSetMaxValue(res, set); res 1627 src/decNumber/decNumber.c return res; // there is no status to set res 1635 src/decNumber/decNumber.c decAddOp(res, lhs, &dtiny, &workset, sub, &status); // + or - res 1638 src/decNumber/decNumber.c if (decNumberIsNormal(res, set)) status=0; res 1642 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1643 src/decNumber/decNumber.c return res; res 1661 src/decNumber/decNumber.c decNumber * decNumberOr(decNumber *res, const decNumber *lhs, res 1670 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 1671 src/decNumber/decNumber.c return res; res 1676 src/decNumber/decNumber.c uc=res->lsu; // .. res 1698 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 1699 src/decNumber/decNumber.c return res; res 1706 src/decNumber/decNumber.c res->digits=decGetDigits(res->lsu, uc-res->lsu); res 1707 src/decNumber/decNumber.c res->exponent=0; // integer res 1708 src/decNumber/decNumber.c res->bits=0; // sign=0 res 1709 src/decNumber/decNumber.c return res; // [no status to set] res 1728 src/decNumber/decNumber.c decNumber * decNumberPlus(decNumber *res, const decNumber *rhs, res 1735 src/decNumber/decNumber.c decAddOp(res, &dzero, rhs, set, 0, &status); res 1736 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1737 src/decNumber/decNumber.c return res; res 1752 src/decNumber/decNumber.c decNumber * decNumberMultiply(decNumber *res, const decNumber *lhs, res 1755 src/decNumber/decNumber.c decMultiplyOp(res, lhs, rhs, set, &status); res 1756 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 1757 src/decNumber/decNumber.c return res; res 1786 src/decNumber/decNumber.c decNumber * decNumberPower(decNumber *res, const decNumber *lhs, res 1836 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); res 1847 src/decNumber/decNumber.c decNumberZero(res); // prepare for 0/1/Infinity res 1849 src/decNumber/decNumber.c if (rhsneg) res->bits|=DECINF; // +Infinity [else is +0] res 1854 src/decNumber/decNumber.c *res->lsu=1; // was 0, make int 1 res 1855 src/decNumber/decNumber.c res->digits=decShiftToMost(res->lsu, 1, shift); res 1856 src/decNumber/decNumber.c res->exponent=-shift; // make 1.0000... res 1860 src/decNumber/decNumber.c if (!rhsneg) res->bits|=DECINF; // +Infinity [else is +0] res 1882 src/decNumber/decNumber.c decNumberZero(res); // prepare res 1883 src/decNumber/decNumber.c if (n==0) *res->lsu=1; // [-]Inf**0 => 1 res 1891 src/decNumber/decNumber.c res->bits=bits; res 1900 src/decNumber/decNumber.c decNumberZero(res); res 1901 src/decNumber/decNumber.c *res->lsu=1; // return 1 res 1916 src/decNumber/decNumber.c decNumberZero(res); // prepare res 1918 src/decNumber/decNumber.c res->bits=bits; res 1954 src/decNumber/decNumber.c decNumberZero(res); // result=1 res 1955 src/decNumber/decNumber.c *res->lsu=1; // .. res 2083 src/decNumber/decNumber.c decNumberCopy(res, dac); // copy to result (is now OK length) res 2097 src/decNumber/decNumber.c decCopyFit(res, dac, set, &residue, &status); res 2098 src/decNumber/decNumber.c decFinish(res, set, &residue, &status); // final cleanup res 2100 src/decNumber/decNumber.c if (!set->extended) decTrim(res, set, 0, 1, &dropped); // trailing zeros res 2110 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2111 src/decNumber/decNumber.c return res; res 2132 src/decNumber/decNumber.c decNumber * decNumberQuantize(decNumber *res, const decNumber *lhs, res 2135 src/decNumber/decNumber.c decQuantizeOp(res, lhs, rhs, set, 1, &status); res 2136 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2137 src/decNumber/decNumber.c return res; res 2152 src/decNumber/decNumber.c decNumber * decNumberNormalize(decNumber *res, const decNumber *rhs, res 2154 src/decNumber/decNumber.c return decNumberReduce(res, rhs, set); res 2157 src/decNumber/decNumber.c decNumber * decNumberReduce(decNumber *res, const decNumber *rhs, res 2181 src/decNumber/decNumber.c decNaNs(res, rhs, NULL, set, &status); res 2186 src/decNumber/decNumber.c decCopyFit(res, rhs, set, &residue, &status); // copy & round res 2187 src/decNumber/decNumber.c decFinish(res, set, &residue, &status); // cleanup/set flags res 2188 src/decNumber/decNumber.c decTrim(res, set, 1, 0, &dropped); // normalize in place res 2195 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set);// then report status res 2196 src/decNumber/decNumber.c return res; res 2217 src/decNumber/decNumber.c decNumber * decNumberRescale(decNumber *res, const decNumber *lhs, res 2220 src/decNumber/decNumber.c decQuantizeOp(res, lhs, rhs, set, 0, &status); res 2221 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2222 src/decNumber/decNumber.c return res; res 2237 src/decNumber/decNumber.c decNumber * decNumberRemainder(decNumber *res, const decNumber *lhs, res 2240 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, REMAINDER, &status); res 2241 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2242 src/decNumber/decNumber.c return res; res 2257 src/decNumber/decNumber.c decNumber * decNumberRemainderNear(decNumber *res, const decNumber *lhs, res 2260 src/decNumber/decNumber.c decDivideOp(res, lhs, rhs, set, REMNEAR, &status); res 2261 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2262 src/decNumber/decNumber.c return res; res 2290 src/decNumber/decNumber.c decNumber * decNumberRotate(decNumber *res, const decNumber *lhs, res 2297 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); res 2308 src/decNumber/decNumber.c decNumberCopy(res, lhs); res 2309 src/decNumber/decNumber.c if (res->digits>set->digits) decDecap(res, res->digits-set->digits); res 2313 src/decNumber/decNumber.c && !decNumberIsInfinite(res)) { // lhs was infinite res 2317 src/decNumber/decNumber.c Unit *msu=res->lsu+D2U(res->digits)-1; // current msu res 2318 src/decNumber/decNumber.c Unit *msumax=res->lsu+D2U(set->digits)-1; //-V778 // rotation msu res 2320 src/decNumber/decNumber.c res->digits=set->digits; // now full-length res 2321 src/decNumber/decNumber.c msudigits=MSUDIGITS(res->digits); // actual digits in msu res 2358 src/decNumber/decNumber.c uInt save=res->lsu[0]%powers[shift]; //-V557 // save low digit(s) res 2359 src/decNumber/decNumber.c decShiftToLeast(res->lsu, D2U(res->digits), shift); res 2378 src/decNumber/decNumber.c uInt save=res->lsu[0]%powers[shift]; // save low digit(s) res 2379 src/decNumber/decNumber.c decShiftToLeast(res->lsu, units, shift); res 2385 src/decNumber/decNumber.c decReverse(res->lsu+units, msumax); // left part res 2386 src/decNumber/decNumber.c decReverse(res->lsu, res->lsu+units-1); // right part res 2387 src/decNumber/decNumber.c decReverse(res->lsu, msumax); // whole res 2391 src/decNumber/decNumber.c res->digits=decGetDigits(res->lsu, msumax-res->lsu+1); res 2395 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2396 src/decNumber/decNumber.c return res; res 2408 src/decNumber/decNumber.c decNumber * decNumberSameQuantum(decNumber *res, const decNumber *lhs, res 2419 src/decNumber/decNumber.c decNumberZero(res); // OK to overwrite an operand now res 2420 src/decNumber/decNumber.c *res->lsu=ret; res 2421 src/decNumber/decNumber.c return res; res 2439 src/decNumber/decNumber.c decNumber * decNumberScaleB(decNumber *res, const decNumber *lhs, res 2447 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); res 2461 src/decNumber/decNumber.c decNumberCopy(res, lhs); // all done if infinite lhs res 2462 src/decNumber/decNumber.c if (!decNumberIsInfinite(res)) { // prepare to scale res 2463 src/decNumber/decNumber.c Int exp=res->exponent; // save for overflow test res 2464 src/decNumber/decNumber.c res->exponent+=reqexp; // adjust the exponent res 2466 src/decNumber/decNumber.c && ((exp^res->exponent)<0)) { // .. but result had different res 2468 src/decNumber/decNumber.c if (exp<0) res->exponent=DEC_MIN_EMIN-DEC_MAX_DIGITS; res 2469 src/decNumber/decNumber.c else res->exponent=DEC_MAX_EMAX+1; res 2472 src/decNumber/decNumber.c decCopyFit(res, res, set, &residue, &status); res 2473 src/decNumber/decNumber.c decFinalize(res, set, &residue, &status); // final check res 2477 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2478 src/decNumber/decNumber.c return res; res 2502 src/decNumber/decNumber.c decNumber * decNumberShift(decNumber *res, const decNumber *lhs, res 2509 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, &status); res 2520 src/decNumber/decNumber.c decNumberCopy(res, lhs); res 2521 src/decNumber/decNumber.c if (shift!=0 && !decNumberIsInfinite(res)) { // something to do res 2524 src/decNumber/decNumber.c *res->lsu=0; // so place 0 res 2525 src/decNumber/decNumber.c res->digits=1; // .. res 2529 src/decNumber/decNumber.c if (res->digits+shift>set->digits) { res 2530 src/decNumber/decNumber.c decDecap(res, res->digits+shift-set->digits); res 2534 src/decNumber/decNumber.c if (res->digits>1 || *res->lsu) // if non-zero.. res 2535 src/decNumber/decNumber.c res->digits=decShiftToMost(res->lsu, res->digits, shift); res 2539 src/decNumber/decNumber.c if (-shift>=res->digits) { // discarding all res 2540 src/decNumber/decNumber.c *res->lsu=0; // so place 0 res 2541 src/decNumber/decNumber.c res->digits=1; // .. res 2544 src/decNumber/decNumber.c decShiftToLeast(res->lsu, D2U(res->digits), -shift); res 2545 src/decNumber/decNumber.c res->digits-=(-shift); res 2551 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2552 src/decNumber/decNumber.c return res; res 2627 src/decNumber/decNumber.c decNumber * decNumberSquareRoot(decNumber *res, const decNumber *rhs, res 2679 src/decNumber/decNumber.c else decNumberCopy(res, rhs); // +Infinity res 2681 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, &status); // a NaN res 2692 src/decNumber/decNumber.c decNumberCopy(res, rhs); // could be 0 or -0 res 2693 src/decNumber/decNumber.c res->exponent=ideal; // use the ideal [safe] res 2695 src/decNumber/decNumber.c decFinish(res, set, &residue, &status); res 2823 src/decNumber/decNumber.c decNumberCopy(res, a); // copy to result res 2937 src/decNumber/decNumber.c decNumberCopy(res, a); // a is now the result res 2946 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set);// then report status res 2947 src/decNumber/decNumber.c return res; res 2962 src/decNumber/decNumber.c decNumber * decNumberSubtract(decNumber *res, const decNumber *lhs, res 2966 src/decNumber/decNumber.c decAddOp(res, lhs, rhs, set, DECNEG, &status); res 2967 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 2968 src/decNumber/decNumber.c return res; res 2992 src/decNumber/decNumber.c decNumber * decNumberToIntegralExact(decNumber *res, const decNumber *rhs, res 3000 src/decNumber/decNumber.c if (decNumberIsInfinite(rhs)) decNumberCopy(res, rhs); // an Infinity res 3001 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, &status); // a NaN res 3005 src/decNumber/decNumber.c if (rhs->exponent>=0) return decNumberCopy(res, rhs); res 3011 src/decNumber/decNumber.c decNumberQuantize(res, rhs, &dn, &workset); res 3014 src/decNumber/decNumber.c if (status!=0) decStatus(res, status, set); res 3015 src/decNumber/decNumber.c return res; res 3018 src/decNumber/decNumber.c decNumber * decNumberToIntegralValue(decNumber *res, const decNumber *rhs, res 3022 src/decNumber/decNumber.c decNumberToIntegralExact(res, rhs, &workset); res 3026 src/decNumber/decNumber.c return res; res 3044 src/decNumber/decNumber.c decNumber * decNumberXor(decNumber *res, const decNumber *lhs, res 3053 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 3054 src/decNumber/decNumber.c return res; res 3059 src/decNumber/decNumber.c uc=res->lsu; // .. res 3081 src/decNumber/decNumber.c decStatus(res, DEC_Invalid_operation, set); res 3082 src/decNumber/decNumber.c return res; res 3089 src/decNumber/decNumber.c res->digits=decGetDigits(res->lsu, uc-res->lsu); res 3090 src/decNumber/decNumber.c res->exponent=0; // integer res 3091 src/decNumber/decNumber.c res->bits=0; // sign=0 res 3092 src/decNumber/decNumber.c return res; // [no status to set] res 3194 src/decNumber/decNumber.c decNumber * decNumberCopyAbs(decNumber *res, const decNumber *rhs) { res 3195 src/decNumber/decNumber.c decNumberCopy(res, rhs); res 3196 src/decNumber/decNumber.c res->bits&=~DECNEG; // turn off sign res 3197 src/decNumber/decNumber.c return res; res 3212 src/decNumber/decNumber.c decNumber * decNumberCopyNegate(decNumber *res, const decNumber *rhs) { res 3213 src/decNumber/decNumber.c decNumberCopy(res, rhs); res 3214 src/decNumber/decNumber.c res->bits^=DECNEG; // invert the sign res 3215 src/decNumber/decNumber.c return res; res 3230 src/decNumber/decNumber.c decNumber * decNumberCopySign(decNumber *res, const decNumber *lhs, res 3234 src/decNumber/decNumber.c decNumberCopy(res, lhs); res 3235 src/decNumber/decNumber.c res->bits&=~DECNEG; // clear the sign res 3236 src/decNumber/decNumber.c res->bits|=sign; // set from rhs res 3237 src/decNumber/decNumber.c return res; res 3574 src/decNumber/decNumber.c static decNumber * decAddOp(decNumber *res, const decNumber *lhs, res 3620 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); res 3632 src/decNumber/decNumber.c decNumberZero(res); res 3633 src/decNumber/decNumber.c res->bits=bits; // set +/- infinity res 3645 src/decNumber/decNumber.c decCopyFit(res, rhs, set, &residue, status); // copy (as needed) res 3646 src/decNumber/decNumber.c res->bits^=negate; // flip if rhs was negated res 3651 src/decNumber/decNumber.c adjust=lexp-res->exponent; // adjustment needed [if -ve] res 3652 src/decNumber/decNumber.c if (ISZERO(res)) { // both 0: special IEEE 754 rules res 3653 src/decNumber/decNumber.c if (adjust<0) res->exponent=lexp; // set exponent res 3656 src/decNumber/decNumber.c if (set->round!=DEC_ROUND_FLOOR) res->bits=0; res 3657 src/decNumber/decNumber.c else res->bits=DECNEG; // preserve 0 sign res 3662 src/decNumber/decNumber.c if ((res->digits-adjust)>set->digits) { res 3663 src/decNumber/decNumber.c adjust=res->digits-set->digits; // to fit exactly res 3666 src/decNumber/decNumber.c res->digits=decShiftToMost(res->lsu, res->digits, -adjust); res 3667 src/decNumber/decNumber.c res->exponent+=adjust; // set the exponent. res 3673 src/decNumber/decNumber.c decFinish(res, set, &residue, status); // clean and finalize res 3682 src/decNumber/decNumber.c decCopyFit(res, lhs, set, &residue, status); // copy (as needed) res 3688 src/decNumber/decNumber.c adjust=rexp-res->exponent; // adjustment needed [if -ve] res 3690 src/decNumber/decNumber.c if ((res->digits-adjust)>set->digits) { res 3691 src/decNumber/decNumber.c adjust=res->digits-set->digits; // to fit exactly res 3694 src/decNumber/decNumber.c res->digits=decShiftToMost(res->lsu, res->digits, -adjust); res 3695 src/decNumber/decNumber.c res->exponent+=adjust; // set the exponent. res 3700 src/decNumber/decNumber.c decFinish(res, set, &residue, status); // clean and finalize res 3724 src/decNumber/decNumber.c if (res!=lhs) decNumberCopy(res, lhs); // not in place res 3725 src/decNumber/decNumber.c *res->lsu=(Unit)partial; // [copy could have overwritten RHS] res 3733 src/decNumber/decNumber.c if (res!=lhs) decNumberCopy(res, lhs); // not in place res 3734 src/decNumber/decNumber.c *res->lsu=(Unit)partial; res 3736 src/decNumber/decNumber.c res->digits=decGetDigits(res->lsu, D2U(res->digits)); res 3788 src/decNumber/decNumber.c acc=res->lsu; // assume add direct to result res 3793 src/decNumber/decNumber.c || (res==rhs && rhsshift>0)) { // destructive overlap res 3807 src/decNumber/decNumber.c res->bits=(uByte)(bits&DECNEG); // it's now safe to overwrite.. res 3808 src/decNumber/decNumber.c res->exponent=lhs->exponent; // .. operands (even if aliased) res 3811 src/decNumber/decNumber.c res->digits=decUnitAddSub(lhs->lsu, D2U(lhs->digits), res 3815 src/decNumber/decNumber.c if (res->digits<0) { // borrowed... res 3816 src/decNumber/decNumber.c res->digits=-res->digits; res 3817 src/decNumber/decNumber.c res->bits^=DECNEG; // flip the sign res 3824 src/decNumber/decNumber.c if (acc!=res->lsu) { res 3830 src/decNumber/decNumber.c if (res->digits>reqdigits) res 3831 src/decNumber/decNumber.c res->digits=decGetDigits(acc, D2U(res->digits)); res 3832 src/decNumber/decNumber.c decSetCoeff(res, set, acc, res->digits, &residue, status); res 3841 src/decNumber/decNumber.c if (res->digits<maxdigits) { res 3842 src/decNumber/decNumber.c *(acc+D2U(res->digits))=0; // ensure leading 0 is there res 3843 src/decNumber/decNumber.c res->digits=maxdigits; res 3849 src/decNumber/decNumber.c if (res->digits>reqdigits) { res 3850 src/decNumber/decNumber.c res->digits=decGetDigits(acc, D2U(res->digits)); res 3851 src/decNumber/decNumber.c if (res->digits<maxdigits) res->digits=maxdigits; res 3854 src/decNumber/decNumber.c decSetCoeff(res, set, acc, res->digits, &residue, status); res 3858 src/decNumber/decNumber.c decApplyRound(res, set, residue, status); res 3866 src/decNumber/decNumber.c res->digits=decGetDigits(res->lsu, D2U(res->digits)); res 3869 src/decNumber/decNumber.c decFinish(res, set, &residue, status); res 3875 src/decNumber/decNumber.c if (ISZERO(res) && diffsign res 3880 src/decNumber/decNumber.c if (set->round==DEC_ROUND_FLOOR) res->bits|=DECNEG; // sign - res 3881 src/decNumber/decNumber.c else res->bits&=~DECNEG; // sign + res 3890 src/decNumber/decNumber.c return res; res 3963 src/decNumber/decNumber.c static decNumber * decDivideOp(decNumber *res, res 4030 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); res 4041 src/decNumber/decNumber.c decNumberZero(res); res 4042 src/decNumber/decNumber.c res->bits=bits|DECINF; // set +/- infinity res 4049 src/decNumber/decNumber.c decCopyFit(res, lhs, set, &residue, status); res 4052 src/decNumber/decNumber.c decNumberZero(res); res 4053 src/decNumber/decNumber.c res->bits=bits; // set +/- zero res 4057 src/decNumber/decNumber.c res->exponent=set->emin-set->digits+1; res 4061 src/decNumber/decNumber.c decFinish(res, set, &residue, status); res 4069 src/decNumber/decNumber.c decNumberZero(res); // [after lhs test] res 4073 src/decNumber/decNumber.c decNumberZero(res); res 4077 src/decNumber/decNumber.c res->bits=bits|DECINF; // .. is +/- Infinity res 4085 src/decNumber/decNumber.c if (!set->extended) decNumberZero(res); res 4090 src/decNumber/decNumber.c decNumberCopy(res, lhs); // [zeros always fit] res 4091 src/decNumber/decNumber.c res->bits=bits; // sign as computed res 4092 src/decNumber/decNumber.c res->exponent=exponent; // exponent, too res 4095 src/decNumber/decNumber.c decNumberZero(res); // integer 0 res 4096 src/decNumber/decNumber.c res->bits=bits; // sign as computed res 4100 src/decNumber/decNumber.c decNumberCopy(res, lhs); // [zeros always fit] res 4101 src/decNumber/decNumber.c if (exponent<res->exponent) res->exponent=exponent; // use lower res 4104 src/decNumber/decNumber.c decFinalize(res, set, &residue, status); // check exponent res 4121 src/decNumber/decNumber.c decNumberZero(res); // integer part is 0 res 4125 src/decNumber/decNumber.c res->bits=bits; // set +/- zero res 4134 src/decNumber/decNumber.c decCopyFit(res, lhs, set, &residue, status); res 4135 src/decNumber/decNumber.c decFinish(res, set, &residue, status); res 4406 src/decNumber/decNumber.c decNumberZero(res); // 0 coefficient res 4410 src/decNumber/decNumber.c res->exponent=exp; // .. with proper exponent res 4411 src/decNumber/decNumber.c res->bits=(uByte)(bits&DECNEG); // [cleaned] res 4412 src/decNumber/decNumber.c decFinish(res, set, &residue, status); // might clamp res 4514 src/decNumber/decNumber.c res->exponent=exponent; res 4515 src/decNumber/decNumber.c res->bits=(uByte)(bits&DECNEG); // [cleaned] res 4518 src/decNumber/decNumber.c decSetCoeff(res, set, accnext, accdigits, &residue, status); res 4520 src/decNumber/decNumber.c decFinish(res, set, &residue, status); // final cleanup res 4524 src/decNumber/decNumber.c if (!set->extended && (op==DIVIDE)) decTrim(res, set, 0, 1, &dropped); res 4534 src/decNumber/decNumber.c return res; res 4574 src/decNumber/decNumber.c static decNumber * decMultiplyOp(decNumber *res, const decNumber *lhs, res 4641 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); res 4642 src/decNumber/decNumber.c return res;} res 4647 src/decNumber/decNumber.c return res;} res 4648 src/decNumber/decNumber.c decNumberZero(res); res 4649 src/decNumber/decNumber.c res->bits=bits|DECINF; // infinity res 4650 src/decNumber/decNumber.c return res;} res 4847 src/decNumber/decNumber.c res->bits=bits; // set sign res 4848 src/decNumber/decNumber.c res->digits=decGetDigits(acc, accunits); // count digits exactly res 4858 src/decNumber/decNumber.c res->exponent=exponent; // OK to overwrite now res 4861 src/decNumber/decNumber.c decSetCoeff(res, set, acc, res->digits, &residue, status); res 4862 src/decNumber/decNumber.c decFinish(res, set, &residue, status); // final cleanup res 4874 src/decNumber/decNumber.c return res; res 4956 src/decNumber/decNumber.c decNumber * decExpOp(decNumber *res, const decNumber *rhs, res 4995 src/decNumber/decNumber.c decNumberZero(res); res 4996 src/decNumber/decNumber.c else decNumberCopy(res, rhs); // +Infinity -> self res 4998 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, status); // a NaN res 5002 src/decNumber/decNumber.c decNumberZero(res); // make clean 1 res 5003 src/decNumber/decNumber.c *res->lsu=1; // .. res 5030 src/decNumber/decNumber.c decNumberZero(res); // set 1 res 5031 src/decNumber/decNumber.c *res->lsu=1; // .. res 5032 src/decNumber/decNumber.c res->digits=decShiftToMost(res->lsu, 1, shift); res 5033 src/decNumber/decNumber.c res->exponent=-shift; // make 1.0000... res 5202 src/decNumber/decNumber.c decCopyFit(res, a, &aset, &residue, status); // copy & shorten res 5203 src/decNumber/decNumber.c decFinish(res, set, &residue, status); // cleanup/set flags res 5210 src/decNumber/decNumber.c return res; res 5301 src/decNumber/decNumber.c decNumber * decLnOp(decNumber *res, const decNumber *rhs, res 5329 src/decNumber/decNumber.c else decNumberCopy(res, rhs); // +Infinity -> self res 5331 src/decNumber/decNumber.c else decNaNs(res, rhs, NULL, set, status); // a NaN res 5335 src/decNumber/decNumber.c decNumberZero(res); // make clean res 5336 src/decNumber/decNumber.c res->bits=DECINF|DECNEG; // set - infinity res 5355 src/decNumber/decNumber.c decNumberFromString(res, LN10, &aset); res 5361 src/decNumber/decNumber.c decNumberFromString(res, LN2, &aset); res 5506 src/decNumber/decNumber.c decCopyFit(res, a, &aset, &residue, status); // copy & shorten res 5507 src/decNumber/decNumber.c decFinish(res, set, &residue, status); // cleanup/set flags res 5513 src/decNumber/decNumber.c return res; res 5538 src/decNumber/decNumber.c static decNumber * decQuantizeOp(decNumber *res, const decNumber *lhs, res 5573 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); res 5578 src/decNumber/decNumber.c else decNumberCopy(res, lhs); // [nop if in place] res 5604 src/decNumber/decNumber.c decNumberCopy(res, lhs); // [nop if in place] res 5605 src/decNumber/decNumber.c res->exponent=reqexp; // .. just set exponent res 5607 src/decNumber/decNumber.c if (!set->extended) res->bits=0; // subset specification; no -0 res 5625 src/decNumber/decNumber.c decCopyFit(res, lhs, &workset, &residue, status); // fit to result res 5626 src/decNumber/decNumber.c decApplyRound(res, &workset, residue, status); // .. and round res 5630 src/decNumber/decNumber.c if (res->exponent>reqexp) { res 5633 src/decNumber/decNumber.c if (res->digits==reqdigits) { // cannot shift by 1 res 5638 src/decNumber/decNumber.c res->digits=decShiftToMost(res->lsu, res->digits, 1); // shift res 5639 src/decNumber/decNumber.c res->exponent--; // (re)adjust the exponent. res 5642 src/decNumber/decNumber.c if (ISZERO(res) && !set->extended) res->bits=0; // subset; no -0 res 5649 src/decNumber/decNumber.c decNumberCopy(res, lhs); // [it will fit] res 5652 src/decNumber/decNumber.c res->digits=decShiftToMost(res->lsu, res->digits, -adjust); res 5653 src/decNumber/decNumber.c res->exponent+=adjust; // adjust the exponent res 5660 src/decNumber/decNumber.c if (res->exponent>set->emax-res->digits+1) { // too big res 5665 src/decNumber/decNumber.c decFinalize(res, set, &residue, status); // set subnormal flags res 5674 src/decNumber/decNumber.c return res; res 5707 src/decNumber/decNumber.c decNumber * decCompareOp(decNumber *res, const decNumber *lhs, res 5788 src/decNumber/decNumber.c decNaNs(res, lhs, rhs, set, status); // propagate NaN res 5808 src/decNumber/decNumber.c decNumberZero(res); // [always a valid result] res 5810 src/decNumber/decNumber.c *res->lsu=1; res 5811 src/decNumber/decNumber.c if (result<0) res->bits=DECNEG; res 5850 src/decNumber/decNumber.c decCopyFit(res, choice, set, &residue, status); res 5851 src/decNumber/decNumber.c decFinish(res, set, &residue, status); res 5858 src/decNumber/decNumber.c return res; res 6501 src/decNumber/decNumber.c decNumber *res; // result structure res 6507 src/decNumber/decNumber.c res=(decNumber *)malloc(sizeof(decNumber) res 6509 src/decNumber/decNumber.c if (res==NULL) { res 6513 src/decNumber/decNumber.c decCopyFit(res, dn, set, &residue, &newstatus); res 6514 src/decNumber/decNumber.c decApplyRound(res, set, residue, &newstatus); res 6519 src/decNumber/decNumber.c return res; res 7365 src/decNumber/decNumber.c static decNumber * decNaNs(decNumber *res, const decNumber *lhs, res 7381 src/decNumber/decNumber.c if (lhs->digits<=set->digits) decNumberCopy(res, lhs); // easy res 7386 src/decNumber/decNumber.c res->bits=lhs->bits; // need sign etc. res 7387 src/decNumber/decNumber.c uresp1=res->lsu+D2U(set->digits); res 7389 src/decNumber/decNumber.c for (ur=res->lsu, ul=lhs->lsu; ur<uresp1; ur++, ul++) *ur=*ul; res 7391 src/decNumber/decNumber.c res->digits=D2U(set->digits)*DECDPUN; res 7393 src/decNumber/decNumber.c if (res->digits>set->digits) decDecap(res, res->digits-set->digits); res 7396 src/decNumber/decNumber.c res->bits&=~DECSNAN; // convert any sNaN to NaN, while res 7397 src/decNumber/decNumber.c res->bits|=DECNAN; // .. preserving sign res 7398 src/decNumber/decNumber.c res->exponent=0; // clean exponent res 7400 src/decNumber/decNumber.c return res; res 2296 src/dps8/dps8_cpu.h # define LOAD_ACQ_CORE_WORD(res, addr) \ res 2299 src/dps8/dps8_cpu.h res = atomic_load_acq_64((volatile uint64_t *)&M[addr]); \ res 2340 src/dps8/dps8_cpu.h # define LOAD_ACQ_CORE_WORD(res, addr) \ res 2343 src/dps8/dps8_cpu.h res = __atomic_load_n((volatile uint64_t *)&M[addr], \ res 2390 src/dps8/dps8_cpu.h # define LOAD_ACQ_CORE_WORD(res, addr) \ res 2393 src/dps8/dps8_cpu.h res = M[addr]; \ res 7829 src/dps8/dps8_eis.c char * res = formatDecimal (out, & set, op1, n2, (int) e->S2, e->SF2, R, res 7832 src/dps8/dps8_eis.c sim_debug (DBG_CAC, & cpu_dev, "mvn res: '%s'\n", res); res 7880 src/dps8/dps8_eis.c (word9) (res[i] - '0')); res 7883 src/dps8/dps8_eis.c EISwrite49 (cpup, & e->ADDR2, & pos, (int) dstTN, (word9) res[i]); res 9683 src/dps8/dps8_eis.c char * res = formatDecimal (out, &set, op1, n2, (int) e->S2, e->SF2, 0, &Ovr, &Trunc); res 9723 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR2, &pos, (int) dstTN, (word9) (res[i] - '0')); res 9726 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR2, &pos, (int) dstTN, (word9) res[i]); res 10356 src/dps8/dps8_eis.c char *res = formatDecimal(out, &set, op3, n2, (int) e->S2, e->SF2, R, &Ovr, &Trunc); res 10404 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[j] - '0')); res 10407 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[j]); res 10747 src/dps8/dps8_eis.c char *res = formatDecimal(out, &set, op3, n3, (int) e->S3, e->SF3, R, &Ovr, &Trunc); res 10795 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[i] - '0')); res 10798 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[i]); res 11068 src/dps8/dps8_eis.c char *res = formatDecimal(out, &set, op3, n2, (int) e->S2, e->SF2, R, &Ovr, &Trunc); res 11116 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[i] - '0')); res 11119 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[i]); res 11409 src/dps8/dps8_eis.c char *res = formatDecimal(out, &set, op3, n3, (int) e->S3, e->SF3, R, &Ovr, &Trunc); res 11455 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[i] - '0')); res 11458 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[i]); res 11690 src/dps8/dps8_eis.c char *res = formatDecimal(out, &set, op3, n2, (int) e->S2, e->SF2, R, &Ovr, &Trunc); res 11734 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[i] - '0')); res 11737 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[i]); res 12003 src/dps8/dps8_eis.c char *res = formatDecimal(out, &set, op3, n3, (int) e->S3, e->SF3, R, &Ovr, &Trunc); res 12048 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[i] - '0')); res 12051 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[i]); res 13116 src/dps8/dps8_eis.c char *res; res 13142 src/dps8/dps8_eis.c res = formatDecimal(out, &set, op3, n2 -1, (int) e->S2, e->SF2, R, &Ovr, &Trunc); res 13147 src/dps8/dps8_eis.c res[i] = res[i-1]; res 13148 src/dps8/dps8_eis.c res[0] = '0'; res 13149 src/dps8/dps8_eis.c sim_debug (DBG_TRACEEXT, & cpu_dev, "dv2d: addzero n2 %d %s exp %d\n",n2,res,op3->exponent); res 13152 src/dps8/dps8_eis.c res = formatDecimal(out, &set, op3, n2, (int) e->S2, e->SF2, R, &Ovr, &Trunc); res 13156 src/dps8/dps8_eis.c res = formatDecimal(out, &set, op3, n2, (int) e->S2, e->SF2, R, &Ovr, &Trunc); res 13200 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[i] - '0')); res 13203 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[i]); res 13559 src/dps8/dps8_eis.c char *res; res 13587 src/dps8/dps8_eis.c res = formatDecimal(out, &set, op3, n3 -1, (int) e->S3, e->SF3, R, &Ovr, &Trunc); res 13592 src/dps8/dps8_eis.c res[i] = res[i-1]; res 13593 src/dps8/dps8_eis.c res[0] = '0'; res 13594 src/dps8/dps8_eis.c sim_debug (DBG_TRACEEXT, & cpu_dev, "dv3d: addzero n3 %d %s exp %d\n",n3,res,op3->exponent); res 13597 src/dps8/dps8_eis.c res = formatDecimal(out, &set, op3, n3, (int) e->S3, e->SF3, R, &Ovr, &Trunc); res 13601 src/dps8/dps8_eis.c res = formatDecimal(out, &set, op3, n3, (int) e->S3, e->SF3, R, &Ovr, &Trunc); res 13647 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) (res[i] - '0')); res 13650 src/dps8/dps8_eis.c EISwrite49(cpup, &e->ADDR3, &pos, (int) dstTN, (word9) res[i]); res 9818 src/dps8/dps8_ins.c word36 res; res 9836 src/dps8/dps8_ins.c res = (word36) doAppendCycleABSA (cpup, NULL, 0) << 12; res 9838 src/dps8/dps8_ins.c * result = res; res 147 src/dps8/dps8_math128.c uint128 res = construct_128 (a.h - b.h, a.l - b.l); res 149 src/dps8/dps8_math128.c res.h --; res 151 src/dps8/dps8_math128.c return res; res 831 src/dps8/dps8_math128.c uint128 res = divide_128_16 (a, b, & rem); res 833 src/dps8/dps8_math128.c if (res.h != resh || res.l != resl || rem != remainder) { res 837 src/dps8/dps8_math128.c (unsigned long long)res.h, (unsigned long long)res.l, rem); res 848 src/dps8/dps8_math128.c uint128 res = divide_128_32 (a, b, & rem); res 850 src/dps8/dps8_math128.c if (res.h != resh || res.l != resl || rem != remainder) { res 854 src/dps8/dps8_math128.c (unsigned long long)res.h, (unsigned long long)res.l, rem); res 2015 src/dps8/dps8_sys.c res 2064 src/dps8/dps8_sys.c res 2065 src/dps8/dps8_sys.c res 2203 src/dps8/dps8_sys.c res 2204 src/dps8/dps8_sys.c res 2211 src/dps8/dps8_sys.c res 2212 src/dps8/dps8_sys.c res 2213 src/dps8/dps8_sys.c res 2217 src/dps8/dps8_sys.c res 2226 src/dps8/dps8_sys.c word24 res; res 2229 src/dps8/dps8_sys.c if (dbgLookupAddress ((word18) segno, offset, & res, NULL)) res 2232 src/dps8/dps8_sys.c sim_msg ("Address is %08o\n", res); res 194 src/dps8/dps8_utils.c word38 res = op1e + op2e + ci; res 197 src/dps8/dps8_utils.c bool r37 = res & BIT37 ? true : false; res 198 src/dps8/dps8_utils.c bool r36 = res & SIGN36 ? true : false; res 201 src/dps8/dps8_utils.c bool r38 = res & BIT38 ? true : false; res 210 src/dps8/dps8_utils.c res &= MASK36; res 215 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 216 src/dps8/dps8_utils.c if (res & SIGN36) CPT (cpt2L, 31); // neg res 235 src/dps8/dps8_utils.c if (res) res 243 src/dps8/dps8_utils.c if (res & SIGN36) res 249 src/dps8/dps8_utils.c sim_debug (DBG_TRACEEXT, & cpu_dev, "Add36b res %012"PRIo64" flags %06o ovf %o\n", res, * flags, * ovf); res 250 src/dps8/dps8_utils.c return res; res 279 src/dps8/dps8_utils.c word38 res = (word38) (((word38s) op1e) - ((word38s) op2e) - ((word38) ci)); res 282 src/dps8/dps8_utils.c bool r37 = (res & BIT37) ? true : false; res 283 src/dps8/dps8_utils.c bool r36 = (res & SIGN36) ? true : false; res 286 src/dps8/dps8_utils.c bool r38 = res & BIT38 ? true : false; res 289 src/dps8/dps8_utils.c res &= MASK36; res 300 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 301 src/dps8/dps8_utils.c if (res & SIGN36) CPT (cpt2L, 31); // neg res 320 src/dps8/dps8_utils.c if (res) res 328 src/dps8/dps8_utils.c if (res & SIGN36) res 334 src/dps8/dps8_utils.c return res; res 355 src/dps8/dps8_utils.c word20 res = op1e + op2e + ci; res 358 src/dps8/dps8_utils.c bool r19 = (res & BIT19) ? true : false; res 359 src/dps8/dps8_utils.c bool r18 = (res & SIGN18) ? true : false; res 362 src/dps8/dps8_utils.c bool r20 = res & BIT20 ? true : false; res 365 src/dps8/dps8_utils.c res &= MASK18; res 376 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 377 src/dps8/dps8_utils.c if (res & SIGN36) CPT (cpt2L, 31); // neg res 396 src/dps8/dps8_utils.c if (res) res 404 src/dps8/dps8_utils.c if (res & SIGN18) res 410 src/dps8/dps8_utils.c return (word18) res; res 439 src/dps8/dps8_utils.c word20 res = (word20) (((word20s) op1e) - ((word20s) op2e) - ((word20s) ci)); res 442 src/dps8/dps8_utils.c bool r19 = res & BIT19 ? true : false; res 443 src/dps8/dps8_utils.c bool r18 = res & SIGN18 ? true : false; res 446 src/dps8/dps8_utils.c bool r20 = res & BIT20 ? true : false; res 449 src/dps8/dps8_utils.c res &= MASK18; res 460 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 461 src/dps8/dps8_utils.c if (res & SIGN36) CPT (cpt2L, 31); // neg res 480 src/dps8/dps8_utils.c if (res) res 488 src/dps8/dps8_utils.c if (res & SIGN18) res 494 src/dps8/dps8_utils.c return res; res 529 src/dps8/dps8_utils.c word74 res = add_128 (op1e, add_128 (op2e, ci)); res 531 src/dps8/dps8_utils.c word74 res = op1e + op2e + ci; res 536 src/dps8/dps8_utils.c bool r73 = isnonzero_128 (and_128 (res, BIT73)); res 537 src/dps8/dps8_utils.c bool r72 = isnonzero_128 (and_128 (res, SIGN72)); res 539 src/dps8/dps8_utils.c bool r73 = res & BIT73 ? true : false; res 540 src/dps8/dps8_utils.c bool r72 = res & SIGN72 ? true : false; res 545 src/dps8/dps8_utils.c bool r74 = isnonzero_128 (and_128 (res, BIT74)); res 547 src/dps8/dps8_utils.c bool r74 = res & BIT74 ? true : false; res 552 src/dps8/dps8_utils.c res = and_128 (res, MASK72); res 554 src/dps8/dps8_utils.c res &= MASK72; res 566 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 567 src/dps8/dps8_utils.c if (res & SIGN36) CPT (cpt2L, 31); // neg res 587 src/dps8/dps8_utils.c if (isnonzero_128 (res)) res 589 src/dps8/dps8_utils.c if (res) res 599 src/dps8/dps8_utils.c if (isnonzero_128 (and_128 (res, SIGN72))) res 601 src/dps8/dps8_utils.c if (res & SIGN72) res 608 src/dps8/dps8_utils.c return res; res 686 src/dps8/dps8_utils.c word74 res = subtract_128 (subtract_128 (op1e, op2e), ci); res 690 src/dps8/dps8_utils.c word74 res = (word72) (((word72s) op1e) - ((word72s) op2e) - ((word72s) ci)); res 694 src/dps8/dps8_utils.c (word36) (rshift_128 (res, 36).l & MASK36), (word36) (res.l & MASK36), * flags, * ovf); res 697 src/dps8/dps8_utils.c (word36) ((res >> 36) & MASK36), (word36) (res & MASK36), * flags, * ovf); res 702 src/dps8/dps8_utils.c bool r73 = isnonzero_128 (and_128 (res, BIT73)); res 703 src/dps8/dps8_utils.c bool r72 = isnonzero_128 (and_128 (res, SIGN72)); res 705 src/dps8/dps8_utils.c bool r73 = res & BIT73 ? true : false; res 706 src/dps8/dps8_utils.c bool r72 = res & SIGN72 ? true : false; res 711 src/dps8/dps8_utils.c bool r74 = isnonzero_128 (and_128 (res, BIT74)); res 713 src/dps8/dps8_utils.c bool r74 = res & BIT74 ? true : false; res 718 src/dps8/dps8_utils.c res = and_128 (res, MASK72); res 720 src/dps8/dps8_utils.c res &= MASK72; res 732 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 733 src/dps8/dps8_utils.c if (res & SIGN36) CPT (cpt2L, 31); // neg res 753 src/dps8/dps8_utils.c if (isnonzero_128 (res)) res 755 src/dps8/dps8_utils.c if (res) res 765 src/dps8/dps8_utils.c if (isnonzero_128 (and_128 (res, SIGN72))) res 767 src/dps8/dps8_utils.c if (res & SIGN72) res 776 src/dps8/dps8_utils.c (word36) (rshift_128 (res, 36).l & MASK36), (word36) (res.l & MASK36), * flags, * ovf); res 779 src/dps8/dps8_utils.c (word36) ((res >> 36) & MASK36), (word36) (res & MASK36), * flags, * ovf); res 781 src/dps8/dps8_utils.c return res; res 794 src/dps8/dps8_utils.c word36 res = ((word36) (- ((word36s) op1))) & DMASK; res 800 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 801 src/dps8/dps8_utils.c if (res & SIGN36) CPT (cpt2L, 31); // neg res 807 src/dps8/dps8_utils.c if (res & SIGN36) res 812 src/dps8/dps8_utils.c if (res == 0) res 817 src/dps8/dps8_utils.c return res; res 830 src/dps8/dps8_utils.c word18 res = ((word18) (- (word18s) op1)) & MASK18; res 835 src/dps8/dps8_utils.c if (!res) CPT (cpt2L, 30); // zero res 836 src/dps8/dps8_utils.c if (res & SIGN18) CPT (cpt2L, 31); // neg res 841 src/dps8/dps8_utils.c if (res & SIGN18) res 846 src/dps8/dps8_utils.c if (res == 0) res 851 src/dps8/dps8_utils.c return res; res 447 src/libsir/src/sirfilesystem.c ssize_t res; res 465 src/libsir/src/sirfilesystem.c res = read(fd, &ps, sizeof(ps)); res 467 src/libsir/src/sirfilesystem.c if (res < 0) res 481 src/libsir/src/sirfilesystem.c res = _sir_readlink(symlink, temp_buffer, SIR_MAXPATH); res 482 src/libsir/src/sirfilesystem.c if (res < 0) res 496 src/libsir/src/sirfilesystem.c res = _sir_readlink(cwd, cwdl, sizeof(cwdl) - 1); res 497 src/libsir/src/sirfilesystem.c if (res < 0) res 502 src/libsir/src/sirfilesystem.c res = _sir_readlink(symlink, temp_buffer, SIR_MAXPATH); res 503 src/libsir/src/sirfilesystem.c if (res < 0) res 513 src/libsir/src/sirfilesystem.c res = _sir_readlink(cwd, cwdl, sizeof(cwdl) - 1); res 514 src/libsir/src/sirfilesystem.c if (res < 0) res 519 src/libsir/src/sirfilesystem.c res = _sir_readlink(symlink, temp_buffer, SIR_MAXPATH); res 520 src/libsir/src/sirfilesystem.c if (res < 0) res 542 src/libsir/src/sirfilesystem.c res = _sir_readlink(cwd, cwdl, sizeof(cwdl) - 1); res 543 src/libsir/src/sirfilesystem.c if (res < 0) res 557 src/libsir/src/sirfilesystem.c res = _sir_readlink(symlink, temp_buffer, SIR_MAXPATH); res 558 src/libsir/src/sirfilesystem.c if (res < 0) res 569 src/libsir/src/sirfilesystem.c res = _sir_readlink(symlink, temp_buffer, SIR_MAXPATH); res 570 src/libsir/src/sirfilesystem.c if (res < 0) res 156 src/simh/sim_sock.c struct addrinfo **res); res 180 src/simh/sim_sock.c struct addrinfo **res) res 328 src/simh/sim_sock.c *res = result;