[PATCH] D110065: [AArch64] Add support for the 'R' architecture profile.

John Brawn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 12 08:49:13 PDT 2021


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



More information about the cfe-commits mailing list