This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] rs6000: Introducing rs6000_abi_word_mode
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 9 Jan 2015 10:51:22 -0500
- Subject: Re: [PATCH] rs6000: Introducing rs6000_abi_word_mode
- Authentication-results: sourceware.org; auth=none
- References: <0a1541b82e8d3ff150976862824db4eabba4e9c5 dot 1420816654 dot git dot segher at kernel dot crashing dot org>
On Fri, Jan 9, 2015 at 10:26 AM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> Some hooks return word_mode by default, which is incorrect for -m32
> -mpowerpc64. This patch creates a new function rs6000_abi_word_mode
> to implement these hooks, and does so.
>
> This fixes 163 testuite FAILs.
>
> Tested as usual; okay for mainline?
>
>
> 2015-01-09 Segher Boessenkool <segher@kernel.crashing.org>
>
> gcc/
> * config/rs6000/rs6000.c (TARGET_LIBGCC_CMP_RETURN_MODE,
> TARGET_LIBGCC_SHIFT_COUNT_MODE, TARGET_UNWIND_WORD_MODE): Implement
> as ...
> (rs6000_abi_word_mode): New function.
Okay.
> +/* The mode the ABI uses for a word. This is not the same as word_mode
> + for -m32 -mpowerpc64. This is used to implement various target hooks. */
> +
> +static enum machine_mode
> +rs6000_abi_word_mode (void)
> +{
> + return TARGET_32BIT ? SImode : DImode;
> +}
But I think that new code does not need "enum".
Thanks, David