On Fri, Oct 28, 2016 at 07:27:56PM +0200, Eric Botcazou wrote:
> Thanks for the hint.  The hook is the way to go I think because BITS_PER_WORD 
> is not a constant, so the default would not be properly initialized.  Here's 
> a 
> tentative patch, I'll add a couple of SPARC-specific testcases if accepted.
> 
> Tested on SPARC/Solaris, OK for the mainline?
> 
> 
>       * doc/tm.texi.in (Target Macros) Add TARGET_MIN_ARITHMETIC_PRECISION.
>       * doc/tm.texi: Regenerate.
>       * internal-fn.c (expand_arith_overflow): Rewrite handling of target
>       dependent support by means of TARGET_MIN_ARITHMETIC_PRECISION.
>       * target.def (min_arithmetic_precision): New hook.
>       * targhooks.c (default_min_arithmetic_precision): New function.
>       * targhooks.h (default_min_arithmetic_precision): Declare.
>       * config/sparc/sparc.c (TARGET_MIN_ARITHMETIC_PRECISION): Define.
>       (sparc_min_arithmetic_precision): New function.

Ok, thanks.

        Jakub

Reply via email to