diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-07-04 08:32:50 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-07-04 08:32:50 +0200 |
commit | a775efc84d0f15f7003fdab1592586b6fa8987cd (patch) | |
tree | 248fd99caba89a053e9409d8d438cca6ea189f76 /opcodes/i386-opc.h | |
parent | 02b83698ef04a33a8c606efeceb8fe7cd9a9b344 (diff) | |
download | binutils-gdb-a775efc84d0f15f7003fdab1592586b6fa8987cd.tar.gz |
x86: fold Disp32S and Disp32
The only case where 64-bit code uses non-sign-extended (can also be
considered zero-extended) displacements is when an address size override
is in place for a memory operand (i.e. particularly excluding
displacements of direct branches, which - if at all - are controlled by
operand size, and then are still sign-extended, just from 16 bits).
Hence the distinction in templates is unnecessary, allowing code to be
simplified in a number of places. The only place where logic becomes
more complicated is when signed-ness of relocations is determined in
output_disp().
The other caveat is that Disp64 cannot be specified anymore in an insn
template at the same time as Disp32. Unlike for non-64-bit mode,
templates don't specify displacements for both possible addressing
modes; the necessary adjustment to the expected ones has already been
done in match_template() anyway (but of course the logic there needs
tweaking now). Hence the single template so far doing so is split.
Diffstat (limited to 'opcodes/i386-opc.h')
-rw-r--r-- | opcodes/i386-opc.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/opcodes/i386-opc.h b/opcodes/i386-opc.h index cba7cd2d36a..f3ef713a0ad 100644 --- a/opcodes/i386-opc.h +++ b/opcodes/i386-opc.h @@ -832,10 +832,8 @@ enum Disp8, /* 16 bit displacement */ Disp16, - /* 32 bit displacement */ + /* 32 bit displacement (64-bit: sign-extended) */ Disp32, - /* 32 bit signed displacement */ - Disp32S, /* 64 bit displacement */ Disp64, /* Register which can be used for base or index in memory operand. */ @@ -892,7 +890,6 @@ typedef union i386_operand_type unsigned int disp8:1; unsigned int disp16:1; unsigned int disp32:1; - unsigned int disp32s:1; unsigned int disp64:1; unsigned int baseindex:1; unsigned int byte:1; |