[clang] [AIX] recognize vsr in inline asm for AIX (PR #68476)

Stefan Pintilie via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 10 12:11:48 PDT 2023


================
@@ -828,10 +829,7 @@ const TargetInfo::AddlRegName GCCAddlRegNames[] = {
 };
 
 ArrayRef<TargetInfo::AddlRegName> PPCTargetInfo::getGCCAddlRegNames() const {
-  if (ABI == "elfv2")
-    return llvm::ArrayRef(GCCAddlRegNames);
-  else
-    return TargetInfo::getGCCAddlRegNames();
+  return llvm::ArrayRef(GCCAddlRegNames);
----------------
stefanp-ibm wrote:

This blanket addition of the vs registers for all ABIs makes me a little nervous. I'm not sure that all ABIs will (or do) support these registers. For example, we support ELFv1 but based on this: https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#REG
I'm not sure it supports the vs registers.

Since we are doing this for AIX it may be safer just to explicitly mention XCOFF.

https://github.com/llvm/llvm-project/pull/68476


More information about the cfe-commits mailing list