summaryrefslogtreecommitdiff
path: root/libcpu/i386_disasm.c
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2022-12-18 00:52:02 +0800
committerMark Wielaard <mark@klomp.org>2023-02-23 12:47:25 +0100
commit4961f9ae2f11795022166698aa15a15f48ec8c5b (patch)
treec26aaac0e7a185a8b5d66883ec498b105fb73d46 /libcpu/i386_disasm.c
parent9548a7f06e4bcfc640e8d470444c1cdbea5a6f73 (diff)
downloadelfutils-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_disasm.c')
-rw-r--r--libcpu/i386_disasm.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
index 09946273..dec62bfa 100644
--- a/libcpu/i386_disasm.c
+++ b/libcpu/i386_disasm.c
@@ -46,10 +46,7 @@
#define MACHINE_ENCODING LITTLE_ENDIAN
#include "memory-access.h"
-
-#ifndef MNEFILE
-# define MNEFILE "i386.mnemonics"
-#endif
+#include "i386_mne.h"
#define MNESTRFIELD(line) MNESTRFIELD1 (line)
#define MNESTRFIELD1(line) str##line
@@ -71,15 +68,6 @@ static const union mnestr_t
}
};
-/* The index can be stored in the instrtab. */
-enum
- {
-#define MNE(name) MNE_##name,
-#include MNEFILE
-#undef MNE
- MNE_INVALID
- };
-
static const unsigned short int mneidx[] =
{
#define MNE(name) \