[cfarm-users] PowerPC 32 bit abi on gcc110.fsffrance.org

Segher Boessenkool segher at kernel.crashing.org
Sat Sep 7 23:10:52 CEST 2019


Hi!

On Sat, Sep 07, 2019 at 05:47:45PM -0300, Paulo César Pereira de Andrade via cfarm-users wrote:
>   Just testing for hopefully soon new release of GNU Lightning, I noticed
> now when building with -m32 it appears to have a different abi that I
> could not find any description searching on google; probably I did not
> search enough..
> 
>   If I recall correctly, previously it did work almost identically to
> the 64 bit abi, but last time I tested powerpc 32 bit abi was like 2
> years ago, still on gcc110.fsfrance.org. Previously I believe it had
> Fedora installed, now it is a recent/updated CentOS 7.
> 
>   It does not define _CALL_ELF, and is very close to _CALL_ELF == 2. With
> minor changes to lightning, all integer operations work as long as not
> involving varargs functions. On some quick checks could not understand
> the changes to varargs and float registers.

[segher at gcc1-power7 gcc]$ :|gcc -E -dM -|grep CALL
#define _CALL_AIXDESC 1
#define _CALL_LINUX 1
#define _CALL_AIX 1
#define _CALL_ELF 1

That is the powerpc64-linux ABI, also knows as ELFv1.  This is close to
the (much newer) ELFv2 ABI, but there are some important differences: it
has a smaller size minimum stack frame, it doesn't have function
descriptors everywhere, it uses homogeneous aggregates.

Either way, this is not what you want: you want a 32-bit ABI.  Which is:

[segher at gcc1-power7 gcc]$ :|gcc -E -dM -m32 -|grep CALL
#define _CALL_SYSV 1

That is the powerpc-linux ABI.

>   If you can, please give me some hints of a description of the abi.

I'm not sure what you want to know?

*All* PowerPC ABIs are quite similar, if you don't look very deeply.


Segher


More information about the cfarm-users mailing list