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

Alexandros Lamprineas via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 16 04:34:38 PDT 2021


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



More information about the cfe-commits mailing list