word72 221 src/dps8/dps8.h typedef word72 float72; // double precision float word72 283 src/dps8/dps8.h # define YPAIRTO72(ypair) (((((word72)(ypair[0] & DMASK)) << 36) | \ word72 9200 src/dps8/dps8_eis.c static bool sign9n(word72 n128, int N) word72 9214 src/dps8/dps8_eis.c word72 sgnmask = lshift_128 (construct_128 (0, 1), (uint) (N * 9 - 1)); word72 9217 src/dps8/dps8_eis.c word72 sgnmask = (word72)1 << ((N * 9) - 1); word72 9226 src/dps8/dps8_eis.c static word72s signExt9(word72 n128, int N) word72 9263 src/dps8/dps8_eis.c word72 x = construct_128 (0, 0); word72 9265 src/dps8/dps8_eis.c word72 x = 0; word72 9570 src/dps8/dps8_eis.c word72 x = cast_128 (e->x); word72 9592 src/dps8/dps8_eis.c word72 x = (word72)e->x; word72 9597 src/dps8/dps8_eis.c x = ((word72) (- (word72s) x)) & MASK72; word72 10008 src/dps8/dps8_eis.c word72 msk = subtract_128 (lshift_128 (construct_128 (0, 1), (9*e->N2-1)),construct_128 (0, 1)); word72 10010 src/dps8/dps8_eis.c word72 msk = ((word72)1<<(9*e->N2-1))-1; // excluding sign word72 10028 src/dps8/dps8_eis.c word72 x = construct_128 (0, 0); word72 10044 src/dps8/dps8_eis.c word72 x = 0; word72 10055 src/dps8/dps8_eis.c x = (word72) (- (word72s) x); // no need to mask it word72 124 src/dps8/dps8_hw_consts.h # define MAX72 (((word72)1U << 72) - 1U) // 72 1's word72 149 src/dps8/dps8_hw_consts.h # define SIGN72 ((word72)1U << 71) word72 151 src/dps8/dps8_hw_consts.h # define BIT68 ((word72)1U << 67) word72 152 src/dps8/dps8_hw_consts.h # define BIT69 ((word72)1U << 68) word72 153 src/dps8/dps8_hw_consts.h # define BIT70 ((word72)1U << 69) word72 154 src/dps8/dps8_hw_consts.h # define BIT71 ((word72)1U << 70) // next to the sign bit word72 155 src/dps8/dps8_hw_consts.h # define BIT73 ((word72)1U << 72) // carry out bit from 72 bit arithmetic word72 156 src/dps8/dps8_hw_consts.h # define BIT74 ((word72)1U << 73) // carry out bit from 73 bit arithmetic word72 158 src/dps8/dps8_hw_consts.h # define MASK68 (((word72)1U << 68) - 1U) // Hex mode mantissa normalization mask word72 159 src/dps8/dps8_hw_consts.h # define MASK70 (((word72)1U << 70) - 1U) word72 160 src/dps8/dps8_hw_consts.h # define MASK71 (((word72)1U << 71) - 1U) word72 161 src/dps8/dps8_hw_consts.h # define MASK72 (((word72)1U << 72) - 1U) word72 162 src/dps8/dps8_hw_consts.h # define ZEROEXT72 (((word72)1U << 72) - 1U) // mask to zero extend a 72 => 128 int word72 190 src/dps8/dps8_hw_consts.h # define MASKBITS72(x) ( ~(~((word72)0)<<x) ) // lower (x) bits all ones word72 203 src/dps8/dps8_hw_consts.h # define SETHI72(a,b) ((a) &= MASK36, (a) |= ((((word72)(b) & MASK36)) << 36)) word72 204 src/dps8/dps8_hw_consts.h # define SETLO72(a,b) ((a) &= MASK36 << 36, (a) |= ((word72)(b) & MASK36)) word72 323 src/dps8/dps8_hw_consts.h static inline int128 SIGNEXT72_128 (word72 w) word72 382 src/dps8/dps8_hw_consts.h static inline word72 SIGNEXT36_72 (word36 w) word72 395 src/dps8/dps8_hw_consts.h return (w | ((word72) DMASK) << 36) & MASK72; word72 2751 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 2752 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 3204 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 3205 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 3538 src/dps8/dps8_ins.c word72 tmp72 = convert_to_word72 (cpu.Ypair[0], cpu.Ypair[1]); word72 4266 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 4287 src/dps8/dps8_ins.c word72 tmp72 = SIGNEXT36_72 (cpu.CY); // sign extend Cy word72 4311 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 4536 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 4579 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 4788 src/dps8/dps8_ins.c word72 tmp72 = multiply_128 (SIGNEXT36_72 (cpu.rA), SIGNEXT36_72 (cpu.CY)); word72 4794 src/dps8/dps8_ins.c word72 tmp72 = (word72) (((word72s) SIGNEXT36_72 (cpu.rA)) * ((word72s) SIGNEXT36_72 (cpu.CY))); word72 4837 src/dps8/dps8_ins.c convert_to_word36 ((word72)prod, &cpu.rA, &cpu.rQ); word72 5058 src/dps8/dps8_ins.c word72 tmp72 = convert_to_word72 (cpu.rA, cpu.rQ); word72 5067 src/dps8/dps8_ins.c tmp72 = (word72) (-(word72s) tmp72); word72 5165 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5166 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 5351 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5352 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 5591 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5592 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 5674 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5676 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 6789 src/dps8/dps8_ins.c word72 big = convert_to_word72 (cpu.rA, cpu.rQ); word72 76 src/dps8/dps8_math.c word72 Mant = convert_to_word72 (cpu.rA, cpu.rQ); word72 106 src/dps8/dps8_math.c if (Mant & ((word72)1 << n)) word72 128 src/dps8/dps8_math.c word72 Mant = convert_to_word72 (cpu.rA, cpu.rQ); word72 158 src/dps8/dps8_math.c if (Mant & ((word72)1 << n)) word72 186 src/dps8/dps8_math.c word72 result = 0; word72 216 src/dps8/dps8_math.c result = -result & (((word72)1 << 64) - 1); word72 304 src/dps8/dps8_math.c word72 result = 0; word72 330 src/dps8/dps8_math.c result = -result & (((word72)1 << 72) - 1); word72 480 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 483 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, (uint64_t) getbits36_28 (cpu.CY, 8)), 44u); // 28-bit mantissa (incl sign) word72 485 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; // 28-bit mantissa (incl sign) word72 516 src/dps8/dps8_math.c m2 = ((word72) (- (word72s) m2)) & MASK72; word72 600 src/dps8/dps8_math.c word72 m3; word72 615 src/dps8/dps8_math.c word72 s = and_128 (m3, SIGN72); // save the sign bit word72 625 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 633 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 647 src/dps8/dps8_math.c word72 s = m3 & SIGN72; // save the sign bit word72 657 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 664 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 745 src/dps8/dps8_math.c word72 s = and_128 (m, SIGN72); // save the sign bit word72 782 src/dps8/dps8_math.c word72 s = m & SIGN72; // save the sign bit word72 850 src/dps8/dps8_math.c bool s = (m & SIGN72) != (word72)0; ///< save sign bit word72 984 src/dps8/dps8_math.c word72 990 src/dps8/dps8_math.c word72 1078 src/dps8/dps8_math.c word72 m = convert_to_word72 (cpu.rA, cpu.rQ); word72 1107 src/dps8/dps8_math.c m = (word72) (- (word72s) m); word72 1131 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 1134 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, (uint64_t) getbits36_28 (cpu.CY, 8)), 44u); // 28-bit mantissa (incl sign) word72 1136 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; ///< 28-bit mantissa (incl sign) word72 1186 src/dps8/dps8_math.c word72 m3a = and_128 (rshift_128 (cast_128 (m3), 98u - 71u), MASK72); word72 1189 src/dps8/dps8_math.c word72 m3a = ((word72) (m3 >> (98-71))) & MASK72; word72 1263 src/dps8/dps8_math.c word72 m1; word72 1266 src/dps8/dps8_math.c word72 m2; word72 1278 src/dps8/dps8_math.c m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; ///< 28-bit mantissa (incl sign) word72 1307 src/dps8/dps8_math.c m2 &= (word72)0777777777400 << 36; word72 1309 src/dps8/dps8_math.c m1 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; ///< 28-bit mantissa (incl sign) word72 1436 src/dps8/dps8_math.c word72 m3; word72 1442 src/dps8/dps8_math.c word72 m3 = (m1 >> (44-35)) / (m2 >> 44); word72 1549 src/dps8/dps8_math.c word72 m = convert_to_word72 (cpu.rA, cpu.rQ); word72 1580 src/dps8/dps8_math.c m &= ((word72)0777777777400 << 36); word72 1652 src/dps8/dps8_math.c m &= ((word72)0777777777400 << 36); word72 1687 src/dps8/dps8_math.c word72 m1= lshift_128 (construct_128 (0, cpu.rA & 0777777777400), 36); word72 1689 src/dps8/dps8_math.c word72 m1 = ((word72)cpu.rA & 0777777777400LL) << 36; word72 1695 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.CY, 8)), 44); word72 1697 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; word72 1721 src/dps8/dps8_math.c bool s = (m1 & SIGN72) != (word72)0; word72 1754 src/dps8/dps8_math.c bool s = (m2 & SIGN72) != (word72)0; word72 1826 src/dps8/dps8_math.c word72 m1 = lshift_128 (construct_128 (0, cpu.rA & 0777777777400), 36); word72 1828 src/dps8/dps8_math.c word72 m1 = ((word72)cpu.rA & 0777777777400LL) << 36; word72 1835 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.CY, 8)), 44); word72 1837 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; word72 1855 src/dps8/dps8_math.c bool s = (m1 & SIGN72) != (word72)0; ///< save sign bit word72 1888 src/dps8/dps8_math.c bool s = (m2 & SIGN72) != (word72)0; ///< save sign bit word72 1942 src/dps8/dps8_math.c word72 1945 src/dps8/dps8_math.c word72 1946 src/dps8/dps8_math.c word72 1952 src/dps8/dps8_math.c word72 1992 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 1997 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, (uint64_t) getbits36_28 (cpu.Ypair[0], 8)), 44u); // 28-bit mantissa (incl sign) word72 2000 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2001 src/dps8/dps8_math.c m2 |= (word72) cpu.Ypair[1] << 8; word72 2038 src/dps8/dps8_math.c m2 = ((word72) (- (word72s) m2)) & MASK72; word72 2061 src/dps8/dps8_math.c bool s = (m1 & SIGN72) != (word72)0; word72 2094 src/dps8/dps8_math.c bool s = (m2 & SIGN72) != (word72)0; ///< save sign bit word72 2124 src/dps8/dps8_math.c word72 m3 = Add72b (m1, m2, 0, I_CARRY, & cpu.cu.IR, & ovf); word72 2139 src/dps8/dps8_math.c bool s = (m3 & SIGN72) != (word72)0; word72 2161 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 2166 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 2175 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 2180 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 2244 src/dps8/dps8_math.c word72 2304 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 2312 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, (uint64_t) getbits36_28 (cpu.Ypair[0], 8)), 44u); // 28-bit mantissa (incl sign) word72 2315 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2316 src/dps8/dps8_math.c m2 |= (word72) cpu.Ypair[1] << 8; word72 2378 src/dps8/dps8_math.c word72 m3a = and_128 (add_128 (cast_128 (m3h), cast_128 (m3l)), MASK72); word72 2394 src/dps8/dps8_math.c word72 m3a = ((word72) (m3h+m3l)) & MASK72; word72 2468 src/dps8/dps8_math.c word72 m1; word72 2471 src/dps8/dps8_math.c word72 m2; word72 2485 src/dps8/dps8_math.c m2 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2486 src/dps8/dps8_math.c m2 |= (word72) cpu.Ypair[1] << 8; word72 2524 src/dps8/dps8_math.c m1 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2525 src/dps8/dps8_math.c m1 |= (word72) cpu.Ypair[1] << 8; word72 2645 src/dps8/dps8_math.c word72 m3 = divide_128 (lshift_128 (m1, 63-8), rshift_128 (m2, 8), NULL); word72 2647 src/dps8/dps8_math.c word72 m3 = ((uint128)m1 << (63-8)) / ((uint128)m2 >> 8); word72 3317 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ & 0777777777400LL); word72 3322 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.Ypair[0], 8)), (36 + 8)); word72 3325 src/dps8/dps8_math.c word72 m2 = (word72) getbits36_28 (cpu.Ypair[0], 8) << (36 + 8); word72 3452 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA & MASK36, cpu.rQ & 0777777777400LL); word72 3457 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.Ypair[0], 8)), (36 + 8)); word72 3460 src/dps8/dps8_math.c word72 m2 = (word72) getbits36_28 (cpu.Ypair[0], 8) << (36 + 8); word72 497 src/dps8/dps8_utils.c word72 Add72b (word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf) word72 611 src/dps8/dps8_utils.c word72 Sub72b (word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf) word72 670 src/dps8/dps8_utils.c word74 res = (word72) (((word72s) op1e) - ((word72s) op2e) - ((word72s) ci)); word72 941 src/dps8/dps8_utils.c word72 convert_to_word72(word36 even, word36 odd) word72 946 src/dps8/dps8_utils.c return ((word72)even << 36) | (word72)odd; word72 950 src/dps8/dps8_utils.c void convert_to_word36 (word72 src, word36 *even, word36 *odd) word72 1084 src/dps8/dps8_utils.c void cmp72(word72 op1, word72 op2, word18 *flags) word72 50 src/dps8/dps8_utils.h word72 convert_to_word72 (word36 even, word36 odd); word72 51 src/dps8/dps8_utils.h void convert_to_word36 (word72 src, word36 *even, word36 *odd); word72 65 src/dps8/dps8_utils.h void cmp72(word72 op1, word72 op2, word18 *flags); word72 107 src/dps8/dps8_utils.h word72 796 src/dps8/dps8_utils.h static inline void putbits72 (word72 * x, uint p, uint n, word72 val) word72 818 src/dps8/dps8_utils.h word72 mask = construct_128 (highmask, lowmask); word72 820 src/dps8/dps8_utils.h word72 notmask = complement_128 (mask); word72 823 src/dps8/dps8_utils.h word72 mask = ~ ((~(word72)0) << n); // n low bits on word72 896 src/dps8/dps8_utils.h word72 Add72b (word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf); word72 897 src/dps8/dps8_utils.h word72 Sub72b (word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf);