Rework the R_NEG support on both gas and ld for the PowerPC AIX targets, in order...
[binutils-gdb.git] / gas / config / tc-vax.c
index 04a955f62bd19dc4c202193f0a5634eb0e72d276..f439f1b52dcb83f7d5b6c51e253ac6633ab96ad2 100644 (file)
@@ -1,5 +1,5 @@
 /* tc-vax.c - vax-specific -
-   Copyright (C) 1987-2020 Free Software Foundation, Inc.
+   Copyright (C) 1987-2021 Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
@@ -961,11 +961,13 @@ vip_begin (int synthetic_too,             /* 1 means include jXXX op-codes.  */
   op_hash = str_htab_create ();
 
   for (vP = votstrs; *vP->vot_name; vP++)
-    str_hash_insert (op_hash, vP->vot_name, (void *) &vP->vot_detail);
+    if (str_hash_insert (op_hash, vP->vot_name, &vP->vot_detail, 0) != NULL)
+      as_fatal (_("duplicate %s"), vP->vot_name);
 
   if (synthetic_too)
     for (vP = synthetic_votstrs; *vP->vot_name; vP++)
-      str_hash_insert (op_hash, vP->vot_name, (void *) &vP->vot_detail);
+      if (str_hash_insert (op_hash, vP->vot_name, &vP->vot_detail, 0) != NULL)
+       as_fatal (_("duplicate %s"), vP->vot_name);
 
 #ifndef CONST_TABLE
   vip_op_defaults (immediate, indirect, displen);
@@ -3277,7 +3279,7 @@ vax_cons (expressionS *exp, int size)
   save = input_line_pointer;
   if (input_line_pointer[0] == '%')
     {
-      if (strncmp (input_line_pointer + 1, "pcrel", 5) == 0)
+      if (startswith (input_line_pointer + 1, "pcrel"))
        {
          input_line_pointer += 6;
          vax_cons_special_reloc = "pcrel";