maryammo wrote:

In `PPCTargetMachine::PPCABI computeTargetABI` it specifies the ABI  with this 
```
switch (TT.getArch()) {
 case Triple::ppc64le:
  return PPCTargetMachine::PPC_ABI_ELFv2;
 case Triple::ppc64:
  if (TT.isPPC64ELFv2ABI())
   return PPCTargetMachine::PPC_ABI_ELFv2;
  else
   return PPCTargetMachine::PPC_ABI_ELFv1;
 default:
  return PPCTargetMachine::PPC_ABI_UNKNOWN;
 }
```
`isPPC64ELFv2ABI()`  is defined as 
```
/// Tests whether the target 64-bit PowerPC big endian ABI is ELFv2.
 bool isPPC64ELFv2ABI() const {
  return (getArch() == Triple::ppc64 &&
      ((getOS() == Triple::FreeBSD &&
       (getOSMajorVersion() >= 13 || getOSVersion().empty())) ||
       getOS() == Triple::OpenBSD || isMusl()));
 }
```
So PPC64 uses ELFv2 for Triple::OpenBSD. We probably want to  diagnose this OS 
for PC64, since with ELFv2 we might emit separate local  and global entry 
points which means only certain values can be passed to 
-fpatchable-function-entry option. 

https://github.com/llvm/llvm-project/pull/92997
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to