diff options
author | Kugan Vivekanandarajah <kuganv@linaro.org> | 2016-08-06 21:11:26 +0000 |
---|---|---|
committer | Kugan Vivekanandarajah <kugan@gcc.gnu.org> | 2016-08-06 21:11:26 +0000 |
commit | a73f34c2d256fc23d41864193274e88d7d7b28cc (patch) | |
tree | a3a6c8db1277081e35d533447806110021f36f5b /gcc/data-streamer-out.c | |
parent | 19278b02d711d178cce78033a5a95ffeccbae42d (diff) | |
download | gcc-a73f34c2d256fc23d41864193274e88d7d7b28cc.zip gcc-a73f34c2d256fc23d41864193274e88d7d7b28cc.tar.gz gcc-a73f34c2d256fc23d41864193274e88d7d7b28cc.tar.bz2 |
data-streamer-in.c (streamer_read_wide_int): New.
gcc/ChangeLog:
2016-08-07 Kugan Vivekanandarajah <kuganv@linaro.org>
* data-streamer-in.c (streamer_read_wide_int): New.
(streamer_read_widest_int): Renamed function.
* data-streamer-out.c (streamer_write_wide_int): New
(streamer_write_widest_int): Renamed function.
* lto-streamer-in.c (streamer_read_wi): Renamed and moved to
data-stream-in.c.
(input_cfg): Call renamed function.
* lto-streamer-out.c (streamer_write_wi): Renamed and moved to
data-stream-out.c.
(output_cfg): Call renamed function.
* data-streamer.h: Add declarations.
From-SVN: r239213
Diffstat (limited to 'gcc/data-streamer-out.c')
-rw-r--r-- | gcc/data-streamer-out.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/data-streamer-out.c b/gcc/data-streamer-out.c index e476530..3dd423b 100644 --- a/gcc/data-streamer-out.c +++ b/gcc/data-streamer-out.c @@ -375,3 +375,30 @@ streamer_write_data_stream (struct lto_output_stream *obs, const void *data, } } +/* Emit the physical representation of wide_int VAL to output block OB. */ + +void +streamer_write_wide_int (struct output_block *ob, const wide_int &val) +{ + int len = val.get_len (); + + streamer_write_uhwi (ob, val.get_precision ()); + streamer_write_uhwi (ob, len); + for (int i = 0; i < len; i++) + streamer_write_hwi (ob, val.elt (i)); +} + +/* Emit the physical representation of widest_int W to output block OB. */ + +void +streamer_write_widest_int (struct output_block *ob, + const widest_int &w) +{ + int len = w.get_len (); + + streamer_write_uhwi (ob, w.get_precision ()); + streamer_write_uhwi (ob, len); + for (int i = 0; i < len; i++) + streamer_write_hwi (ob, w.elt (i)); +} + |