word72 230 src/dps8/dps8.h typedef word72 float72; // double precision float word72 292 src/dps8/dps8.h # define YPAIRTO72(ypair) (((((word72)(ypair[0] & DMASK)) << 36) | \ word72 9253 src/dps8/dps8_eis.c static bool sign9n(word72 n128, int N) word72 9266 src/dps8/dps8_eis.c word72 sgnmask = lshift_128 (construct_128 (0, 1), (uint) (N * 9 - 1)); word72 9269 src/dps8/dps8_eis.c word72 sgnmask = (word72)1 << ((N * 9) - 1); word72 9278 src/dps8/dps8_eis.c static word72s signExt9(word72 n128, int N) word72 9315 src/dps8/dps8_eis.c word72 x = construct_128 (0, 0); word72 9317 src/dps8/dps8_eis.c word72 x = 0; word72 9622 src/dps8/dps8_eis.c word72 x = cast_128 (e->x); word72 9644 src/dps8/dps8_eis.c word72 x = (word72)e->x; word72 9649 src/dps8/dps8_eis.c x = ((word72) (- (word72s) x)) & MASK72; word72 10070 src/dps8/dps8_eis.c word72 msk = subtract_128 (lshift_128 (construct_128 (0, 1), (9*e->N2-1)),construct_128 (0, 1)); word72 10072 src/dps8/dps8_eis.c word72 msk = ((word72)1<<(9*e->N2-1))-1; // excluding sign word72 10091 src/dps8/dps8_eis.c word72 x = construct_128 (0, 0); word72 10107 src/dps8/dps8_eis.c word72 x = 0; word72 10118 src/dps8/dps8_eis.c x = (word72) (- (word72s) x); // no need to mask it word72 121 src/dps8/dps8_hw_consts.h # define MAX72 (((word72)1U << 72) - 1U) // 72 1's word72 146 src/dps8/dps8_hw_consts.h # define SIGN72 ((word72)1U << 71) word72 148 src/dps8/dps8_hw_consts.h # define BIT68 ((word72)1U << 67) word72 149 src/dps8/dps8_hw_consts.h # define BIT69 ((word72)1U << 68) word72 150 src/dps8/dps8_hw_consts.h # define BIT70 ((word72)1U << 69) word72 151 src/dps8/dps8_hw_consts.h # define BIT71 ((word72)1U << 70) // next to the sign bit word72 152 src/dps8/dps8_hw_consts.h # define BIT73 ((word72)1U << 72) // carry out bit from 72 bit arithmetic word72 153 src/dps8/dps8_hw_consts.h # define BIT74 ((word72)1U << 73) // carry out bit from 73 bit arithmetic word72 155 src/dps8/dps8_hw_consts.h # define MASK68 (((word72)1U << 68) - 1U) // Hex mode mantissa normalization mask word72 156 src/dps8/dps8_hw_consts.h # define MASK70 (((word72)1U << 70) - 1U) word72 157 src/dps8/dps8_hw_consts.h # define MASK71 (((word72)1U << 71) - 1U) word72 158 src/dps8/dps8_hw_consts.h # define MASK72 (((word72)1U << 72) - 1U) word72 159 src/dps8/dps8_hw_consts.h # define ZEROEXT72 (((word72)1U << 72) - 1U) // mask to zero extend a 72 => 128 int word72 187 src/dps8/dps8_hw_consts.h # define MASKBITS72(x) ( ~(~((word72)0)<<x) ) // lower (x) bits all ones word72 200 src/dps8/dps8_hw_consts.h # define SETHI72(a,b) ((a) &= MASK36, (a) |= ((((word72)(b) & MASK36)) << 36)) word72 201 src/dps8/dps8_hw_consts.h # define SETLO72(a,b) ((a) &= MASK36 << 36, (a) |= ((word72)(b) & MASK36)) word72 320 src/dps8/dps8_hw_consts.h static inline int128 SIGNEXT72_128 (word72 w) word72 379 src/dps8/dps8_hw_consts.h static inline word72 SIGNEXT36_72 (word36 w) word72 392 src/dps8/dps8_hw_consts.h return (w | ((word72) DMASK) << 36) & MASK72; word72 2836 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 2837 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 3317 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 3318 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 3679 src/dps8/dps8_ins.c word72 tmp72 = convert_to_word72 (cpu.Ypair[0], cpu.Ypair[1]); word72 4596 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 4617 src/dps8/dps8_ins.c word72 tmp72 = SIGNEXT36_72 (cpu.CY); // sign extend Cy word72 4641 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 4866 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 4909 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5118 src/dps8/dps8_ins.c word72 tmp72 = multiply_128 (SIGNEXT36_72 (cpu.rA), SIGNEXT36_72 (cpu.CY)); word72 5124 src/dps8/dps8_ins.c word72 tmp72 = (word72) (((word72s) SIGNEXT36_72 (cpu.rA)) * ((word72s) SIGNEXT36_72 (cpu.CY))); word72 5167 src/dps8/dps8_ins.c convert_to_word36 ((word72)prod, &cpu.rA, &cpu.rQ); word72 5388 src/dps8/dps8_ins.c word72 tmp72 = convert_to_word72 (cpu.rA, cpu.rQ); word72 5397 src/dps8/dps8_ins.c tmp72 = (word72) (-(word72s) tmp72); word72 5495 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5496 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 5681 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5682 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 5921 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 5922 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 6004 src/dps8/dps8_ins.c word72 tmp72 = YPAIRTO72 (cpu.Ypair); word72 6006 src/dps8/dps8_ins.c word72 trAQ = convert_to_word72 (cpu.rA, cpu.rQ); word72 7119 src/dps8/dps8_ins.c word72 big = convert_to_word72 (cpu.rA, cpu.rQ); word72 77 src/dps8/dps8_math.c word72 Mant = convert_to_word72 (cpu.rA, cpu.rQ); word72 107 src/dps8/dps8_math.c if (Mant & ((word72)1 << n)) word72 129 src/dps8/dps8_math.c word72 Mant = convert_to_word72 (cpu.rA, cpu.rQ); word72 159 src/dps8/dps8_math.c if (Mant & ((word72)1 << n)) word72 187 src/dps8/dps8_math.c word72 result = 0; word72 219 src/dps8/dps8_math.c result = -result & (((word72)1 << 64) - 1); word72 308 src/dps8/dps8_math.c word72 result = 0; word72 335 src/dps8/dps8_math.c result = -result & (((word72)1 << 72) - 1); word72 485 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 488 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 490 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; // 28-bit mantissa (incl sign) word72 521 src/dps8/dps8_math.c m2 = ((word72) (- (word72s) m2)) & MASK72; word72 605 src/dps8/dps8_math.c word72 m3; word72 620 src/dps8/dps8_math.c word72 s = and_128 (m3, SIGN72); // save the sign bit word72 630 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 638 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 652 src/dps8/dps8_math.c word72 s = m3 & SIGN72; // save the sign bit word72 662 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 669 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 750 src/dps8/dps8_math.c word72 s = and_128 (m, SIGN72); // save the sign bit word72 787 src/dps8/dps8_math.c word72 s = m & SIGN72; // save the sign bit word72 855 src/dps8/dps8_math.c bool s = (m & SIGN72) != (word72)0; ///< save sign bit word72 989 src/dps8/dps8_math.c word72 995 src/dps8/dps8_math.c word72 1082 src/dps8/dps8_math.c word72 m = convert_to_word72 (cpu.rA, cpu.rQ); word72 1111 src/dps8/dps8_math.c m = (word72) (- (word72s) m); word72 1135 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 1138 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 1140 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; ///< 28-bit mantissa (incl sign) word72 1190 src/dps8/dps8_math.c word72 m3a = and_128 (rshift_128 (cast_128 (m3), 98u - 71u), MASK72); word72 1193 src/dps8/dps8_math.c word72 m3a = ((word72) (m3 >> (98-71))) & MASK72; word72 1267 src/dps8/dps8_math.c word72 m1; word72 1270 src/dps8/dps8_math.c word72 m2; word72 1282 src/dps8/dps8_math.c m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; ///< 28-bit mantissa (incl sign) word72 1311 src/dps8/dps8_math.c m2 &= (word72)0777777777400 << 36; word72 1313 src/dps8/dps8_math.c m1 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; ///< 28-bit mantissa (incl sign) word72 1440 src/dps8/dps8_math.c word72 m3; word72 1446 src/dps8/dps8_math.c word72 m3 = (m1 >> (44-35)) / (m2 >> 44); word72 1553 src/dps8/dps8_math.c word72 m = convert_to_word72 (cpu.rA, cpu.rQ); word72 1584 src/dps8/dps8_math.c m &= ((word72)0777777777400 << 36); word72 1656 src/dps8/dps8_math.c m &= ((word72)0777777777400 << 36); word72 1691 src/dps8/dps8_math.c word72 m1= lshift_128 (construct_128 (0, cpu.rA & 0777777777400), 36); word72 1693 src/dps8/dps8_math.c word72 m1 = ((word72)cpu.rA & 0777777777400LL) << 36; word72 1699 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.CY, 8)), 44); word72 1701 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; word72 1725 src/dps8/dps8_math.c bool s = (m1 & SIGN72) != (word72)0; word72 1758 src/dps8/dps8_math.c bool s = (m2 & SIGN72) != (word72)0; word72 1830 src/dps8/dps8_math.c word72 m1 = lshift_128 (construct_128 (0, cpu.rA & 0777777777400), 36); word72 1832 src/dps8/dps8_math.c word72 m1 = ((word72)cpu.rA & 0777777777400LL) << 36; word72 1839 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.CY, 8)), 44); word72 1841 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.CY, 8)) << 44; word72 1859 src/dps8/dps8_math.c bool s = (m1 & SIGN72) != (word72)0; ///< save sign bit word72 1892 src/dps8/dps8_math.c bool s = (m2 & SIGN72) != (word72)0; ///< save sign bit word72 1946 src/dps8/dps8_math.c word72 1949 src/dps8/dps8_math.c word72 1950 src/dps8/dps8_math.c word72 1956 src/dps8/dps8_math.c word72 1996 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 2001 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 2004 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2005 src/dps8/dps8_math.c m2 |= (word72) cpu.Ypair[1] << 8; word72 2041 src/dps8/dps8_math.c m2 = ((word72) (- (word72s) m2)) & MASK72; word72 2064 src/dps8/dps8_math.c bool s = (m1 & SIGN72) != (word72)0; word72 2097 src/dps8/dps8_math.c bool s = (m2 & SIGN72) != (word72)0; ///< save sign bit word72 2127 src/dps8/dps8_math.c word72 m3 = Add72b (cpup, m1, m2, 0, I_CARRY, & cpu.cu.IR, & ovf); word72 2142 src/dps8/dps8_math.c bool s = (m3 & SIGN72) != (word72)0; word72 2164 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 2169 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 2178 src/dps8/dps8_math.c word72 signbit = and_128 (m3, SIGN72); word72 2183 src/dps8/dps8_math.c word72 signbit = m3 & SIGN72; word72 2247 src/dps8/dps8_math.c word72 2306 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ); word72 2315 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 2318 src/dps8/dps8_math.c word72 m2 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2319 src/dps8/dps8_math.c m2 |= (word72) cpu.Ypair[1] << 8; word72 2382 src/dps8/dps8_math.c word72 m3a = and_128 (add_128 (cast_128 (m3h), cast_128 (m3l)), MASK72); word72 2398 src/dps8/dps8_math.c word72 m3a = ((word72) (m3h+m3l)) & MASK72; word72 2472 src/dps8/dps8_math.c word72 m1; word72 2475 src/dps8/dps8_math.c word72 m2; word72 2489 src/dps8/dps8_math.c m2 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2490 src/dps8/dps8_math.c m2 |= (word72) cpu.Ypair[1] << 8; word72 2529 src/dps8/dps8_math.c m1 = ((word72) getbits36_28 (cpu.Ypair[0], 8)) << 44; word72 2530 src/dps8/dps8_math.c m1 |= (word72) cpu.Ypair[1] << 8; word72 2650 src/dps8/dps8_math.c word72 m3 = divide_128 (lshift_128 (m1, 63-8), rshift_128 (m2, 8), NULL); word72 2652 src/dps8/dps8_math.c word72 m3 = ((uint128)m1 << (63-8)) / ((uint128)m2 >> 8); word72 3328 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA, cpu.rQ & 0777777777400LL); word72 3333 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.Ypair[0], 8)), (36 + 8)); word72 3336 src/dps8/dps8_math.c word72 m2 = (word72) getbits36_28 (cpu.Ypair[0], 8) << (36 + 8); word72 3463 src/dps8/dps8_math.c word72 m1 = convert_to_word72 (cpu.rA & MASK36, cpu.rQ & 0777777777400LL); word72 3468 src/dps8/dps8_math.c word72 m2 = lshift_128 (construct_128 (0, getbits36_28 (cpu.Ypair[0], 8)), (36 + 8)); word72 3471 src/dps8/dps8_math.c word72 m2 = (word72) getbits36_28 (cpu.Ypair[0], 8) << (36 + 8); word72 496 src/dps8/dps8_utils.c word72 Add72b (cpu_state_t * cpup, word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf) word72 610 src/dps8/dps8_utils.c word72 Sub72b (cpu_state_t * cpup, word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf) word72 689 src/dps8/dps8_utils.c word74 res = (word72) (((word72s) op1e) - ((word72s) op2e) - ((word72s) ci)); word72 964 src/dps8/dps8_utils.c word72 convert_to_word72(word36 even, word36 odd) word72 969 src/dps8/dps8_utils.c return ((word72)even << 36) | (word72)odd; word72 973 src/dps8/dps8_utils.c void convert_to_word36 (word72 src, word36 *even, word36 *odd) word72 1107 src/dps8/dps8_utils.c void cmp72(cpu_state_t * cpup, word72 op1, word72 op2, word18 *flags) word72 47 src/dps8/dps8_utils.h word72 convert_to_word72 (word36 even, word36 odd); word72 48 src/dps8/dps8_utils.h void convert_to_word36 (word72 src, word36 *even, word36 *odd); word72 62 src/dps8/dps8_utils.h void cmp72(cpu_state_t * cpup, word72 op1, word72 op2, word18 *flags); word72 104 src/dps8/dps8_utils.h word72 793 src/dps8/dps8_utils.h static inline void putbits72 (word72 * x, uint p, uint n, word72 val) word72 815 src/dps8/dps8_utils.h word72 mask = construct_128 (highmask, lowmask); word72 817 src/dps8/dps8_utils.h word72 notmask = complement_128 (mask); word72 820 src/dps8/dps8_utils.h word72 mask = ~ ((~(word72)0) << n); // n low bits on word72 893 src/dps8/dps8_utils.h word72 Add72b (cpu_state_t * cpup, word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf); word72 894 src/dps8/dps8_utils.h word72 Sub72b (cpu_state_t * cpup, word72 op1, word72 op2, word1 carryin, word18 flagsToSet, word18 * flags, bool * ovf);