aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-03-30 11:09:07 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-03-30 11:09:07 +0100
commit859f51df4d0e23c21adc2167d738cf1e6c0f2613 (patch)
tree4be0fd16ae64e3c2cca72c6fba77171a54ad8fe8 /include
parent36043bcff490e6c588d5b52318fbba233f478fab (diff)
downloadfsf-binutils-gdb-859f51df4d0e23c21adc2167d738cf1e6c0f2613.zip
fsf-binutils-gdb-859f51df4d0e23c21adc2167d738cf1e6c0f2613.tar.gz
fsf-binutils-gdb-859f51df4d0e23c21adc2167d738cf1e6c0f2613.tar.bz2
aarch64: Add an error code for out-of-range registers
libopcodes currently reports out-of-range registers as a general AARCH64_OPDE_OTHER_ERROR. However, this means that each register range needs its own hard-coded string, which is a bit cumbersome if the range is determined programmatically. This patch therefore adds a dedicated error type for out-of-range errors.
Diffstat (limited to 'include')
-rw-r--r--include/opcode/aarch64.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 10c7983..6615dec 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -1311,6 +1311,13 @@ struct aarch64_inst
Error of the highest severity and used for any severe issue that does not
fall into any of the above categories.
+ AARCH64_OPDE_INVALID_REGNO
+ A register was syntactically valid and had the right type, but it was
+ outside the range supported by the associated operand field. This is
+ a high severity error because there are currently no instructions that
+ would accept the operands that precede the erroneous one (if any) and
+ yet still accept a wider range of registers.
+
AARCH64_OPDE_RECOVERABLE, AARCH64_OPDE_SYNTAX_ERROR and
AARCH64_OPDE_FATAL_SYNTAX_ERROR are only deteced by GAS while the
AARCH64_OPDE_INVALID_VARIANT error can only be spotted by libopcodes as
@@ -1339,7 +1346,8 @@ enum aarch64_operand_error_kind
AARCH64_OPDE_UNTIED_OPERAND,
AARCH64_OPDE_OUT_OF_RANGE,
AARCH64_OPDE_UNALIGNED,
- AARCH64_OPDE_OTHER_ERROR
+ AARCH64_OPDE_OTHER_ERROR,
+ AARCH64_OPDE_INVALID_REGNO
};
/* N.B. GAS assumes that this structure work well with shallow copy. */