Reformat output_insn
[deliverable/binutils-gdb.git] / gas / config / tc-i386.c
index 97cb68e02acd458da3ea3af9de5f0ac829e0a41a..c0c1bedfb7b087838214b614d79974d2748fa27c 100644 (file)
@@ -3015,7 +3015,7 @@ check_hle (void)
     {
     default:
       abort ();
-    case 0:
+    case HLEPrefixNone:
       if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE)
        as_bad (_("invalid instruction `%s' after `xacquire'"),
                i.tm.name);
@@ -3023,7 +3023,7 @@ check_hle (void)
        as_bad (_("invalid instruction `%s' after `xrelease'"),
                i.tm.name);
       return 0;
-    case 1:
+    case HLEPrefixLock:
       if (i.prefix[LOCK_PREFIX])
        return 1;
       if (i.prefix[HLE_PREFIX] == XACQUIRE_PREFIX_OPCODE)
@@ -3031,9 +3031,9 @@ check_hle (void)
       else
        as_bad (_("missing `lock' with `xrelease'"));
       return 0;
-    case 2:
+    case HLEPrefixAny:
       return 1;
-    case 3:
+    case HLEPrefixRelease:
       if (i.prefix[HLE_PREFIX] != XRELEASE_PREFIX_OPCODE)
        {
          as_bad (_("instruction `%s' after `xacquire' not allowed"),
@@ -4353,8 +4353,9 @@ check_reverse:
          err_msg = _("unsupported syntax");
          break;
        case unsupported:
-         err_msg = _("unsupported");
-         break;
+         as_bad (_("unsupported `%s'"),
+                 current_templates->start->name);
+         return NULL;
        case invalid_vsib_address:
          err_msg = _("invalid VSIB address");
          break;
@@ -6217,7 +6218,7 @@ output_insn (void)
       unsigned int prefix;
 
       /* Since the VEX prefix contains the implicit prefix, we don't
-         need the explicit prefix.  */
+        need the explicit prefix.  */
       if (!i.tm.opcode_modifier.vex)
        {
          switch (i.tm.opcode_length)
@@ -6256,8 +6257,7 @@ check_prefix:
            if (*q)
              FRAG_APPEND_1_CHAR (*q);
        }
-
-      if (i.tm.opcode_modifier.vex)
+      else
        {
          for (j = 0, q = i.prefix; j < ARRAY_SIZE (i.prefix); j++, q++)
            if (*q)
@@ -7715,6 +7715,18 @@ i386_att_operand (char *operand_string)
   return 1;                    /* Normal return.  */
 }
 \f
+/* Calculate the maximum variable size (i.e., excluding fr_fix)
+   that an rs_machine_dependent frag may reach.  */
+
+unsigned int
+i386_frag_max_var (fragS *frag)
+{
+  /* The only relaxable frags are for jumps.
+     Unconditional jumps can grow by 4 bytes and others by 5 bytes.  */
+  gas_assert (frag->fr_type == rs_machine_dependent);
+  return TYPE_FROM_RELAX_STATE (frag->fr_subtype) == UNCOND_JUMP ? 4 : 5;
+}
+
 /* md_estimate_size_before_relax()
 
    Called just before relax() for rs_machine_dependent frags.  The x86
This page took 0.028056 seconds and 4 git commands to generate.