2 /** Should be at least 16 bit. */
3 typedef unsigned short tc_value_part;
5 /** Should be at least 32 bit */
9 * We need 64 + 2 bit for floating point support
11 #define TC_VALUE_SIZE 80
12 #define TC_VALUE_PART_SIZE 16
13 #define TC_VALUE_PART_MASK 0xFFFF
14 #define TC_VALUE_PART_MAX_UINT 0xFFFF
15 #define TC_VALUE_PART_SIGN_BIT 0x8000
17 #define NUM_VALUE_PARTS (TC_VALUE_SIZE / TC_VALUE_PART_SIZE)
20 * A two complement value. Note that the parts are store in BIG-Endian.
21 * this makes most loops counting towards zero and allows simple access
24 typedef struct tc_value {
25 tc_value_part part[NUM_VALUE_PARTS];
30 * Every operation produces two bits. Carry and Overflow.
31 * Carry means unsigned overflow, Overflow means signed overflow.
33 extern int tc_Carry, tc_Overflow;