[LLVMdev] [PowerPC] ABI questions

David Wiberg dwiberg at gmail.com
Wed Jul 30 11:51:45 PDT 2014


Hi all,

I'm trying to understand which ABIs are supported in the PowerPC
backend and I'm getting a bit confused. Here's what I've gathered so
far alongside with some questions.

- In PPCSubtarget.h there's DarwinABI, SVR4ABI and ELFv2ABI.
- The CodeGenerator documentation claims that the AIX PowerPC ABI is
followed (with some deviations). Is this refering to the DarwinABI?
- In a recent commit a TargetABI value and enumeration was added to
PPCSubtarget which contains PPC_ABI_UNKNOWN, PPC_ABI_ELFv1 and
PPC_ABI_ELFv2. For 64-bit non-Darwin the TargetABI value is set to
either ELF-variant in resetSubtargetFeatures(...) based on endianess
(unless explicitly set previously). As I understand it ELFv2 is a new
ABI but which ABI does ELFv1 map to?
- Since isSVR4ABI() is defined as !isDarwin() it currently is possible
for SVR4 and ELFv2 to be true at the same time which doesn't seem
correct to me.
- My understanding of SVR4ABI have been that it is the 32-bit PPC
processor supplement from Sun. Is this correct? If so, which ABI is
used for 64-bit non-Darwin?

I'm trying to implement the PPC EABI (which is based on the SVR4ABI)
for an out-of-tree subtarget which means I need to understand the
current status a bit better.

Best regards
David



More information about the llvm-dev mailing list