summaryrefslogtreecommitdiff
path: root/gcc/double-int.h
diff options
context:
space:
mode:
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-30 11:04:30 +0000
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-30 11:04:30 +0000
commit52cd005d69a7a34f36e9e8ec523fe888805d8c6a (patch)
tree7cbebdbd492e700058cfc647470eb384b37f121e /gcc/double-int.h
parentdd6f8b2cbed986837a38474c25a35d2a991b671f (diff)
downloadgcc-52cd005d69a7a34f36e9e8ec523fe888805d8c6a.tar.gz
gcc/
PR tree-optimization/56064 * fixed-value.c (fixed_from_double_int): New function. * fixed-value.h (fixed_from_double_int): New prototype. (const_fixed_from_double_int): New static inline function. * fold-const.c (native_interpret_fixed): New static function. (native_interpret_expr) <FIXED_POINT_TYPE>: Use it. (can_native_interpret_type_p) <FIXED_POINT_TYPE>: Return true. (native_encode_fixed): New static function. (native_encode_expr) <FIXED_CST>: Use it. (native_interpret_int): Move double_int worker code to... * double-int.c (double_int::from_buffer): ...this new static method. * double-int.h (double_int::from_buffer): Prototype it. gcc/testsuite/ PR tree-optimization/56064 * gcc.dg/fixed-point/view-convert.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195574 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/double-int.h')
-rw-r--r--gcc/double-int.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/double-int.h b/gcc/double-int.h
index c5c2bba3919..5c425a84a45 100644
--- a/gcc/double-int.h
+++ b/gcc/double-int.h
@@ -59,6 +59,10 @@ struct double_int
static double_int from_shwi (HOST_WIDE_INT cst);
static double_int from_pair (HOST_WIDE_INT high, unsigned HOST_WIDE_INT low);
+ /* Construct from a fuffer of length LEN. BUFFER will be read according
+ to byte endianess and word endianess. */
+ static double_int from_buffer (const unsigned char *buffer, int len);
+
/* No copy assignment operator or destructor to keep the type a POD. */
/* There are some special value-creation static member functions. */