19 if(width % byte_bits != 0)
24 std::size_t dest_base = width;
26 for(std::size_t src = 0; src < width; ++src)
28 std::size_t bit_offset = src % byte_bits;
30 dest_base -= byte_bits;
35 result[src].swap(result[dest_base + bit_offset]);
API to expression classes for bitvectors.
virtual const bvt & convert_bv(const exprt &expr, const std::optional< std::size_t > expected_width={})
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
virtual bvt convert_bswap(const bswap_exprt &expr)
bvt conversion_failed(const exprt &expr)
Print that the expression of x has failed conversion, then return a vector of x's width.
virtual std::size_t boolbv_width(const typet &type) const
The byte swap expression.
std::size_t get_bits_per_byte() const
typet & type()
Return the type of the expression.
std::vector< literalt > bvt