diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-08-18 08:58:15 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-08-18 08:58:15 +0200 |
commit | 069a1561b76532964b1dcc3bdd8f745e927358d6 (patch) | |
tree | ef59d1e902f117cdd2bf22be4460570e79440570 | |
parent | b41ef0baac449de58c84d1a0261af0d91443b540 (diff) | |
download | fsf-binutils-gdb-069a1561b76532964b1dcc3bdd8f745e927358d6.zip fsf-binutils-gdb-069a1561b76532964b1dcc3bdd8f745e927358d6.tar.gz fsf-binutils-gdb-069a1561b76532964b1dcc3bdd8f745e927358d6.tar.bz2 |
x86: remove indirection from bx[] and di_si[]
The longest register name is 3 characters (plus a nul one), so using a
4- or 8-byte pointer to get at it is neither space nor time efficient.
Embed the names right into the array. For PIE this also slightly reduces
the number of base relocations in the final image.
-rw-r--r-- | gas/config/tc-i386.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 3b00a1b..604a635 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -12250,13 +12250,13 @@ i386_index_check (const char *operand_string) /* Memory operands of string insns are special in that they only allow a single register (rDI, rSI, or rBX) as their memory address. */ const reg_entry *expected_reg; - static const char *di_si[][2] = + static const char di_si[][2][4] = { { "esi", "edi" }, { "si", "di" }, { "rsi", "rdi" } }; - static const char *bx[] = { "ebx", "bx", "rbx" }; + static const char bx[][4] = { "ebx", "bx", "rbx" }; kind = "string address"; |