arc: Replace ARC_SHORT macro with arc_opcode_len function
[deliverable/binutils-gdb.git] / opcodes / arc-opc.c
index 65373104687ae37ff3fad44374c085270e6e5e52..9eb58d3f63912a698bb2c4e6e0c9eac81c481528 100644 (file)
@@ -2648,3 +2648,13 @@ const struct arc_long_opcode arc_long_opcodes[] =
 };
 
 const unsigned arc_num_long_opcodes = ARRAY_SIZE (arc_long_opcodes);
+
+/* Return length of instruction represented by OPCODE in bytes.  */
+
+int
+arc_opcode_len (const struct arc_opcode *opcode)
+{
+  if (opcode->mask < 0x10000ull)
+    return 2;
+  return 4;
+}
This page took 0.023918 seconds and 4 git commands to generate.