summaryrefslogtreecommitdiff
path: root/gcc/double-int.h
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-02 21:47:37 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-02 21:47:37 +0000
commit6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad (patch)
tree76b362fb924ab4ffb8a4b4610503ff684275f92b /gcc/double-int.h
parentd11ae286bcc45264b87629485358d5642ab9301e (diff)
downloadgcc-6170dfb6edfb7b19f8ae5209b8f948fe0076a4ad.tar.gz
Merge trunk at revision 160193 into branch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/vect256@160194 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/double-int.h')
-rw-r--r--gcc/double-int.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/double-int.h b/gcc/double-int.h
index 65d25ef04cb..c13b112d496 100644
--- a/gcc/double-int.h
+++ b/gcc/double-int.h
@@ -126,6 +126,9 @@ double_int double_int_udivmod (double_int, double_int, unsigned, double_int *);
double_int double_int_setbit (double_int, unsigned);
/* Logical operations. */
+
+/* Returns ~A. */
+
static inline double_int
double_int_not (double_int a)
{
@@ -134,6 +137,26 @@ double_int_not (double_int a)
return a;
}
+/* Returns A | B. */
+
+static inline double_int
+double_int_ior (double_int a, double_int b)
+{
+ a.low |= b.low;
+ a.high |= b.high;
+ return a;
+}
+
+/* Returns A & B. */
+
+static inline double_int
+double_int_and (double_int a, double_int b)
+{
+ a.low &= b.low;
+ a.high &= b.high;
+ return a;
+}
+
/* Shift operations. */
double_int double_int_lshift (double_int, HOST_WIDE_INT, unsigned int, bool);
double_int double_int_rshift (double_int, HOST_WIDE_INT, unsigned int, bool);