From 6344535387740d9954c8c2358295e55c0a821fc0 Mon Sep 17 00:00:00 2001 From: Andrew Carlotti Date: Mon, 15 Jan 2024 11:19:48 +0000 Subject: aarch64: Refactor aarch64_sys_ins_reg_supported_p Add an aarch64_feature_set field to aarch64_sys_ins_reg, and use this for feature checks instead of testing against a list of operand codes. --- include/opcode/aarch64.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h index 5ea0f32..6f86a98 100644 --- a/include/opcode/aarch64.h +++ b/include/opcode/aarch64.h @@ -1389,12 +1389,16 @@ typedef struct const char *name; uint32_t value; uint32_t flags ; + + /* A set of features, all of which are required for this system instruction to be + available. */ + aarch64_feature_set features; } aarch64_sys_ins_reg; extern bool aarch64_sys_ins_reg_has_xt (const aarch64_sys_ins_reg *); extern bool aarch64_sys_ins_reg_supported_p (const aarch64_feature_set, - const char *reg_name, aarch64_insn, + const char *reg_name, uint32_t, const aarch64_feature_set *); extern const aarch64_sys_ins_reg aarch64_sys_regs_ic []; -- cgit v1.1