aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorMuhammad Kamran <Muhammad.Kamran@arm.com>2026-03-18 13:49:57 +0000
committerAlice Carlotti <alice.carlotti@arm.com>2026-04-09 15:34:46 +0100
commit7c8e9cff09107375a39e3c94c3a0a9d88d1cb88c (patch)
tree454dc70dbadd237a42f7c6013684605da6c77966 /opcodes
parented71fa9a44511cb8d933073f892ea041c3ff9107 (diff)
downloadfsf-binutils-gdb-7c8e9cff09107375a39e3c94c3a0a9d88d1cb88c.tar.gz
fsf-binutils-gdb-7c8e9cff09107375a39e3c94c3a0a9d88d1cb88c.tar.bz2
fsf-binutils-gdb-7c8e9cff09107375a39e3c94c3a0a9d88d1cb88c.zip
aarch64: Reject no-Xt SYS aliases when Rt != 31 in disassembly
For SYS-encoding aliases that do not take Xt (for example TLBI ALLE1, PLBI ALLE1), disassembly should not print the alias form when Rt != 31. In that case, disassemble as the generic sys form instead. Add a focused gas test that checks: - Rt=31 still disassembles to aliases for no-Xt forms. - Rt!=31 disassembles to sys ... , xN for those no-Xt forms. - A valid Xt alias (TLBI VALE1) continues to disassemble as the alias. opcodes/ChangeLog: * aarch64-dis.c (aarch64_ext_regrt_sysins): Mark present as whether Rt is non-default or the SYS op accepts Xt, so aliases that do not take Xt are rejected when Rt != 31. gas/ChangeLog: * testsuite/gas/aarch64/sys-rt-alias.s: New test. * testsuite/gas/aarch64/sys-rt-alias.d: New test.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/aarch64-dis.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
index f09307847e6..8544ce4b6d4 100644
--- a/opcodes/aarch64-dis.c
+++ b/opcodes/aarch64-dis.c
@@ -331,12 +331,9 @@ aarch64_ext_regrt_sysins (const aarch64_operand *self, aarch64_opnd_info *info,
help the disassembler determine whether this operand is optional or
not. */
- if (aarch64_sys_ins_reg_tlbid_xt (inst->operands[0].sysins_op)
- && info->reg.regno != 31)
- info->present = true;
- else
- info->present = aarch64_sys_ins_reg_has_xt (inst->operands[0].sysins_op);
-
+ info->present
+ = (info->reg.regno != 31
+ || aarch64_sys_ins_reg_has_xt (inst->operands[0].sysins_op));
return true;
}