diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-09-12 23:31:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-09-12 23:31:23 -0700 |
commit | 7b399ee696036fe6d1acbbb64cd8a15d6a53078d (patch) | |
tree | 0e6953b8fbbae180c76b852fd8981effe7871d79 /lib.h | |
parent | 10680dee1019909374df8990afba41eff8371238 (diff) | |
download | txr-7b399ee696036fe6d1acbbb64cd8a15d6a53078d.tar.gz txr-7b399ee696036fe6d1acbbb64cd8a15d6a53078d.tar.bz2 txr-7b399ee696036fe6d1acbbb64cd8a15d6a53078d.zip |
Define bit width of NUM type in one place.
* lib.h (NUM_BIT): New preprocessor symbol.
* arith.c (CNUM_BIT): Preprocessor symbol removed; this
same quantity is already known as PTR_BIT in lib.h.
(mul, square): Replace CNUM_BIT with PTR_BIT.
(comp_trunc, logtrunc, sign_extend, ash): Replace
num_bits with NUM_BIT.
* struct.c (struct_inst): Replace calculation with NUM_BIT.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -62,6 +62,7 @@ typedef double_uintptr_t dbl_ucnum; #define NUM_MIN (INT_PTR_MIN/4) #define PTR_BIT (SIZEOF_PTR * CHAR_BIT) +#define NUM_BIT (PTR_BIT - TAG_SHIFT) #ifdef __GNUC__ #define NORETURN __attribute__((noreturn)) |