https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106680

--- Comment #12 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Sebastian Huber from comment #10)
> (In reply to Kewen Lin from comment #9)
> > Note that now we only disable implicit powerpc64 for -m32 when the
> > OS_MISSING_POWERPC64 is set.
> > 
> >   /* Don't expect powerpc64 enabled on those OSes with OS_MISSING_POWERPC64,
> >      since they do not save and restore the high half of the GPRs correctly
> >      in all cases.  If the user explicitly specifies it, we won't interfere
> >      with the user's specification.  */
> > #ifdef OS_MISSING_POWERPC64
> >   if (OS_MISSING_POWERPC64
> >       && TARGET_32BIT
> >       && TARGET_POWERPC64
> >       && !(rs6000_isa_flags_explicit & OPTION_MASK_POWERPC64))
> >     rs6000_isa_flags &= ~OPTION_MASK_POWERPC64;
> > #endif
> > 
> > But rtems.h doesn't define OS_MISSING_POWERPC64
> 
> RTEMS supports the 64-bit PowerPC for the 64-bit multilibs.
> 

64-bit kernel should support 64-bit PowerPC, but does 32-bit kernel support
saving and restoring 64-bit regs?

The current rtems.h is saying yes, if it's no, we should fix the rtems.h and
you won't need the explicit -mno-powerpc64 then.


btw, take the comments in freebsd64.h for example.

/* FreeBSD doesn't support saving and restoring 64-bit regs with a 32-bit
   kernel. This is supported when running on a 64-bit kernel with
   COMPAT_FREEBSD32, but tell GCC it isn't so that our 32-bit binaries
   are compatible. */
#define OS_MISSING_POWERPC64 !TARGET_64BIT

Reply via email to