aboutsummaryrefslogtreecommitdiff
path: root/include/opcode/aarch64.h
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2018-10-03 18:35:15 +0100
committerTamar Christina <tamar.christina@arm.com>2018-10-03 18:36:30 +0100
commit1d4823943d92e7fccb0616f885c029d9952cfb0e (patch)
treef0f117535ae9a23e44db11a8681765fcd82d2232 /include/opcode/aarch64.h
parent7e84b55d8f973b011f55f604a76c2d1d989d0b6b (diff)
downloadgdb-1d4823943d92e7fccb0616f885c029d9952cfb0e.zip
gdb-1d4823943d92e7fccb0616f885c029d9952cfb0e.tar.gz
gdb-1d4823943d92e7fccb0616f885c029d9952cfb0e.tar.bz2
AArch64: Refactor err_type.
Previously the ERR_ values were defined as different constants, to make this a bit more type safe and so they can be more easily re-used I'm changing them into an actual enum and updating any usages. include/ * opcode/aarch64.h (enum err_type): New. (aarch64_decode_insn): Use it. opcodes/ * aarch64-dis.c (ERR_OK, ERR_UND, ERR_UNP, ERR_NYI): Remove. (aarch64_decode_insn, print_insn_aarch64_word): Use err_type.
Diffstat (limited to 'include/opcode/aarch64.h')
-rw-r--r--include/opcode/aarch64.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 10bf097..40de440 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -641,6 +641,16 @@ enum aarch64_op
OP_TOTAL_NUM, /* Pseudo. */
};
+/* Error types. */
+enum err_type
+{
+ ERR_OK,
+ ERR_UND,
+ ERR_UNP,
+ ERR_NYI,
+ ERR_NR_ENTRIES
+};
+
/* Maximum number of operands an instruction can have. */
#define AARCH64_MAX_OPND_NUM 6
/* Maximum number of qualifier sequences an instruction can have. */
@@ -1187,7 +1197,7 @@ aarch64_stack_pointer_p (const aarch64_opnd_info *);
extern int
aarch64_zero_register_p (const aarch64_opnd_info *);
-extern int
+extern enum err_type
aarch64_decode_insn (aarch64_insn, aarch64_inst *, bfd_boolean,
aarch64_operand_error *errors);