let rec bits_of_value _t value : t_bits = match value with
| V_int (c_int, i) ->
let ft = format_of_c_int_type c_int in
RtLib.to_bits ft (F.wrap i)
| V_float (c_float, f) ->
let ft = format_of_c_float_type c_float in
RtLib.to_bits ft (F.wrap f)
| V_pointer (ty, loc) ->
let ft = format_of_addr ty in
RtLib.to_bits ft (F.wrap (Tint.integer_of_xaddr loc))
| V_union _ -> unsupported "bits_of_value of union"
| V_record (comp, r) ->
let ft = format_of_compinfo comp in
let e = (F.wrap r) in
RtLib.to_bits ft e
| V_array (arr, t) ->
let ft = format_of_array arr in
let e = (F.wrap t) in
RtLib.to_bits ft e