]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86: shrink opcode sets table
authorJan Beulich <jbeulich@suse.com>
Fri, 24 Nov 2023 08:55:51 +0000 (09:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 24 Nov 2023 08:55:51 +0000 (09:55 +0100)
commitd3b01414b935be5c5d5f37e5df6b6767e9c68d25
treee1fd63e5d0edd4a97cb6f61fadbdcaf2d8bcd8f8
parent39bb3ade816faf42ec34cc7ca962ad350cb4d16a
x86: shrink opcode sets table

Have i386-gen produce merely the offsets into i386_optab[]. Besides
allowing to shrink the table even on 32-bit builds, this results in
removing a level of indirection from the frequently accessed
current_templates, in return for adding a level of indirection when
looking up mnemonics (commonly happening just once per insn). Plus for
PIE builds of gas it also reduces the number of relocations by about two
thousand. Finally a somewhat ugly static variable can also be eliminated
from i386_displacement().
gas/config/tc-i386-intel.c
gas/config/tc-i386.c
opcodes/i386-gen.c
opcodes/i386-tbl.h