Skip to content

Commit 1c87a0f

Browse files
author
Alice Carlotti
committed
aarch64: Replace incorrect comment
The comment explaining the placement of the cfinv entry before the generic msr entry in the opcode table was incorrect. The issue is unrelated to the all ones bitmask for cfinv, and is actually due the large number of architectural aliases of the msr instruction.
1 parent ef8bee0 commit 1c87a0f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

opcodes/aarch64-tbl.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4642,14 +4642,14 @@ const struct aarch64_opcode aarch64_opcode_table[] =
46424642
PREDRES_INSN ("cpp", 0xd50b73e0, 0xffffffe0, ic_system, OP2 (SYSREG_SR, Rt), QL_SRC_X, F_ALIAS),
46434643
PREDRES2_INSN ("cosp", 0xd50b73c0, 0xffffffe0, ic_system, OP2 (SYSREG_SR, Rt), QL_SRC_X, F_ALIAS),
46444644
BRBE_INSN ("brb", 0xd5097280, 0xffffffc0, OP2 (BRBOP, Rt_IN_SYS_ALIASES), QL_IMM_NIL_NIL, F_ALIAS | F_OPD1_OPT | F_DEFAULT (0x1F)),
4645-
/* Armv8.4-a flag setting instruction, However this encoding has an encoding clash with the msr
4646-
below it. Usually we can resolve this by setting an alias condition on the flags, however that
4647-
depends on the disassembly masks to be able to quickly find the alias. The problem is the
4648-
cfinv instruction has no arguments, so all bits are set in the mask. Which means it will
4649-
potentially alias with too many instructions and so the tree can't be constructed. As a work
4650-
around we just place cfinv before msr. This means the order between these two shouldn't be
4651-
changed. */
46524645
FLAGM_INSN ("cfinv", 0xd500401f, 0xffffffff, ic_system, OP0 (), {}, 0),
4646+
/* This msr entry has a lot of aliases, and some of these (such as "hint")
4647+
have their own (recursive) aliases. We currently use a flat alias
4648+
structure, so to avoid creating an excessively long list of aliases for
4649+
the entire msr space we instead handle the top level of disambiguation
4650+
outside the alias infrastructure. This requires that all of the top-level
4651+
aliases of msr must appear earlier in the opcode table, since normal
4652+
(non-alias) disassembly is done on a "first match" basis. */
46534653
CORE_INSN ("msr", 0xd5000000, 0xffe00000, ic_system, 0, OP2 (SYSREG, Rt), QL_SRC_X, F_SYS_WRITE),
46544654
CORE_INSN ("sysl",0xd5280000, 0xfff80000, ic_system, 0, OP5 (Rt, UIMM3_OP1, CRn, CRm, UIMM3_OP2), QL_SYSL, 0),
46554655
CORE_INSN ("mrs", 0xd5200000, 0xffe00000, ic_system, 0, OP2 (Rt, SYSREG), QL_DST_X, F_SYS_READ),

0 commit comments

Comments
 (0)