diff options
Diffstat (limited to 'include/opcode')
-rw-r--r-- | include/opcode/aarch64.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h index 183d281..21ba0bf 100644 --- a/include/opcode/aarch64.h +++ b/include/opcode/aarch64.h @@ -927,7 +927,11 @@ extern const aarch64_opcode aarch64_opcode_table[]; /* This instruction's operation width is determined by the operand with the largest element size. */ #define C_MAX_ELEM (1U << 1) -/* Next bit is 2. */ +#define C_SCAN_MOPS_P (1U << 2) +#define C_SCAN_MOPS_M (2U << 2) +#define C_SCAN_MOPS_E (3U << 2) +#define C_SCAN_MOPS_PME (3U << 2) +/* Next bit is 4. */ static inline bool alias_opcode_p (const aarch64_opcode *opcode) @@ -1221,6 +1225,17 @@ struct aarch64_inst Less severe error found during the parsing, very possibly because that GAS has picked up a wrong instruction template for the parsing. + AARCH64_OPDE_A_SHOULD_FOLLOW_B + The instruction forms (or is expected to form) part of a sequence, + but the preceding instruction in the sequence wasn't the expected one. + The message refers to two strings: the name of the current instruction, + followed by the name of the expected preceding instruction. + + AARCH64_OPDE_EXPECTED_A_AFTER_B + Same as AARCH64_OPDE_A_SHOULD_FOLLOW_B, but shifting the focus + so that the current instruction is assumed to be the incorrect one: + "since the previous instruction was B, the current one should be A". + AARCH64_OPDE_SYNTAX_ERROR General syntax error; it can be either a user error, or simply because that GAS is trying a wrong instruction template. @@ -1255,11 +1270,8 @@ struct aarch64_inst Error of the highest severity and used for any severe issue that does not fall into any of the above categories. - The enumerators are only interesting to GAS. They are declared here (in - libopcodes) because that some errors are detected (and then notified to GAS) - by libopcodes (rather than by GAS solely). - - The first three errors are only deteced by GAS while the + 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 only libopcodes has the information about the valid variants of each instruction. @@ -1273,6 +1285,8 @@ enum aarch64_operand_error_kind { AARCH64_OPDE_NIL, AARCH64_OPDE_RECOVERABLE, + AARCH64_OPDE_A_SHOULD_FOLLOW_B, + AARCH64_OPDE_EXPECTED_A_AFTER_B, AARCH64_OPDE_SYNTAX_ERROR, AARCH64_OPDE_FATAL_SYNTAX_ERROR, AARCH64_OPDE_INVALID_VARIANT, @@ -1290,7 +1304,11 @@ struct aarch64_operand_error enum aarch64_operand_error_kind kind; int index; const char *error; - int data[3]; /* Some data for extra information. */ + /* Some data for extra information. */ + union { + int i; + const char *s; + } data[3]; bool non_fatal; }; |