summaryrefslogtreecommitdiff
path: root/gcc/double-int.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-15 11:39:52 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-15 11:39:52 +0000
commiteb7e53de7b0020468ed3461e1545eae635d4ffe1 (patch)
tree18e509006bd9fc9d9db00f9058fc2e4c3bad8377 /gcc/double-int.h
parenta66c9777da9b8fe0739899f59dfe7bb8443ffdd4 (diff)
downloadgcc-eb7e53de7b0020468ed3461e1545eae635d4ffe1.tar.gz
2012-08-15 Richard Guenther <rguenther@suse.de>
* double-int.h (double_int::from_unsigned): Rename to ... (double_int::from_uhwi): ... this. (double_int::from_signed): Rename to ... (double_int::from_shwi): ... this. (double_int::to_signed): Rename to ... (double_int::to_shwi): ... this. (double_int::to_unsigned): Rename to ... (double_int::to_uhwi): ... this. (double_int::fits_unsigned): Rename to ... (double_int::fits_uhwi): ... this. (double_int::fits_signed): Rename to ... (double_int::fits_shwi): ... this. (double_int::fits): Rename to ... (double_int::fits_hwi): ... this. * double-int.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190410 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/double-int.h')
-rw-r--r--gcc/double-int.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/double-int.h b/gcc/double-int.h
index 9bbf644603c..3d9aa2caa9d 100644
--- a/gcc/double-int.h
+++ b/gcc/double-int.h
@@ -60,8 +60,8 @@ public:
Second, the GCC conding conventions prefer explicit conversion,
and explicit conversion operators are not available until C++11. */
- static double_int from_unsigned (unsigned HOST_WIDE_INT cst);
- static double_int from_signed (HOST_WIDE_INT cst);
+ static double_int from_uhwi (unsigned HOST_WIDE_INT cst);
+ static double_int from_shwi (HOST_WIDE_INT cst);
/* No copy assignment operator or destructor to keep the type a POD. */
@@ -83,14 +83,14 @@ public:
/* Conversion functions. */
- HOST_WIDE_INT to_signed () const;
- unsigned HOST_WIDE_INT to_unsigned () const;
+ HOST_WIDE_INT to_shwi () const;
+ unsigned HOST_WIDE_INT to_uhwi () const;
/* Conversion query functions. */
- bool fits_unsigned () const;
- bool fits_signed () const;
- bool fits (bool uns) const;
+ bool fits_uhwi () const;
+ bool fits_shwi () const;
+ bool fits_hwi (bool uns) const;
/* Attribute query functions. */
@@ -186,7 +186,7 @@ public:
HOST_WIDE_INT are filled with the sign bit. */
inline
-double_int double_int::from_signed (HOST_WIDE_INT cst)
+double_int double_int::from_shwi (HOST_WIDE_INT cst)
{
double_int r;
r.low = (unsigned HOST_WIDE_INT) cst;
@@ -198,7 +198,7 @@ double_int double_int::from_signed (HOST_WIDE_INT cst)
static inline double_int
shwi_to_double_int (HOST_WIDE_INT cst)
{
- return double_int::from_signed (cst);
+ return double_int::from_shwi (cst);
}
/* Some useful constants. */
@@ -206,17 +206,17 @@ shwi_to_double_int (HOST_WIDE_INT cst)
The problem is that a named constant would not be as optimizable,
while the functional syntax is more verbose. */
-#define double_int_minus_one (double_int::from_signed (-1))
-#define double_int_zero (double_int::from_signed (0))
-#define double_int_one (double_int::from_signed (1))
-#define double_int_two (double_int::from_signed (2))
-#define double_int_ten (double_int::from_signed (10))
+#define double_int_minus_one (double_int::from_shwi (-1))
+#define double_int_zero (double_int::from_shwi (0))
+#define double_int_one (double_int::from_shwi (1))
+#define double_int_two (double_int::from_shwi (2))
+#define double_int_ten (double_int::from_shwi (10))
/* Constructs double_int from unsigned integer CST. The bits over the
precision of HOST_WIDE_INT are filled with zeros. */
inline
-double_int double_int::from_unsigned (unsigned HOST_WIDE_INT cst)
+double_int double_int::from_uhwi (unsigned HOST_WIDE_INT cst)
{
double_int r;
r.low = cst;
@@ -228,7 +228,7 @@ double_int double_int::from_unsigned (unsigned HOST_WIDE_INT cst)
static inline double_int
uhwi_to_double_int (unsigned HOST_WIDE_INT cst)
{
- return double_int::from_unsigned (cst);
+ return double_int::from_uhwi (cst);
}
inline double_int &
@@ -270,7 +270,7 @@ double_int::operator -= (double_int b)
double_int::fits_signed. */
inline HOST_WIDE_INT
-double_int::to_signed () const
+double_int::to_shwi () const
{
return (HOST_WIDE_INT) low;
}
@@ -279,14 +279,14 @@ double_int::to_signed () const
static inline HOST_WIDE_INT
double_int_to_shwi (double_int cst)
{
- return cst.to_signed ();
+ return cst.to_shwi ();
}
/* Returns value of CST as an unsigned number. CST must satisfy
double_int::fits_unsigned. */
inline unsigned HOST_WIDE_INT
-double_int::to_unsigned () const
+double_int::to_uhwi () const
{
return low;
}
@@ -295,13 +295,13 @@ double_int::to_unsigned () const
static inline unsigned HOST_WIDE_INT
double_int_to_uhwi (double_int cst)
{
- return cst.to_unsigned ();
+ return cst.to_uhwi ();
}
/* Returns true if CST fits in unsigned HOST_WIDE_INT. */
inline bool
-double_int::fits_unsigned () const
+double_int::fits_uhwi () const
{
return high == 0;
}
@@ -310,7 +310,7 @@ double_int::fits_unsigned () const
static inline bool
double_int_fits_in_uhwi_p (double_int cst)
{
- return cst.fits_unsigned ();
+ return cst.fits_uhwi ();
}
/* Returns true if CST fits in signed HOST_WIDE_INT. */
@@ -319,14 +319,14 @@ double_int_fits_in_uhwi_p (double_int cst)
inline bool
double_int_fits_in_shwi_p (double_int cst)
{
- return cst.fits_signed ();
+ return cst.fits_shwi ();
}
/* FIXME(crowl): Remove after converting callers. */
inline bool
double_int_fits_in_hwi_p (double_int cst, bool uns)
{
- return cst.fits (uns);
+ return cst.fits_hwi (uns);
}
/* The following operations perform arithmetics modulo 2^precision,