diff options
author | Yonggang Luo <luoyonggang@gmail.com> | 2022-12-18 00:52:02 +0800 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2023-02-23 12:47:25 +0100 |
commit | 4961f9ae2f11795022166698aa15a15f48ec8c5b (patch) | |
tree | c26aaac0e7a185a8b5d66883ec498b105fb73d46 /libcpu/i386_parse.y | |
parent | 9548a7f06e4bcfc640e8d470444c1cdbea5a6f73 (diff) | |
download | elfutils-4961f9ae2f11795022166698aa15a15f48ec8c5b.tar.gz |
libcpu: Remove the need of NMNES by using enum
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
Diffstat (limited to 'libcpu/i386_parse.y')
-rw-r--r-- | libcpu/i386_parse.y | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y index d2236d59..459684c6 100644 --- a/libcpu/i386_parse.y +++ b/libcpu/i386_parse.y @@ -46,6 +46,8 @@ #include <libeu.h> #include <system.h> +#include "i386_mne.h" + #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free @@ -1107,11 +1109,6 @@ print_op_fct (const void *nodep, VISIT value, } } - -#if NMNES < 2 -# error "bogus NMNES value" -#endif - static void instrtable_out (void) { @@ -1123,7 +1120,7 @@ instrtable_out (void) fprintf (outfile, "#define MNEMONIC_BITS %zu\n", best_mnemonic_bits); #else fprintf (outfile, "#define MNEMONIC_BITS %ld\n", - lrint (ceil (log2 (NMNES)))); + lrint (ceil (log2 (MNE_COUNT)))); #endif fprintf (outfile, "#define SUFFIX_BITS %d\n", nbitsuf); for (int i = 0; i < 3; ++i) |