@@ -19,6 +19,7 @@ Author: Daniel Kroening
19
19
#include < util/xml_irep.h>
20
20
21
21
#include < langapi/language_util.h>
22
+ #include < util/arith_tools.h>
22
23
23
24
#include " printf_formatter.h"
24
25
#include " xml_expr.h"
@@ -88,16 +89,31 @@ void convert(
88
89
}
89
90
}
90
91
91
- std::string full_lhs_string, full_lhs_value_string;
92
+ std::string full_lhs_string, full_lhs_value_string,
93
+ full_lhs_value_binary_string;
92
94
93
95
if (step.full_lhs .is_not_nil ())
94
96
full_lhs_string = from_expr (ns, identifier, step.full_lhs );
95
97
96
98
if (step.full_lhs_value .is_not_nil ())
99
+ {
97
100
full_lhs_value_string = from_expr (ns, identifier, step.full_lhs_value );
101
+ if (can_cast_type<floatbv_typet>(step.full_lhs_value .type ()))
102
+ {
103
+ const auto width =
104
+ to_floatbv_type (step.full_lhs_value .type ()).get_width ();
105
+ full_lhs_value_binary_string =
106
+ integer2binary (bvrep2integer (step.full_lhs_value .get (ID_value),
107
+ width,
108
+ false ), width);
109
+ }
110
+ }
98
111
99
112
xml_assignment.new_element (" full_lhs" ).data = full_lhs_string;
100
- xml_assignment.new_element (" full_lhs_value" ).data = full_lhs_value_string;
113
+ xmlt &full_lhs_value_node = xml_assignment.new_element (" full_lhs_value" );
114
+ if (full_lhs_value_binary_string != " " )
115
+ full_lhs_value_node.set_attribute (" binary" , full_lhs_value_binary_string);
116
+ full_lhs_value_node.data = full_lhs_value_string;
101
117
102
118
xml_assignment.set_attribute_bool (" hidden" , step.hidden );
103
119
xml_assignment.set_attribute (" thread" , std::to_string (step.thread_nr ));
0 commit comments