]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Clean base_reg and assign correct values to regs for input_output_operand (%dx).
authorCui, Lili <lili.cui@intel.com>
Wed, 13 Dec 2023 06:04:15 +0000 (06:04 +0000)
committerCui, Lili <lili.cui@intel.com>
Wed, 13 Dec 2023 06:04:15 +0000 (06:04 +0000)
For special processing of input and output operands (%dx),
the state of some variables needs to be cleaned.

gas/ChangeLog:

* config/tc-i386.c (i386_att_operand): Assign values to regs and
clean i.base_reg for input output operand (%dx).

gas/config/tc-i386.c

index 4f3864f2ba78a624f6bdc7e78b88f9a4dd479b3c..3f1b39baddc6a14d63c37f1c58a179421058d6e9 100644 (file)
@@ -13016,6 +13016,8 @@ i386_att_operand (char *operand_string)
          && !operand_type_check (i.types[this_operand], disp))
        {
          i.types[this_operand] = i.base_reg->reg_type;
+         i.op[this_operand].regs = i.base_reg;
+         i.base_reg = NULL;
          i.input_output_operand = true;
          return 1;
        }