This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] rs6000: Fix TARGET_PROMOTE_FUNCTION_MODE


On Thu, Jan 8, 2015 at 8:10 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> As the existing comment explains, we should always promote function
> arguments and return values.  However, notwithstanding its name,
> default_promote_function_mode_always_promote does not always promote.
> Importantly, it does not for libcalls.  This makes ftrapv-[12].c fail
> with 64-bit ABIs.
>
> This patch introduces an rs6000_promote_function_mode that _does_
> always promote, fixing this.
>
> Tested as usual (c,c++,fortran,ada; -m32,-m32/-mpowerpc64,-m64,-m64/-mlra).
> Is this okay for mainline?
>
>
> Segher
>
>
> 2015-01-08  Segher Boessenkool  <segher@kernel.crashing.org>
>
> gcc/
>         * config/rs6000/rs6000.c (TARGET_PROMOTE_FUNCTION_MODE): Implement
>         as rs6000_promote_function_mode.  Move comment to there.
>         (rs6000_promote_function_mode): New function.

rs6000_promote_function_mode should use the PROMOTE_MODE macro.  I
think that the macro has a bug for -m32 -mpowerpc64 in its use of
UNITS_PER_WORD.  But I prefer one definition of the behavior to avoid
divergence.

Thanks David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]