diff options
Diffstat (limited to 'opcodes/arc-opc.c')
-rw-r--r-- | opcodes/arc-opc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/opcodes/arc-opc.c b/opcodes/arc-opc.c index 6537310..9eb58d3 100644 --- a/opcodes/arc-opc.c +++ b/opcodes/arc-opc.c @@ -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; +} |