[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

Mandeep Singh Grang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 3 11:24:51 PDT 2018


mgrang added a comment.

I have some questions about the behavior of getReg:

__getReg ultimately invokes AArch64TargetLowering::getRegisterByName in llvm/lib/Target/AArch64/AArch64ISelLowering.cpp. You can __getReg only those registers which appear in the switch-case inside that function. Even then the logic there checks if the requested register is reserved. If not, then it makes the reg = 0 which results in "Invalid register name" error.

I am not sure how this should be dealt with. Is it fine to add all regs (0-31) to the switch-case in getRegisterByName? And should the checks for isRegReserved be bypassed for COFF?


Repository:
  rC Clang

https://reviews.llvm.org/D52838





More information about the cfe-commits mailing list