[Bug 195] powerpc: ABI confusion

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu Jan 10 20:05:54 UTC 2008


http://www.rtems.org/bugzilla/show_bug.cgi?id=195


Joel Sherrill <joel.sherrill at oarcorp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING

strauman at slac.stanford.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |strauman at slac.stanford.edu
           Platform|                            |All
   Target Milestone|---                         |4.9


The ABI used by GCC is sysv4, 
Several parts in powerpc-RTEMS however seem to assume
eabi.

Eg. From ppc.h:

/*
 *  Default to the EABI used by current GNU tools
 */

#ifndef PPC_ABI
#define PPC_ABI PPC_ABI_EABI
#endif

This is just wrong, because gcc explictly uses -mno-eabi for RTEMS.

Release:
RTEMS-CVS

Environment:
gcc >= 3.0

--- Comment #1 from Ralf Corsepius <ralf.corsepius at rtems.org>  2002-04-23 19:47:00 ---
Fix:
Clarify the ABI situation.

>From Thomas Doerfler:
EABI and SVR4 are sufficently similar to accept the setting "no-eabi" for multilib generation. Only data type "long double" inside structures at non-16-byte-aligned positions might lead to trouble.

--- Comment #2 from Joel Sherrill <joel.sherrill at oarcorp.com>  2002-05-14 13:49:38 ---
State-Changed-From-To: open->feedback
State-Changed-Why: From config.gcc... how does RTEMS differ from the target
    powerpc-eabi in regards to the API used?
    
    powerpc-*-eabi*)
            xm_defines=POSIX
            tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h"
            tmake_file="rs6000/t-ppcgas rs6000/t-ppccomm"
            ;;
    powerpc-*-rtems*)
            xm_defines=POSIX
            tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
            tmake_file="rs6000/t-ppcgas t-rtems rs6000/t-ppccomm"
            if test x$enable_threads = xyes; then
              thread_file='rtems'
            fi
            ;;


--- Comment #3 from strauman at slac.stanford.edu  2008-01-10 14:05:53 ---
(In reply to comment #1)
> Fix:
> Clarify the ABI situation.
> 
> From Thomas Doerfler:
> EABI and SVR4 are sufficently similar to accept the setting "no-eabi" for multilib generation. Only data type "long double" inside structures at non-16-byte-aligned positions might lead to trouble.

>From Till Straumann:
Stack alignment is also different; EABI requires 8-bytes, SVR4 16-bytes.
RTEMS currently aligns the stack only to 8-bytes (since EABI is the default).
This is in violation of SVR4 but largely goes unnoticed (but it breaks
e.g., altivec which needs 16-byte stack alignment. Altivec is AFAIK compatible
with svr4 but not eabi).


-- 
Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the bugs mailing list