|
12 | 12 | #include "format_expr.h"
|
13 | 13 |
|
14 | 14 | #include "arith_tools.h"
|
| 15 | +#include "byte_operators.h" |
15 | 16 | #include "expr.h"
|
16 | 17 | #include "expr_iterator.h"
|
17 | 18 | #include "fixedbv.h"
|
@@ -210,6 +211,22 @@ std::ostream &format_rec(std::ostream &os, const exprt &expr)
|
210 | 211 | else if(id == ID_typecast)
|
211 | 212 | return os << "cast(" << format(to_typecast_expr(expr).op()) << ", "
|
212 | 213 | << format(expr.type()) << ')';
|
| 214 | + else if( |
| 215 | + id == ID_byte_extract_little_endian || id == ID_byte_extract_big_endian) |
| 216 | + { |
| 217 | + const auto &byte_extract_expr = to_byte_extract_expr(expr); |
| 218 | + return os << id << "(" << format(byte_extract_expr.op()) << ", " |
| 219 | + << format(byte_extract_expr.offset()) << ", " |
| 220 | + << format(byte_extract_expr.type()) << ')'; |
| 221 | + } |
| 222 | + else if(id == ID_byte_update_little_endian || id == ID_byte_update_big_endian) |
| 223 | + { |
| 224 | + const auto &byte_update_expr = to_byte_update_expr(expr); |
| 225 | + return os << id << "(" << format(byte_update_expr.op()) << ", " |
| 226 | + << format(byte_update_expr.offset()) << ", " |
| 227 | + << format(byte_update_expr.value()) << ", " |
| 228 | + << format(byte_update_expr.type()) << ')'; |
| 229 | + } |
213 | 230 | else if(id == ID_member)
|
214 | 231 | return os << format(to_member_expr(expr).op()) << '.'
|
215 | 232 | << to_member_expr(expr).get_component_name();
|
|
0 commit comments