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] Validate the HLE memory models.


On 04/25/12 01:29, Andi Kleen wrote:
> gcc/:
> 2012-04-24  Andi Kleen  <ak@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~


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