Handle target specific memory models in C frontend
get_atomic_generic_size would error out for __atomic_store(...,__ATOMIC_HLE_RELEASE) Just mask it out. All the memory orders are checked completely in builtins.c anyways. I'm not sure what that check is for, it could be removed in theory. Passed bootstrap and test suite on x86-64 gcc/c-family/: 2012-11-09 Andi Kleen <ak@linux.intel.com> PR 55139 * c-common.c (get_atomic_generic_size): Mask with MEMMODEL_MASK From-SVN: r193363
This commit is contained in:
parent
962e3ae2aa
commit
ad7bac3130
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-11-09 Andi Kleen <ak@linux.intel.com>
|
||||
|
||||
PR 55139
|
||||
* c-common.c (get_atomic_generic_size): Mask with
|
||||
MEMMODEL_MASK
|
||||
|
||||
2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
PR c/53063
|
||||
|
|
|
@ -10097,7 +10097,7 @@ get_atomic_generic_size (location_t loc, tree function, VEC(tree,gc) *params)
|
|||
if (TREE_CODE (p) == INTEGER_CST)
|
||||
{
|
||||
int i = tree_low_cst (p, 1);
|
||||
if (i < 0 || i >= MEMMODEL_LAST)
|
||||
if (i < 0 || (i & MEMMODEL_MASK) >= MEMMODEL_LAST)
|
||||
{
|
||||
warning_at (loc, OPT_Winvalid_memory_model,
|
||||
"invalid memory model argument %d of %qE", x + 1,
|
||||
|
|
Loading…
Add table
Reference in a new issue