diff options
author | Jan Beulich <jbeulich@suse.com> | 2024-06-21 08:35:23 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2024-06-21 08:35:23 +0200 |
commit | 8bcda53caab0308b5908dda68194ab5e3e2dd09d (patch) | |
tree | dce5a428051efbedc088493ba1347c02a32d772b /gas/config/tc-i386.c | |
parent | c68a6e5cadf333ab3d55443d3aed156415660600 (diff) | |
download | binutils-8bcda53caab0308b5908dda68194ab5e3e2dd09d.zip binutils-8bcda53caab0308b5908dda68194ab5e3e2dd09d.tar.gz binutils-8bcda53caab0308b5908dda68194ab5e3e2dd09d.tar.bz2 |
x86: %riz, %rip, and %eip don't require REX
While these can't be used as register operands, they can be used for
memory operand addressing. Such uses do not prevent conversion: The
RegRex64 checks in check_Rex_required() for base and index registers
were simply wrong. They specifically also aren't needed for byte
registers, as those won't pass i386_index_check() anyway.
Diffstat (limited to 'gas/config/tc-i386.c')
-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 b8911c0..e94b937 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -8683,8 +8683,8 @@ check_Rex_required (void) return true; } - if ((i.index_reg && (i.index_reg->reg_flags & (RegRex | RegRex64))) - || (i.base_reg && (i.base_reg->reg_flags & (RegRex | RegRex64)))) + if ((i.index_reg && (i.index_reg->reg_flags & RegRex)) + || (i.base_reg && (i.base_reg->reg_flags & RegRex))) return true; /* Check pseudo prefix {rex} are valid. */ |