diff options
author | Jan Beulich <jbeulich@suse.com> | 2021-05-07 12:03:12 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2021-05-07 12:03:12 +0200 |
commit | 98da05bf2698b55b73453480a3fbb92f163d2c7b (patch) | |
tree | 926db663523d22ae3c8f89bb0a411102fa910b31 | |
parent | 9aac24b1a8382f257c4ea223ebefd5e397dfe59b (diff) | |
download | gdb-98da05bf2698b55b73453480a3fbb92f163d2c7b.zip gdb-98da05bf2698b55b73453480a3fbb92f163d2c7b.tar.gz gdb-98da05bf2698b55b73453480a3fbb92f163d2c7b.tar.bz2 |
x86: don't mix disp and imm processing
Surely disp processing should access the disp operand, not an imm one.
This is not an active issue only because imms and disps are, at the
moment, overlapping fields of the same union.
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ba307b8..b3a2cfc 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2021-05-07 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (output_disp): Use disps field instead of + imms one. + +2021-05-07 Jan Beulich <jbeulich@suse.com> + * config/tc-i386.c (i386_finalize_immediate): Move register check ... (i386_immediate): ... here. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 7e1d155..d344198 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -10000,7 +10000,7 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off) { reloc_type = BFD_RELOC_386_GOTPC; i.has_gotpc_tls_reloc = true; - i.op[n].imms->X_add_number += + i.op[n].disps->X_add_number += encoding_length (insn_start_frag, insn_start_off, p); } else if (reloc_type == BFD_RELOC_64) |