On 04/25/12 01:29, Andi Kleen wrote:
> gcc/:
> 2012-04-24  Andi Kleen  <a...@linux.intel.com>
> 
>       * builtins.c (get_memmodel): Add val. Call target.memmodel_check
>       and return new variable.
>       * config/i386/i386.c (ix86_memmodel_check): Add.
>       (TARGET_MEMMODEL_MASK): Replace with TARGET_MEMMODEL_CHECK.
>       * doc/tm.texi (TARGET_MEMMODEL_MASK): Replace with 
> TARGET_MEMMODEL_CHECK..
>       * doc/tm.texi.in (TARGET_MEMMODEL_MASK): Replace with 
> TARGET_MEMMODEL_CHECK.
>       * target.def (memmodel_mask): Replace with memmodel_check.

This looks much better to me than the mask solution.

> +  int val;

> +ix86_memmodel_check (unsigned val)

Please use HOST_WIDE_INT throughout, otherwise you'll fail to warn for
truly silly parameters such as 0x1_0000_0000.



r~

Reply via email to