aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-04-29 10:25:11 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2015-04-29 10:25:11 +0200
commit8848828bec1487a10d8153a586e7ca3df1aac7ad (patch)
treec8db741d997dc16869f35159c87069cc85f932b5 /gcc
parentc80476994516f9df0063bd787a5cfc8aed686c3c (diff)
downloadgcc-8848828bec1487a10d8153a586e7ca3df1aac7ad.zip
gcc-8848828bec1487a10d8153a586e7ca3df1aac7ad.tar.gz
gcc-8848828bec1487a10d8153a586e7ca3df1aac7ad.tar.bz2
c-common.h (omp_clause_mask): Unconditionally define as a class.
* c-common.h (omp_clause_mask): Unconditionally define as a class. Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of HOST_BITS_PER_WIDE_INT. From-SVN: r222561
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-common.h33
2 files changed, 18 insertions, 21 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 217aafb..8d10487 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-29 Jakub Jelinek <jakub@redhat.com>
+
+ * c-common.h (omp_clause_mask): Unconditionally define as a class.
+ Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
+ HOST_BITS_PER_WIDE_INT.
+
2015-04-28 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/65887
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index cabf452..603d3f0 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -1096,16 +1096,11 @@ extern void pp_dir_change (cpp_reader *, const char *);
extern bool check_missing_format_attribute (tree, tree);
/* In c-omp.c */
-#if HOST_BITS_PER_WIDE_INT >= 64
-typedef unsigned HOST_WIDE_INT omp_clause_mask;
-# define OMP_CLAUSE_MASK_1 ((omp_clause_mask) 1)
-#else
struct omp_clause_mask
{
inline omp_clause_mask ();
- inline omp_clause_mask (unsigned HOST_WIDE_INT l);
- inline omp_clause_mask (unsigned HOST_WIDE_INT l,
- unsigned HOST_WIDE_INT h);
+ inline omp_clause_mask (uint64_t l);
+ inline omp_clause_mask (uint64_t l, uint64_t h);
inline omp_clause_mask &operator &= (omp_clause_mask);
inline omp_clause_mask &operator |= (omp_clause_mask);
inline omp_clause_mask operator ~ () const;
@@ -1115,7 +1110,7 @@ struct omp_clause_mask
inline omp_clause_mask operator << (int);
inline bool operator == (omp_clause_mask) const;
inline bool operator != (omp_clause_mask) const;
- unsigned HOST_WIDE_INT low, high;
+ uint64_t low, high;
};
inline
@@ -1124,14 +1119,13 @@ omp_clause_mask::omp_clause_mask ()
}
inline
-omp_clause_mask::omp_clause_mask (unsigned HOST_WIDE_INT l)
+omp_clause_mask::omp_clause_mask (uint64_t l)
: low (l), high (0)
{
}
inline
-omp_clause_mask::omp_clause_mask (unsigned HOST_WIDE_INT l,
- unsigned HOST_WIDE_INT h)
+omp_clause_mask::omp_clause_mask (uint64_t l, uint64_t h)
: low (l), high (h)
{
}
@@ -1177,18 +1171,17 @@ inline omp_clause_mask
omp_clause_mask::operator << (int amount)
{
omp_clause_mask ret;
- if (amount >= HOST_BITS_PER_WIDE_INT)
+ if (amount >= 64)
{
ret.low = 0;
- ret.high = low << (amount - HOST_BITS_PER_WIDE_INT);
+ ret.high = low << (amount - 64);
}
else if (amount == 0)
ret = *this;
else
{
ret.low = low << amount;
- ret.high = (low >> (HOST_BITS_PER_WIDE_INT - amount))
- | (high << amount);
+ ret.high = (low >> (64 - amount)) | (high << amount);
}
return ret;
}
@@ -1197,17 +1190,16 @@ inline omp_clause_mask
omp_clause_mask::operator >> (int amount)
{
omp_clause_mask ret;
- if (amount >= HOST_BITS_PER_WIDE_INT)
+ if (amount >= 64)
{
- ret.low = high >> (amount - HOST_BITS_PER_WIDE_INT);
+ ret.low = high >> (amount - 64);
ret.high = 0;
}
else if (amount == 0)
ret = *this;
else
{
- ret.low = (high << (HOST_BITS_PER_WIDE_INT - amount))
- | (low >> amount);
+ ret.low = (high << (64 - amount)) | (low >> amount);
ret.high = high >> amount;
}
return ret;
@@ -1225,8 +1217,7 @@ omp_clause_mask::operator != (omp_clause_mask b) const
return low != b.low || high != b.high;
}
-# define OMP_CLAUSE_MASK_1 omp_clause_mask (1)
-#endif
+#define OMP_CLAUSE_MASK_1 omp_clause_mask (1)
enum c_omp_clause_split
{