x86/Intel: drop pointless suffix setting for "tbyte ptr"
[deliverable/binutils-gdb.git] / gas / config / tc-i386-intel.c
index 51fa38d91f65672f7e1361ad4df88224123ceb64..7d0a5b8d851e5b535db3fe269b46d35d87247209 100644 (file)
@@ -639,12 +639,7 @@ i386_intel_operand (char *operand_string, int got_a_float)
 
        case O_word_ptr:
          i.types[this_operand].bitfield.word = 1;
-         if ((current_templates->start->name[0] == 'l'
-              && current_templates->start->name[2] == 's'
-              && current_templates->start->name[3] == 0)
-             || current_templates->start->base_opcode == 0x62 /* bound */)
-           suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
-         else if (got_a_float == 2)    /* "fi..." */
+         if (got_a_float == 2) /* "fi..." */
            suffix = SHORT_MNEM_SUFFIX;
          else
            suffix = WORD_MNEM_SUFFIX;
@@ -681,8 +676,6 @@ i386_intel_operand (char *operand_string, int got_a_float)
                add_prefix (DATA_PREFIX_OPCODE);
              suffix = LONG_DOUBLE_MNEM_SUFFIX;
            }
-         else
-           suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
          break;
 
        case O_qword_ptr:
@@ -698,8 +691,12 @@ i386_intel_operand (char *operand_string, int got_a_float)
          i.types[this_operand].bitfield.tbyte = 1;
          if (got_a_float == 1)
            suffix = LONG_DOUBLE_MNEM_SUFFIX;
+         else if ((current_templates->start->operand_types[0].bitfield.fword
+                   || current_templates->start->operand_types[0].bitfield.tbyte)
+                  && flag_code == CODE_64BIT)
+           suffix = QWORD_MNEM_SUFFIX; /* l[fgs]s, [ls][gi]dt */
          else
-           suffix = BYTE_MNEM_SUFFIX; /* so it will cause an error */
+           i.types[this_operand].bitfield.byte = 1; /* cause an error */
          break;
 
        case O_oword_ptr:
This page took 0.024845 seconds and 4 git commands to generate.