aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGraham Markall <graham.markall@embecosm.com>2016-09-29 19:25:25 +0100
committerGraham Markall <graham.markall@embecosm.com>2016-11-03 17:14:37 +0000
commit06fe285fd293e999481ec8f5c619658aa5e3b48b (patch)
tree14ea247fc401bb535b89c9f226cd7beeb6a25f25 /include
parent91fdca6f26cf33573364b5bd313ed4bed6a547cc (diff)
downloadgdb-06fe285fd293e999481ec8f5c619658aa5e3b48b.zip
gdb-06fe285fd293e999481ec8f5c619658aa5e3b48b.tar.gz
gdb-06fe285fd293e999481ec8f5c619658aa5e3b48b.tar.bz2
arc: Replace ARC_SHORT macro with arc_opcode_len function
In preparation for moving to a world where arc instructions can be 2, 4, 6, or 8 bytes in length, replace the ARC_SHORT macro (which is either true of false) with an arc_opcode_len function that returns a length in bytes. There should be no functional change after this commit. gas/ChangeLog: * config/tc-arc.c (assemble_insn): Replace use of ARC_SHORT with arc_opcode_len. include/ChangeLog: * opcode/arc.h (arc_opcode_len): Declare. (ARC_SHORT): Delete. opcodes/ChangeLog: * arc-dis.c (find_format_from_table): Replace use of ARC_SHORT with arc_opcode_len. (find_format_long_instructions): Likewise. * arc-opc.c (arc_opcode_len): New function.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/opcode/arc.h7
2 files changed, 8 insertions, 4 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index c4ddcb2..e21ad35 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2016-11-03 Graham Markall <graham.markall@embecosm.com>
+
+ * opcode/arc.h (arc_opcode_len): Declare.
+ (ARC_SHORT): Delete.
+
2016-11-01 Palmer Dabbelt <palmer@dabbelt.com>
Andrew Waterman <andrew@sifive.com>
diff --git a/include/opcode/arc.h b/include/opcode/arc.h
index 724fdee..34a7fa7 100644
--- a/include/opcode/arc.h
+++ b/include/opcode/arc.h
@@ -175,6 +175,9 @@ extern const unsigned arc_num_long_opcodes;
instructions. */
extern const struct arc_opcode arc_opcodes[];
+/* Return length of an instruction represented by OPCODE, in bytes. */
+extern int arc_opcode_len (const struct arc_opcode *opcode);
+
/* CPU Availability. */
#define ARC_OPCODE_NONE 0x0000
#define ARC_OPCODE_ARC600 0x0001 /* ARC 600 specific insns. */
@@ -228,10 +231,6 @@ extern const struct arc_opcode arc_opcodes[];
#define ARC_XMAC 0x1000
#define ARC_CRC 0x1000
-/* A macro to check for short instructions. */
-#define ARC_SHORT(mask) \
- (((mask) & 0xFFFF0000) ? 0 : 1)
-
/* The operands table is an array of struct arc_operand. */
struct arc_operand
{