labrinea marked an inline comment as done.
labrinea added inline comments.
================
Comment at: llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp:1548
+
+static const AArch64SysReg::SysReg *lookupSysReg(unsigned Val, bool Read,
+ const MCSubtargetInfo &STI) {
----------------
john.brawn wrote:
> It would be better if we had a generic way to handle registers with
> overlapping encodings, instead of handling the two registers explicitly here.
> I'm not sure of the best way to do that, but looking at
> AArch64SystemOperands.td it looks like maybe a way to do it would to add an
> extra "AltName" field to give an alternate name for the same encoding, so
> e.g. TTBR0_EL2 would have AltName
> VSCTLR_EL2 and vice-versa. So you'd first lookup by encoding, then if that
> didn't work you'd lookup by name with AltName and check if that one is valid.
>
Done, but it may turn problematic if we start having more than one alternative
names, i.e. if multiple architecture extensions reference the same encoding
using a different name.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110065/new/
https://reviews.llvm.org/D110065
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits