Update copyright years
[deliverable/binutils-gdb.git] / gas / config / tc-i386-intel.c
index 3f6b057613451839c796ca8a9cdbef2fe6532ec6..b55d985f5a068c724483e1c38215b518b2c06f22 100644 (file)
@@ -1,6 +1,5 @@
 /* tc-i386.c -- Assemble Intel syntax code for ix86/x86-64
-   Copyright 2009, 2010
-   Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -142,7 +141,9 @@ operatorT i386_operator (const char *name, unsigned int operands, char *pc)
              int adjust = 0;
              char *gotfree_input_line = lex_got (&i.reloc[this_operand],
                                                  &adjust,
-                                                 &intel_state.reloc_types);
+                                                 &intel_state.reloc_types,
+                                                 (i.bnd_prefix != NULL
+                                                  || add_bnd_prefix));
 
              if (!gotfree_input_line)
                break;
@@ -291,6 +292,8 @@ i386_intel_simplify_register (expressionS *e)
   else if (!intel_state.index)
     {
       if (intel_state.in_scale
+         || current_templates->start->base_opcode == 0xf30f1b /* bndmk */
+         || (current_templates->start->base_opcode & ~1) == 0x0f1a /* bnd{ld,st}x */
          || i386_regtab[reg_num].reg_type.bitfield.baseindex)
        intel_state.index = i386_regtab + reg_num;
       else
@@ -413,23 +416,21 @@ static int i386_intel_simplify (expressionS *e)
       if (this_operand >= 0 && intel_state.in_bracket)
        {
          expressionS *scale = NULL;
-
-         if (intel_state.index)
-           --scale;
+         int has_index = (intel_state.index != NULL);
 
          if (!intel_state.in_scale++)
            intel_state.scale_factor = 1;
 
          ret = i386_intel_simplify_symbol (e->X_add_symbol);
-         if (ret && !scale && intel_state.index)
+         if (ret && !has_index && intel_state.index)
            scale = symbol_get_value_expression (e->X_op_symbol);
 
          if (ret)
            ret = i386_intel_simplify_symbol (e->X_op_symbol);
-         if (ret && !scale && intel_state.index)
+         if (ret && !scale && !has_index && intel_state.index)
            scale = symbol_get_value_expression (e->X_add_symbol);
 
-         if (ret && scale && (scale + 1))
+         if (ret && scale)
            {
              resolve_expression (scale);
              if (scale->X_op != O_constant
This page took 0.025652 seconds and 4 git commands to generate.