arc: Replace ARC_SHORT macro with arc_opcode_len function
[deliverable/binutils-gdb.git] / gas / config / tc-arc.c
index 5ced8f037e2a418216eece8164e195584552d557..69dad381a727ff9d4eea677f7e26353a1aa6fa4e 100644 (file)
@@ -3879,7 +3879,8 @@ assemble_insn (const struct arc_opcode *opcode,
              break;
            case O_pcl:
              reloc = ARC_RELOC_TABLE (t->X_md)->reloc;
-             if (ARC_SHORT (opcode->mask) || opcode->insn_class == JUMP)
+             if (arc_opcode_len (opcode) == 2
+                 || opcode->insn_class == JUMP)
                as_bad_where (frag_now->fr_file, frag_now->fr_line,
                              _("Unable to use @pcl relocation for insn %s"),
                              opcode->name);
@@ -4011,7 +4012,8 @@ assemble_insn (const struct arc_opcode *opcode,
   insn->relax = relax_insn_p (opcode, tok, ntok, pflags, nflg);
 
   /* Instruction length.  */
-  insn->len = ARC_SHORT (opcode->mask) ? 2 : 4;
+  insn->len = arc_opcode_len (opcode);
+  gas_assert (insn->len == 2 || insn->len == 4);
 
   insn->insn = image;
 
This page took 0.022726 seconds and 4 git commands to generate.