john.brawn 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) {
----------------
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.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110065/new/

https://reviews.llvm.org/D110065

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to