MIPS16/GAS: Fix assertion failures with relocations on 16-bit instructions
[deliverable/binutils-gdb.git] / gas / config / tc-mips.c
index 4288d96271f7efdcf54379cbd5a0c7c84de020e5..1241b9c1e5d343d716eee006a5a399dc33ed45f2 100644 (file)
@@ -18369,10 +18369,10 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
                            _("unsupported relocation"));
              break;
            }
-         if (reloc != BFD_RELOC_NONE)
+         if (reloc == BFD_RELOC_NONE)
+           ;
+         else if (ext)
            {
-             gas_assert (ext);
-
              exp.X_op = O_symbol;
              exp.X_add_symbol = fragp->fr_symbol;
              exp.X_add_number = fragp->fr_offset;
@@ -18387,6 +18387,9 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
                 in 2 octets.  */
              fixp->fx_no_overflow = 1;
            }
+         else
+           as_bad_where (fragp->fr_file, fragp->fr_line,
+                         _("invalid unextended operand value"));
        }
       else
        mips16_immed (fragp->fr_file, fragp->fr_line, type,
This page took 0.028165 seconds and 4 git commands to generate.