a 266 src/decNumber/decNumber.c # define decFinish(a,b,c,d) decFinalize(a,b,c,d) a 741 src/decNumber/decNumber.c Unit a, b; // extract units a 742 src/decNumber/decNumber.c if (ua>msua) a=0; a 743 src/decNumber/decNumber.c else a=*ua; a 747 src/decNumber/decNumber.c if (a|b) { // maybe 1 bits to examine a 752 src/decNumber/decNumber.c if (a&b&1) *uc=*uc+(Unit)powers[i]; // effect AND a 753 src/decNumber/decNumber.c j=a%10; a 754 src/decNumber/decNumber.c a=a/10; a 854 src/decNumber/decNumber.c decNumber *a, *b; // temporary pointers a 859 src/decNumber/decNumber.c a=bufa; a 866 src/decNumber/decNumber.c a=allocbufa; // use the allocated space a 868 src/decNumber/decNumber.c decNumberCopy(a, lhs); // copy content a 869 src/decNumber/decNumber.c a->bits&=~DECNEG; // .. and clear the sign a 870 src/decNumber/decNumber.c lhs=a; // use copy from here on a 1104 src/decNumber/decNumber.c Unit a; // extract unit a 1106 src/decNumber/decNumber.c if (ua>msua) a=0; a 1107 src/decNumber/decNumber.c else a=*ua; a 1112 src/decNumber/decNumber.c if ((~a)&1) *uc=*uc+(Unit)powers[i]; // effect INVERT a 1113 src/decNumber/decNumber.c j=a%10; a 1114 src/decNumber/decNumber.c a=a/10; a 1285 src/decNumber/decNumber.c decNumber *a=bufa; // temporary a a 1359 src/decNumber/decNumber.c a=allocbufa; // use the allocated space a 1365 src/decNumber/decNumber.c decLnOp(a, rhs, &aset, &status); // a=ln(rhs) a 1370 src/decNumber/decNumber.c if (a->bits&DECSPECIAL || ISZERO(a)) { a 1371 src/decNumber/decNumber.c decNumberCopy(res, a); // [will fit] a 1396 src/decNumber/decNumber.c decDivideOp(res, a, b, &aset, DIVIDE, &status); // into result a 1698 src/decNumber/decNumber.c Unit a, b; // extract units a 1699 src/decNumber/decNumber.c if (ua>msua) a=0; a 1700 src/decNumber/decNumber.c else a=*ua; a 1704 src/decNumber/decNumber.c if (a|b) { // maybe 1 bits to examine a 1708 src/decNumber/decNumber.c if ((a|b)&1) *uc=*uc+(Unit)powers[i]; // effect OR a 1709 src/decNumber/decNumber.c j=a%10; a 1710 src/decNumber/decNumber.c a=a/10; a 2670 src/decNumber/decNumber.c decNumber *a=bufa; // approximation to result a 2748 src/decNumber/decNumber.c a=allocbufa; // use the allocated spaces a 2768 src/decNumber/decNumber.c a->bits=0; a->digits=3; a 2772 src/decNumber/decNumber.c a->exponent=-3; a 2775 src/decNumber/decNumber.c a->lsu[0]=819; a 2778 src/decNumber/decNumber.c a->lsu[0]=19; a->lsu[1]=8; a 2781 src/decNumber/decNumber.c a->lsu[0]=9; a->lsu[1]=1; a->lsu[2]=8; a 2789 src/decNumber/decNumber.c a->exponent=-2; a 2792 src/decNumber/decNumber.c a->lsu[0]=259; a 2795 src/decNumber/decNumber.c a->lsu[0]=59; a->lsu[1]=2; a 2798 src/decNumber/decNumber.c a->lsu[0]=9; a->lsu[1]=5; a->lsu[2]=2; a 2802 src/decNumber/decNumber.c decMultiplyOp(a, a, f, &workset, &ignore); // a=a*f a 2803 src/decNumber/decNumber.c decAddOp(a, a, t, &workset, 0, &ignore); // ..+t a 2818 src/decNumber/decNumber.c decDivideOp(b, f, a, &workset, DIVIDE, &ignore); // b=f/a a 2819 src/decNumber/decNumber.c decAddOp(b, b, a, &workset, 0, &ignore); // b=b+a a 2820 src/decNumber/decNumber.c decMultiplyOp(a, b, t, &workset, &ignore); // a=b*0.5 a 2829 src/decNumber/decNumber.c a->exponent+=exp/2; // set correct exponent a 2832 src/decNumber/decNumber.c decCopyFit(a, a, &approxset, &residue, &rstatus); // reduce (if needed) a 2833 src/decNumber/decNumber.c decFinish(a, &approxset, &residue, &rstatus); // clean and finalize a 2839 src/decNumber/decNumber.c decNumberCopy(res, a); // copy to result a 2847 src/decNumber/decNumber.c a->exponent-=exp/2; // back to 0.1->1 a 2855 src/decNumber/decNumber.c t->exponent=-a->digits-1; // make 0.5 ulp a 2856 src/decNumber/decNumber.c decAddOp(b, a, t, &workset, DECNEG, &ignore); // b = a - 0.5 ulp a 2864 src/decNumber/decNumber.c decAddOp(a, a, t, &workset, DECNEG, &ignore); // a = a - 1 ulp a 2868 src/decNumber/decNumber.c decAddOp(a, &dzero, a, &approxset, 0, &ignore); a 2871 src/decNumber/decNumber.c decAddOp(b, a, t, &workset, 0, &ignore); // b = a + 0.5 ulp a 2878 src/decNumber/decNumber.c decAddOp(a, a, t, &workset, 0, &ignore); // a = a + 1 ulp a 2882 src/decNumber/decNumber.c decAddOp(a, &dzero, a, &approxset, 0, &ignore); a 2889 src/decNumber/decNumber.c a->exponent+=exp/2; // set correct exponent a 2893 src/decNumber/decNumber.c decNumberCopy(b, a); a 2915 src/decNumber/decNumber.c Int todrop=ideal-a->exponent; // most that can be dropped a 2920 src/decNumber/decNumber.c Int maxdrop=maxexp-a->exponent; a 2930 src/decNumber/decNumber.c decShiftToLeast(a->lsu, D2U(a->digits), todrop); a 2931 src/decNumber/decNumber.c a->exponent+=todrop; // maintain numerical value a 2932 src/decNumber/decNumber.c a->digits-=todrop; // new length a 2953 src/decNumber/decNumber.c decNumberCopy(res, a); // a is now the result a 3081 src/decNumber/decNumber.c Unit a, b; // extract units a 3082 src/decNumber/decNumber.c if (ua>msua) a=0; a 3083 src/decNumber/decNumber.c else a=*ua; a 3087 src/decNumber/decNumber.c if (a|b) { // maybe 1 bits to examine a 3091 src/decNumber/decNumber.c if ((a^b)&1) *uc=*uc+(Unit)powers[i]; // effect XOR a 3092 src/decNumber/decNumber.c j=a%10; a 3093 src/decNumber/decNumber.c a=a/10; a 5004 src/decNumber/decNumber.c decNumber *a=bufa; // accumulator a 5077 src/decNumber/decNumber.c decNumberZero(a); a 5078 src/decNumber/decNumber.c *a->lsu=2; // not 1 but < exp(1) a 5079 src/decNumber/decNumber.c if (decNumberIsNegative(rhs)) a->exponent=-2; // make 0.02 a 5143 src/decNumber/decNumber.c a=allocbufa; // use the allocated space a 5159 src/decNumber/decNumber.c decNumberZero(a); *a->lsu=1; // accumulator=1 a 5177 src/decNumber/decNumber.c decAddOp(a, a, t, &aset, 0, status); // a=a+t a 5184 src/decNumber/decNumber.c if (((a->digits+a->exponent)>=(t->digits+t->exponent+p+1)) a 5185 src/decNumber/decNumber.c && (a->digits>=p)) break; a 5208 src/decNumber/decNumber.c decMultiplyOp(t, t, a, &aset, status); // acc=acc*x a 5215 src/decNumber/decNumber.c a=t; // and carry on using t instead of a a 5220 src/decNumber/decNumber.c if (ISZERO(a)) residue=0; // .. unless underflowed to 0 a 5222 src/decNumber/decNumber.c decCopyFit(res, a, &aset, &residue, status); // copy & shorten a 5335 src/decNumber/decNumber.c decNumber *a=bufa; // accumulator/work a 5405 src/decNumber/decNumber.c a=allocbufa; // use the allocated space a 5428 src/decNumber/decNumber.c decNumberFromInt32(a, r); // a=r a 5431 src/decNumber/decNumber.c decMultiplyOp(a, a, b, &aset, &ignore); // a=a*b a 5450 src/decNumber/decNumber.c decAddOp(a, a, b, &aset, 0, &ignore); // acc=a+b a 5484 src/decNumber/decNumber.c a->bits^=DECNEG; // make -a a 5485 src/decNumber/decNumber.c decExpOp(b, a, &bset, &ignore); // b=exp(-a) a 5486 src/decNumber/decNumber.c a->bits^=DECNEG; // restore sign of a a 5500 src/decNumber/decNumber.c (a->digits+a->exponent)>=(b->digits+b->exponent+set->digits+1)) { a 5501 src/decNumber/decNumber.c if (a->digits==p) break; a 5502 src/decNumber/decNumber.c if (decNumberIsZero(a)) { a 5504 src/decNumber/decNumber.c if (cmp.lsu[0]==0) a->exponent=0; // yes, exact 0 a 5509 src/decNumber/decNumber.c if (decNumberIsZero(b)) b->exponent=a->exponent-p; a 5513 src/decNumber/decNumber.c decAddOp(a, a, b, &aset, 0, &ignore); // a=a+b for next estimate a 5524 src/decNumber/decNumber.c if (ISZERO(a)) residue=0; // .. unless underflowed to 0 a 5526 src/decNumber/decNumber.c decCopyFit(res, a, &aset, &residue, status); // copy & shorten a 5957 src/decNumber/decNumber.c static Int decUnitCompare(const Unit *a, Int alength, a 5970 src/decNumber/decNumber.c l=a+alength-1; a 5972 src/decNumber/decNumber.c for (;l>=a; l--, r--) { a 6000 src/decNumber/decNumber.c accunits=decUnitAddSub(a, alength, b, blength, expunits, acc, a 6061 src/decNumber/decNumber.c static Int decUnitAddSub(const Unit *a, Int alength, a 6064 src/decNumber/decNumber.c const Unit *alsu=a; // A lsu [need to remember it] a 6079 src/decNumber/decNumber.c if (a==c && bshift<=alength) { a 6081 src/decNumber/decNumber.c a+=bshift; a 6083 src/decNumber/decNumber.c else for (; c<clsu+bshift; a++, c++) { // copy needed a 6084 src/decNumber/decNumber.c if (a<alsu+alength) *c=*a; a 6099 src/decNumber/decNumber.c carry+=*a; a 6100 src/decNumber/decNumber.c a++; a 6180 src/decNumber/decNumber.c if (a<alsu+alength) { // still in A a 6181 src/decNumber/decNumber.c carry+=*a; a 6182 src/decNumber/decNumber.c a++; a 277 src/dps8/dps8.h # define max(a,b) max2((a),(b)) a 279 src/dps8/dps8.h # define max2(a,b) ((a) > (b) ? (a) : (b)) a 280 src/dps8/dps8.h # define max3(a,b,c) max((a), max((b),(c))) a 283 src/dps8/dps8.h # define min(a,b) min2((a),(b)) a 285 src/dps8/dps8.h # define min2(a,b) ((a) < (b) ? (a) : (b)) a 286 src/dps8/dps8.h # define min3(a,b,c) min((a), min((b),(c))) a 549 src/dps8/dps8.h # define ARRAY_SIZE(a) ( sizeof(a) / sizeof((a)[0]) ) a 1976 src/dps8/dps8_cpu.h static inline void trackport (word24 a, word36 d) a 1979 src/dps8/dps8_cpu.h word2 port = (a >> 22) & MASK2; a 1981 src/dps8/dps8_cpu.h cpu.portAddr [port] = a; a 287 src/dps8/dps8_decimal.c a 292 src/dps8/dps8_decimal.c a 293 src/dps8/dps8_decimal.c a 1257 src/dps8/dps8_eis.c bool a = opDesc & (1 << 6); a 1258 src/dps8/dps8_eis.c if (a) a 1576 src/dps8/dps8_eis.c EISaddr * a = & e -> addr [k - 1]; a 1581 src/dps8/dps8_eis.c a -> address = effWORDNO; a 1583 src/dps8/dps8_eis.c a -> cPos= (int) effCHAR; a 1584 src/dps8/dps8_eis.c a -> bPos = (int) effBITNO; a 1588 src/dps8/dps8_eis.c a -> TA = (int) e -> TA [k - 1]; a 1804 src/dps8/dps8_eis.c EISaddr *a = &e->addr[k-1]; a 1809 src/dps8/dps8_eis.c a->address = effWORDNO; a 1811 src/dps8/dps8_eis.c a->cPos = (int) effCHAR; a 1812 src/dps8/dps8_eis.c a->bPos = (int) effBITNO; a 1815 src/dps8/dps8_eis.c a->TN = (int) e->TN[k-1]; a 1818 src/dps8/dps8_eis.c sim_debug (DBG_TRACEEXT, & cpu_dev, "parseNumericOperandDescriptor(): address:%06o cPos:%d bPos:%d N%u %u\n", cpu.du.Dk_PTR_W[k-1], a->cPos, a->bPos, k, e->N[k-1]); a 1820 src/dps8/dps8_eis.c sim_debug (DBG_TRACEEXT, & cpu_dev, "parseNumericOperandDescriptor(): address:%06o cPos:%d bPos:%d N%u %u\n", a->address, a->cPos, a->bPos, k, e->N[k-1]); a 1915 src/dps8/dps8_eis.c EISaddr *a = &e->addr[k-1]; a 1920 src/dps8/dps8_eis.c a->address = effWORDNO; a 1922 src/dps8/dps8_eis.c a->cPos = (int) effCHAR; a 1923 src/dps8/dps8_eis.c a->bPos = (int) effBITNO; a 5035 src/dps8/dps8_eis.c EISaddr *a = &e->addr[k-1]; a 5042 src/dps8/dps8_eis.c word9 c = EISget49(a, &pos, TN); a 12097 src/dps8/dps8_eis.c a 12103 src/dps8/dps8_eis.c a 12104 src/dps8/dps8_eis.c a 12110 src/dps8/dps8_eis.c a 12116 src/dps8/dps8_eis.c a 189 src/dps8/dps8_hw_consts.h # define GETHI36(a) ((word18) (((a) >> 18) & MASK18)) a 190 src/dps8/dps8_hw_consts.h # define GETLO36(a) ((word18) ((a) & MASK18)) a 191 src/dps8/dps8_hw_consts.h # define SETHI36(a,b) (((a) &= MASKLO18), ((a) |= ((((word36)(b) & MASKLO18) << 18)))) a 192 src/dps8/dps8_hw_consts.h # define SETLO36(a,b) (((a) &= MASKHI18), ((a) |= ((word36)(b) & MASKLO18))) a 193 src/dps8/dps8_hw_consts.h # define GETHI(a) GETHI36((a)) a 194 src/dps8/dps8_hw_consts.h # define GETLO(a) GETLO36((a)) a 195 src/dps8/dps8_hw_consts.h # define SETHI(a,b) SETHI36((a),(b)) a 196 src/dps8/dps8_hw_consts.h # define SETLO(a,b) SETLO36((a),(b)) a 198 src/dps8/dps8_hw_consts.h # define GETHI72(a) ((word36) (((a) >> 36) & MASK36)) a 199 src/dps8/dps8_hw_consts.h # define GETLO72(a) ((word36) ((a) & MASK36)) a 200 src/dps8/dps8_hw_consts.h # define SETHI72(a,b) ((a) &= MASK36, (a) |= ((((word72)(b) & MASK36)) << 36)) a 201 src/dps8/dps8_hw_consts.h # define SETLO72(a,b) ((a) &= MASK36 << 36, (a) |= ((word72)(b) & MASK36)) a 203 src/dps8/dps8_hw_consts.h # define GET24(a) ((word24) ((a) & MASK24)) a 1026 src/dps8/dps8_ins.c void addToTheMatrix (uint32 opcode, bool opcodeX, bool a, word6 tag) a 1031 src/dps8/dps8_ins.c int _a = a ? 1 : 0; a 1044 src/dps8/dps8_ins.c for (int a = 0; a < 2; a ++) a 1046 src/dps8/dps8_ins.c if ((count = theMatrix[opcode][opcodeX][a][tag])) a 1054 src/dps8/dps8_ins.c if (a) a 1067 src/dps8/dps8_ins.c count, opcode, opcodeX, a, tag); a 5076 src/dps8/dps8_ins.c t_int64 a = SIGNEXT36_64 (cpu.rA); a 5077 src/dps8/dps8_ins.c if (a < 0) a 5078 src/dps8/dps8_ins.c a = -a; a 5083 src/dps8/dps8_ins.c SC_I_ZERO (a == y); a 5084 src/dps8/dps8_ins.c SC_I_NEG (a < y); a 26 src/dps8/dps8_ins.h void addToTheMatrix (uint32 opcode, bool opcodeX, bool a, word6 tag); a 64 src/dps8/dps8_math.c # define ISEQ_128(a,b) iseq_128 (a, b) a 67 src/dps8/dps8_math.c # define ISEQ_128(a,b) ((a) == (b)) a 52 src/dps8/dps8_math128.c bool iseq_128 (uint128 a, uint128 b) a 54 src/dps8/dps8_math128.c return a.h == b.h && a.l == b.l; a 57 src/dps8/dps8_math128.c bool isgt_128 (uint128 a, uint128 b) a 59 src/dps8/dps8_math128.c if (a.h > b.h) return true; a 60 src/dps8/dps8_math128.c if (a.h < b.h) return false; a 61 src/dps8/dps8_math128.c if (a.l > b.l) return true; a 65 src/dps8/dps8_math128.c bool islt_128 (uint128 a, uint128 b) a 67 src/dps8/dps8_math128.c if (a.h < b.h) return true; a 68 src/dps8/dps8_math128.c if (a.h > b.h) return false; a 69 src/dps8/dps8_math128.c if (a.l < b.l) return true; a 73 src/dps8/dps8_math128.c bool isge_128 (uint128 a, uint128 b) a 75 src/dps8/dps8_math128.c if (a.h > b.h) return true; a 76 src/dps8/dps8_math128.c if (a.h < b.h) return false; a 77 src/dps8/dps8_math128.c if (a.l >= b.l) return true; a 81 src/dps8/dps8_math128.c bool islt_s128 (int128 a, int128 b) a 83 src/dps8/dps8_math128.c if (a.h < b.h) return true; a 84 src/dps8/dps8_math128.c if (a.h > b.h) return false; a 85 src/dps8/dps8_math128.c if (a.l < b.l) return true; a 89 src/dps8/dps8_math128.c bool isgt_s128 (int128 a, int128 b) a 91 src/dps8/dps8_math128.c if (a.h > b.h) return true; a 92 src/dps8/dps8_math128.c if (a.h < b.h) return false; a 93 src/dps8/dps8_math128.c if (a.l > b.l) return true; a 97 src/dps8/dps8_math128.c uint128 and_128 (uint128 a, uint128 b) a 99 src/dps8/dps8_math128.c return (uint128) {a.h & b.h, a.l & b.l}; a 102 src/dps8/dps8_math128.c int128 and_s128 (int128 a, uint128 b) a 104 src/dps8/dps8_math128.c return (int128) {a.h & (int64_t)b.h, a.l & b.l}; a 107 src/dps8/dps8_math128.c uint128 or_128 (uint128 a, uint128 b) a 109 src/dps8/dps8_math128.c return (uint128) {a.h | b.h, a.l | b.l}; a 112 src/dps8/dps8_math128.c uint128 xor_128 (uint128 a, uint128 b) a 114 src/dps8/dps8_math128.c return (uint128) {a.h ^ b.h, a.l ^ b.l}; a 117 src/dps8/dps8_math128.c uint128 complement_128 (uint128 a) a 119 src/dps8/dps8_math128.c return (uint128) {~ a.h, ~ a.l}; a 122 src/dps8/dps8_math128.c uint128 add_128 (uint128 a, uint128 b) a 128 src/dps8/dps8_math128.c uint64_t al63 = a.l & MASK63; // low 63 bits of a a 134 src/dps8/dps8_math128.c unsigned int al64 = (a.l >> 63) & 1; // bit 64 of a a 141 src/dps8/dps8_math128.c uint64_t h64 = a.h + b.h + c64; // compute the high a 145 src/dps8/dps8_math128.c uint128 subtract_128 (uint128 a, uint128 b) a 149 src/dps8/dps8_math128.c bool borrow = !! (b.l > a.l); a 150 src/dps8/dps8_math128.c uint128 res = construct_128 (a.h - b.h, a.l - b.l); a 157 src/dps8/dps8_math128.c uint128 negate_128 (uint128 a) a 159 src/dps8/dps8_math128.c return add_128 (complement_128 (a), construct_128 (0, 1)); a 162 src/dps8/dps8_math128.c int128 negate_s128 (int128 a) a 164 src/dps8/dps8_math128.c uint128 t = add_128 (complement_128 (cast_128 (a)), construct_128 (0, 1)); a 168 src/dps8/dps8_math128.c uint128 lshift_128 (uint128 a, unsigned int n) a 180 src/dps8/dps8_math128.c uint64_t keep = (a.l >> (64 - n)) & nmask; a 183 src/dps8/dps8_math128.c uint64_t l = a.l << n; a 186 src/dps8/dps8_math128.c uint64_t h = a.h << n; a 193 src/dps8/dps8_math128.c uint64_t h = a.l << (n - 64); a 197 src/dps8/dps8_math128.c int128 lshift_s128 (int128 a, unsigned int n) a 199 src/dps8/dps8_math128.c uint128 t = lshift_128 (cast_128 (a), n); a 203 src/dps8/dps8_math128.c uint128 rshift_128 (uint128 a, unsigned int n) a 206 src/dps8/dps8_math128.c a 211 src/dps8/dps8_math128.c a 213 src/dps8/dps8_math128.c a 219 src/dps8/dps8_math128.c a 231 src/dps8/dps8_math128.c a 232 src/dps8/dps8_math128.c a 236 src/dps8/dps8_math128.c a 253 src/dps8/dps8_math128.c uint64_t h = a.h; a 254 src/dps8/dps8_math128.c uint64_t l = a.l; a 255 src/dps8/dps8_math128.c uint64_t sign = a.h & SIGN64; a 269 src/dps8/dps8_math128.c int128 rshift_s128 (int128 a, unsigned int n) a 271 src/dps8/dps8_math128.c uint128 t = rshift_128 (cast_128 (a), n); a 475 src/dps8/dps8_math128.c uint128 multiply_128 (uint128 a, uint128 b) a 481 src/dps8/dps8_math128.c u[3] = (uint32_t) (a.h >> 32); a 482 src/dps8/dps8_math128.c u[2] = (uint32_t) a.h; a 483 src/dps8/dps8_math128.c u[1] = (uint32_t) (a.l >> 32); a 484 src/dps8/dps8_math128.c u[0] = (uint32_t) a.l; a 495 src/dps8/dps8_math128.c int128 multiply_s128 (int128 a, int128 b) a 501 src/dps8/dps8_math128.c u[3] = (uint32_t) (a.h >> 32); a 502 src/dps8/dps8_math128.c u[2] = (uint32_t) a.h; a 503 src/dps8/dps8_math128.c u[1] = (uint32_t) (a.l >> 32); a 504 src/dps8/dps8_math128.c u[0] = (uint32_t) a.l; a 516 src/dps8/dps8_math128.c uint128 divide_128 (uint128 a, uint128 b, uint128 * remp) a 521 src/dps8/dps8_math128.c u[0] = (uint16_t) a.l; a 522 src/dps8/dps8_math128.c u[1] = (uint16_t) (a.l >> 16); a 523 src/dps8/dps8_math128.c u[2] = (uint16_t) (a.l >> 32); a 524 src/dps8/dps8_math128.c u[3] = (uint16_t) (a.l >> 48); a 525 src/dps8/dps8_math128.c u[4] = (uint16_t) a.h; a 526 src/dps8/dps8_math128.c u[5] = (uint16_t) (a.h >> 16); a 527 src/dps8/dps8_math128.c u[6] = (uint16_t) (a.h >> 32); a 528 src/dps8/dps8_math128.c u[7] = (uint16_t) (a.h >> 48); a 571 src/dps8/dps8_math128.c uint128 divide_128_16 (uint128 a, uint16_t b, uint16_t * remp) a 576 src/dps8/dps8_math128.c u[0] = (uint16_t) a.l; a 577 src/dps8/dps8_math128.c u[1] = (uint16_t) (a.l >> 16); a 578 src/dps8/dps8_math128.c u[2] = (uint16_t) (a.l >> 32); a 579 src/dps8/dps8_math128.c u[3] = (uint16_t) (a.l >> 48); a 580 src/dps8/dps8_math128.c u[4] = (uint16_t) a.h; a 581 src/dps8/dps8_math128.c u[5] = (uint16_t) (a.h >> 16); a 582 src/dps8/dps8_math128.c u[6] = (uint16_t) (a.h >> 32); a 583 src/dps8/dps8_math128.c u[7] = (uint16_t) (a.h >> 48); a 607 src/dps8/dps8_math128.c uint128 divide_128_32 (uint128 a, uint32_t b, uint32_t * remp) a 612 src/dps8/dps8_math128.c u[0] = (uint16_t) a.l; a 613 src/dps8/dps8_math128.c u[1] = (uint16_t) (a.l >> 16); a 614 src/dps8/dps8_math128.c u[2] = (uint16_t) (a.l >> 32); a 615 src/dps8/dps8_math128.c u[3] = (uint16_t) (a.l >> 48); a 616 src/dps8/dps8_math128.c u[4] = (uint16_t) a.h; a 617 src/dps8/dps8_math128.c u[5] = (uint16_t) (a.h >> 16); a 618 src/dps8/dps8_math128.c u[6] = (uint16_t) (a.h >> 32); a 619 src/dps8/dps8_math128.c u[7] = (uint16_t) (a.h >> 48); a 658 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 660 src/dps8/dps8_math128.c uint128 r = and_128 (a, b); a 674 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 676 src/dps8/dps8_math128.c uint128 r = or_128 (a, b); a 690 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 691 src/dps8/dps8_math128.c uint128 r = complement_128 (a); a 705 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 707 src/dps8/dps8_math128.c uint128 r = add_128 (a, b); a 721 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 723 src/dps8/dps8_math128.c uint128 r = subtract_128 (a, b); a 737 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 738 src/dps8/dps8_math128.c uint128 r = negate_128 (a); a 752 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 755 src/dps8/dps8_math128.c bool r = isgt_128 (a, b); a 768 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 769 src/dps8/dps8_math128.c uint128 r = lshift_128 (a, n); a 783 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 784 src/dps8/dps8_math128.c uint128 r = rshift_128 (a, n); a 798 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 800 src/dps8/dps8_math128.c uint128 r = multiply_128 (a, b); a 814 src/dps8/dps8_math128.c int128 a = construct_s128 (ah, al); a 816 src/dps8/dps8_math128.c int128 r = multiply_s128 (a, b); a 831 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 833 src/dps8/dps8_math128.c uint128 res = divide_128_16 (a, b, & rem); a 848 src/dps8/dps8_math128.c uint128 a = construct_128 (ah, al); a 850 src/dps8/dps8_math128.c uint128 res = divide_128_32 (a, b, & rem); a 32 src/dps8/dps8_math128.h bool iseq_128 (uint128 a, uint128 b); a 33 src/dps8/dps8_math128.h bool isgt_128 (uint128 a, uint128 b); a 34 src/dps8/dps8_math128.h bool islt_128 (uint128 a, uint128 b); a 35 src/dps8/dps8_math128.h bool isge_128 (uint128 a, uint128 b); a 36 src/dps8/dps8_math128.h bool islt_s128 (int128 a, int128 b); a 37 src/dps8/dps8_math128.h bool isgt_s128 (int128 a, int128 b); a 38 src/dps8/dps8_math128.h uint128 and_128 (uint128 a, uint128 b); a 39 src/dps8/dps8_math128.h int128 and_s128 (int128 a, uint128 b); a 40 src/dps8/dps8_math128.h uint128 or_128 (uint128 a, uint128 b); a 41 src/dps8/dps8_math128.h uint128 xor_128 (uint128 a, uint128 b); a 42 src/dps8/dps8_math128.h uint128 add_128 (uint128 a, uint128 b); a 43 src/dps8/dps8_math128.h uint128 subtract_128 (uint128 a, uint128 b); a 44 src/dps8/dps8_math128.h uint128 multiply_128 (uint128 a, uint128 b); a 45 src/dps8/dps8_math128.h int128 multiply_s128 (int128 a, int128 b); a 46 src/dps8/dps8_math128.h uint128 divide_128_16 (uint128 a, uint16_t b, uint16_t * rem); a 47 src/dps8/dps8_math128.h uint128 divide_128_32 (uint128 a, uint32_t b, uint32_t * rem); a 48 src/dps8/dps8_math128.h uint128 divide_128 (uint128 a, uint128 b, uint128 * rem); a 49 src/dps8/dps8_math128.h uint128 complement_128 (uint128 a); a 50 src/dps8/dps8_math128.h uint128 negate_128 (uint128 a); a 51 src/dps8/dps8_math128.h int128 negate_s128 (int128 a); a 52 src/dps8/dps8_math128.h uint128 lshift_128 (uint128 a, unsigned int n); a 53 src/dps8/dps8_math128.h int128 lshift_s128 (int128 a, unsigned int n); a 54 src/dps8/dps8_math128.h uint128 rshift_128 (uint128 a, unsigned int n); a 55 src/dps8/dps8_math128.h int128 rshift_s128 (int128 a, unsigned int n); a 2024 src/dps8/dps8_scu.c word36 a, q; a 2026 src/dps8/dps8_scu.c a = 0; a 2028 src/dps8/dps8_scu.c putbits36_9 (& a, 0, maskab [0]); a 2029 src/dps8/dps8_scu.c putbits36_3 (& a, 9, (word3) up -> lower_store_size); a 2030 src/dps8/dps8_scu.c putbits36_4 (& a, 12, (word4) up -> onl); // A, A1, B, B1 online a 2031 src/dps8/dps8_scu.c putbits36_4 (& a, 16, (word4) scu_port_num); a 2032 src/dps8/dps8_scu.c putbits36_1 (& a, 21, (word1) config_switches[scu_unit_idx].mode); a 2033 src/dps8/dps8_scu.c putbits36_8 (& a, 22, (word8) up -> nea); a 2034 src/dps8/dps8_scu.c putbits36_1 (& a, 30, (word1) up -> interlace); a 2035 src/dps8/dps8_scu.c putbits36_1 (& a, 31, (word1) up -> lwr); a 2041 src/dps8/dps8_scu.c putbits36_1 (& a, 32, (word1) up -> port_enable [0]); a 2042 src/dps8/dps8_scu.c putbits36_1 (& a, 33, (word1) up -> port_enable [1]); a 2043 src/dps8/dps8_scu.c putbits36_1 (& a, 34, (word1) up -> port_enable [2]); a 2044 src/dps8/dps8_scu.c putbits36_1 (& a, 35, (word1) up -> port_enable [3]); a 2045 src/dps8/dps8_scu.c * rega = a; a 3669 src/dps8/dps8_sys.c static int dbgevent_compar (const void * a, const void * b) a 3671 src/dps8/dps8_sys.c struct dbgevent_t * ea = (struct dbgevent_t *) a; a 97 src/dps8/dps8_utils.c word1 a = GET_A(instruction); a 112 src/dps8/dps8_utils.c if (a) a 85 src/dps8/hdbg.h # define HDBGMRead(a, d, c) hdbgMRead (a, d, c) a 86 src/dps8/hdbg.h # define HDBGMWrite(a, d, c) hdbgMWrite (a, d, c) a 98 src/dps8/libtelnet.h # define TELNET_GNU_PRINTF(f,a) __attribute__((format(printf, f, a))) /* internal helper */ a 101 src/dps8/libtelnet.h # define TELNET_GNU_PRINTF(f,a) /* internal helper */ a 103 src/dps8/utarray.h # define utarray_init(a,_icd) do { \ a 104 src/dps8/utarray.h memset(a,0,sizeof(UT_array)); \ a 105 src/dps8/utarray.h (a)->icd=*_icd; \ a 108 src/dps8/utarray.h # define utarray_done(a) do { \ a 109 src/dps8/utarray.h if ((a)->n) { \ a 110 src/dps8/utarray.h if ((a)->icd.dtor) { \ a 112 src/dps8/utarray.h for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \ a 113 src/dps8/utarray.h (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \ a 116 src/dps8/utarray.h FREE((a)->d); \ a 118 src/dps8/utarray.h (a)->n=0; \ a 121 src/dps8/utarray.h # define utarray_new(a,_icd) do { \ a 122 src/dps8/utarray.h a=(UT_array*)malloc(sizeof(UT_array)); \ a 123 src/dps8/utarray.h utarray_init(a,_icd); \ a 126 src/dps8/utarray.h # define utarray_free(a) do { \ a 127 src/dps8/utarray.h utarray_done(a); \ a 128 src/dps8/utarray.h FREE(a); \ a 131 src/dps8/utarray.h # define utarray_reserve(a,by) do { \ a 132 src/dps8/utarray.h if (((a)->i+by) > ((a)->n)) { \ a 133 src/dps8/utarray.h while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \ a 134 src/dps8/utarray.h if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom(); \ a 138 src/dps8/utarray.h # define utarray_push_back(a,p) do { \ a 139 src/dps8/utarray.h utarray_reserve(a,1); \ a 140 src/dps8/utarray.h if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,(a)->i++), p); } \ a 141 src/dps8/utarray.h else { memcpy(_utarray_eltptr(a,(a)->i++), p, (a)->icd.sz); }; \ a 144 src/dps8/utarray.h # define utarray_pop_back(a) do { \ a 145 src/dps8/utarray.h if ((a)->icd.dtor) { (a)->icd.dtor( _utarray_eltptr(a,--((a)->i))); } \ a 146 src/dps8/utarray.h else { (a)->i--; } \ a 149 src/dps8/utarray.h # define utarray_extend_back(a) do { \ a 150 src/dps8/utarray.h utarray_reserve(a,1); \ a 151 src/dps8/utarray.h if ((a)->icd.init) { (a)->icd.init(_utarray_eltptr(a,(a)->i)); } \ a 152 src/dps8/utarray.h else { memset(_utarray_eltptr(a,(a)->i),0,(a)->icd.sz); } \ a 153 src/dps8/utarray.h (a)->i++; \ a 156 src/dps8/utarray.h # define utarray_len(a) ((a)->i) a 158 src/dps8/utarray.h # define utarray_eltptr(a,j) (((j) < (a)->i) ? _utarray_eltptr(a,j) : NULL) a 159 src/dps8/utarray.h # define _utarray_eltptr(a,j) ((char*)((a)->d + ((a)->icd.sz*(j) ))) a 161 src/dps8/utarray.h # define utarray_insert(a,p,j) do { \ a 162 src/dps8/utarray.h if (j > (a)->i) utarray_resize(a,j); \ a 163 src/dps8/utarray.h utarray_reserve(a,1); \ a 164 src/dps8/utarray.h if ((j) < (a)->i) { \ a 165 src/dps8/utarray.h memmove( _utarray_eltptr(a,(j)+1), _utarray_eltptr(a,j), \ a 166 src/dps8/utarray.h ((a)->i - (j))*((a)->icd.sz)); \ a 168 src/dps8/utarray.h if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,j), p); } \ a 169 src/dps8/utarray.h else { memcpy(_utarray_eltptr(a,j), p, (a)->icd.sz); }; \ a 170 src/dps8/utarray.h (a)->i++; \ a 173 src/dps8/utarray.h # define utarray_inserta(a,w,j) do { \ a 175 src/dps8/utarray.h if (j > (a)->i) utarray_resize(a,j); \ a 176 src/dps8/utarray.h utarray_reserve(a,utarray_len(w)); \ a 177 src/dps8/utarray.h if ((j) < (a)->i) { \ a 178 src/dps8/utarray.h memmove(_utarray_eltptr(a,(j)+utarray_len(w)), \ a 179 src/dps8/utarray.h _utarray_eltptr(a,j), \ a 180 src/dps8/utarray.h ((a)->i - (j))*((a)->icd.sz)); \ a 182 src/dps8/utarray.h if ((a)->icd.copy) { \ a 185 src/dps8/utarray.h (a)->icd.copy(_utarray_eltptr(a,j+_ut_i), _utarray_eltptr(w,_ut_i)); \ a 188 src/dps8/utarray.h memcpy(_utarray_eltptr(a,j), _utarray_eltptr(w,0), \ a 189 src/dps8/utarray.h utarray_len(w)*((a)->icd.sz)); \ a 191 src/dps8/utarray.h (a)->i += utarray_len(w); \ a 219 src/dps8/utarray.h # define utarray_erase(a,pos,len) do { \ a 220 src/dps8/utarray.h if ((a)->icd.dtor) { \ a 223 src/dps8/utarray.h (a)->icd.dtor(utarray_eltptr((a),pos+_ut_i)); \ a 226 src/dps8/utarray.h if ((a)->i > (pos+len)) { \ a 227 src/dps8/utarray.h memmove( _utarray_eltptr((a),pos), _utarray_eltptr((a),pos+len), \ a 228 src/dps8/utarray.h (((a)->i)-(pos+len))*((a)->icd.sz)); \ a 230 src/dps8/utarray.h (a)->i -= (len); \ a 233 src/dps8/utarray.h # define utarray_renew(a,u) do { \ a 234 src/dps8/utarray.h if (a) utarray_clear(a); \ a 235 src/dps8/utarray.h else utarray_new((a),(u)); \ a 238 src/dps8/utarray.h # define utarray_clear(a) do { \ a 239 src/dps8/utarray.h if ((a)->i > 0) { \ a 240 src/dps8/utarray.h if ((a)->icd.dtor) { \ a 242 src/dps8/utarray.h for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \ a 243 src/dps8/utarray.h (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \ a 246 src/dps8/utarray.h (a)->i = 0; \ a 250 src/dps8/utarray.h # define utarray_sort(a,cmp) do { \ a 251 src/dps8/utarray.h qsort((a)->d, (a)->i, (a)->icd.sz, cmp); \ a 254 src/dps8/utarray.h # define utarray_find(a,v,cmp) bsearch((v),(a)->d,(a)->i,(a)->icd.sz,cmp) a 255 src/dps8/utarray.h # define utarray_front(a) (((a)->i) ? (_utarray_eltptr(a,0)) : NULL) a 256 src/dps8/utarray.h # define utarray_next(a,e) (((e)==NULL) ? utarray_front(a) : ((((a)->i) > (utarray_eltidx(a,e)+1)) ? _utarray_eltptr(a,utarray_eltidx(a,e)+1) : NULL)) a 257 src/dps8/utarray.h # define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL)) a 258 src/dps8/utarray.h # define utarray_back(a) (((a)->i) ? (_utarray_eltptr(a,(a)->i-1)) : NULL) a 259 src/dps8/utarray.h # define utarray_eltidx(a,e) (((char*)(e) >= (char*)((a)->d)) ? (((char*)(e) - (char*)((a)->d))/(ssize_t)(a)->icd.sz) : -1) a 459 src/dps8/uthash.h # define HASH_JEN_MIX(a,b,c) \ a 461 src/dps8/uthash.h a -= b; a -= c; a ^= ( c >> 13 ); \ a 462 src/dps8/uthash.h b -= c; b -= a; b ^= ( a << 8 ); \ a 463 src/dps8/uthash.h c -= a; c -= b; c ^= ( b >> 13 ); \ a 464 src/dps8/uthash.h a -= b; a -= c; a ^= ( c >> 12 ); \ a 465 src/dps8/uthash.h b -= c; b -= a; b ^= ( a << 16 ); \ a 466 src/dps8/uthash.h c -= a; c -= b; c ^= ( b >> 5 ); \ a 467 src/dps8/uthash.h a -= b; a -= c; a ^= ( c >> 3 ); \ a 468 src/dps8/uthash.h b -= c; b -= a; b ^= ( a << 10 ); \ a 469 src/dps8/uthash.h c -= a; c -= b; c ^= ( b >> 15 ); \ a 660 src/dps8/uthash.h # define HASH_KEYCMP(a,b,len) memcmp(a,b,len) a 104 src/dps8/utlist.h # define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); } a 112 src/dps8/utlist.h # define _CASTASGN(a,b) (a)=(b) a 120 src/simh/scp.c # define MAX(a,b) (((a) >= (b)) ? (a) : (b)) a 2015 src/simh/scp.c CTAB * const *a = (CTAB * const *)pa; a 2018 src/simh/scp.c return strcmp((*a)->name, (*b)->name); a 4783 src/simh/scp.c # define S_xstr(a) S_str(a) a 4784 src/simh/scp.c # define S_str(a) #a a 6675 src/simh/scp.c int32 i, rdx, a, lim; a 6690 src/simh/scp.c for (i = a = 0; a < lim; ) { a 6691 src/simh/scp.c sim_printf ("%d:\t", a); a 6692 src/simh/scp.c if ((r = fprint_sym (stdout, a, &sim_eval[i], dptr->units, sim_switches)) > 0) a 6695 src/simh/scp.c if ((r = fprint_sym (sim_log, a, &sim_eval[i], dptr->units, sim_switches)) > 0) a 6700 src/simh/scp.c a = a + 1 - r; a 6701 src/simh/scp.c else a = a + dptr->aincr; a 6702 src/simh/scp.c i = a / dptr->aincr; a 335 src/simh/sim_defs.h t_stat (*examine)(t_value *v, t_addr a, UNIT *up, a 337 src/simh/sim_defs.h t_stat (*deposit)(t_value v, t_addr a, UNIT *up, a 43 src/simh/sim_fio.h # define fxread(a,b,c,d) sim_fread (a, b, c, d) a 44 src/simh/sim_fio.h # define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d) a 164 src/simh/sim_sock.c struct addrinfo *a, *an; a 166 src/simh/sim_sock.c for (a=ai; a != NULL; a=an) { a 167 src/simh/sim_sock.c an = a->ai_next; a 168 src/simh/sim_sock.c FREE (a->ai_canonname); a 169 src/simh/sim_sock.c FREE (a->ai_addr); a 170 src/simh/sim_sock.c FREE (a); a 60 src/simh/sim_timer.c # define MIN(a,b) (((a) < (b)) ? (a) : (b)) a 63 src/simh/sim_timer.c # define MAX(a,b) (((a) > (b)) ? (a) : (b))