x86: don't mix disp and imm processing
authorJan Beulich <jbeulich@suse.com>
Fri, 7 May 2021 10:03:12 +0000 (12:03 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 7 May 2021 10:03:12 +0000 (12:03 +0200)
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.

gas/ChangeLog
gas/config/tc-i386.c

index ba307b85f638c72fa5e350851f8c04dac1d09b01..b3a2cfc96503df526884ff26b933602a42c5d85a 100644 (file)
@@ -1,3 +1,8 @@
+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
index 7e1d1552438182ad707465cfd1242458f382c3c5..d3441988e3475e7690658b36e9bbdb01cea0abcf 100644 (file)
@@ -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)
This page took 0.028939 seconds and 4 git commands to generate.