summaryrefslogtreecommitdiff
path: root/opcodes/i386-opc.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-01-20 10:15:48 +0100
committerJan Beulich <jbeulich@suse.com>2023-01-20 10:15:48 +0100
commit5c1392029158fa5b2946953394e566c83a0602e1 (patch)
tree5f79804018ce30301d631fb85a437ff91d26e930 /opcodes/i386-opc.h
parent76d3f746c538af9204bbf5d7f90188a65048c0da (diff)
downloadbinutils-gdb-5c1392029158fa5b2946953394e566c83a0602e1.tar.gz
x86: move insn mnemonics to a separate table
Using full pointers to reference the insn mnemonic strings is not very efficient. With overall string size presently just slightly over 20k, even a 16-bit value would suffice. Use "unsigned int" for now, as there's no good use we could presently make of the otherwise saved 16 bits. For 64-bit builds this reduces table size by 6.25% (prior to the recent ISA extension additions it would have been 12.5%), with a similar effect on cache occupation of table entries accessed. For PIE builds of gas this also reduces the number of base relocations quite a bit (obviously independent of bitness).
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r--opcodes/i386-opc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h
index 3d4fa54843f..ebedb3e6f5f 100644
--- a/opcodes/i386-opc.h
+++ b/opcodes/i386-opc.h
@@ -918,7 +918,7 @@ typedef union i386_operand_type
typedef struct insn_template
{
/* instruction name sans width suffix ("mov" for movl insns) */
- const char *name;
+ unsigned int mnem_off;
/* Bitfield arrangement is such that individual fields can be easily
extracted (in native builds at least) - either by at most a masking