22 #ifndef GCC_DATA_STREAMER_H
23 #define GCC_DATA_STREAMER_H
64 const char *,
unsigned int,
bool);
66 const char *,
unsigned int,
bool);
170 bp->
pos = pos + nbits;
187 *(current_pointer++) = c;
196 static inline unsigned char
199 if (ib->
p >= ib->
len)
201 return (ib->
data[ib->
p++]);
216 gcc_checking_assert (val >= min && val <= max && range > 0
217 && range < 0x7fffffff);
235 gcc_checking_assert (range > 0 && range < 0x7fffffff);
238 if (val < min || val > max)
256 gcc_checking_assert (val >= min && val <= max && range > 0
257 && range < 0x7fffffff);
276 gcc_checking_assert (range > 0 && range < 0x7fffffff);
278 if (val < min || val > max)
285 #define streamer_write_enum(obs,enum_name,enum_last,val) \
286 streamer_write_hwi_in_range ((obs), 0, (int)(enum_last) - 1, (int)(val))
290 #define streamer_read_enum(ib,enum_name,enum_last) \
291 (enum enum_name)streamer_read_hwi_in_range ((ib), #enum_name, 0, \
292 (int)(enum_last) - 1)
296 #define bp_pack_enum(bp,enum_name,enum_last,val) \
297 bp_pack_int_in_range ((bp), 0, (int)(enum_last) - 1, (int)(val))
301 #define bp_unpack_enum(bp,enum_name,enum_last) \
302 (enum enum_name)bp_unpack_int_in_range ((bp), #enum_name, 0, \
303 (int)(enum_last) - 1)