equal
deleted
inserted
replaced
62 #include <list> |
62 #include <list> |
63 #include <string> |
63 #include <string> |
64 #include <string.h> |
64 #include <string.h> |
65 #include <strings.h> |
65 #include <strings.h> |
66 |
66 |
67 #define GET_CVALUE(dtype, symbol) ((symbol)->const_value_##dtype->value) |
67 #define GET_CVALUE(dtype, symbol) ((symbol)->const_value._##dtype.value) |
68 #define VALID_CVALUE(dtype, symbol) ((NULL != (symbol)->const_value_##dtype) && (symbol_c::cs_const_value == (symbol)->const_value_##dtype->status)) |
68 #define VALID_CVALUE(dtype, symbol) (symbol_c::cs_const_value == (symbol)->const_value._##dtype.status) |
69 #define IS_OVERFLOW(dtype, symbol) ((NULL != (symbol)->const_value_##dtype) && (symbol_c::cs_overflow == (symbol)->const_value_##dtype->status)) |
69 #define IS_OVERFLOW(dtype, symbol) (symbol_c::cs_overflow == (symbol)->const_value._##dtype.status) |
70 |
70 |
71 /* set to 1 to see debug info during execution */ |
71 /* set to 1 to see debug info during execution */ |
72 static int debug = 0; |
72 static int debug = 0; |
73 |
73 |
74 fill_candidate_datatypes_c::fill_candidate_datatypes_c(symbol_c *ignore) { |
74 fill_candidate_datatypes_c::fill_candidate_datatypes_c(symbol_c *ignore) { |
1196 void *fill_candidate_datatypes_c::visit(NOT_operator_c *symbol) { |
1196 void *fill_candidate_datatypes_c::visit(NOT_operator_c *symbol) { |
1197 /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand> |
1197 /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand> |
1198 * NOT [<il_operand>] |
1198 * NOT [<il_operand>] |
1199 * However, it does not define the semantic of the NOT operation when the <il_operand> is specified. |
1199 * However, it does not define the semantic of the NOT operation when the <il_operand> is specified. |
1200 * We therefore consider it an error if an il_operand is specified! |
1200 * We therefore consider it an error if an il_operand is specified! |
|
1201 * We do not need to generate an error message. This error will be caught somewhere else! |
1201 */ |
1202 */ |
1202 if (NULL == prev_il_instruction) return NULL; |
1203 if (NULL == prev_il_instruction) return NULL; |
1203 for (unsigned int i = 0; i < prev_il_instruction->candidate_datatypes.size(); i++) { |
1204 for (unsigned int i = 0; i < prev_il_instruction->candidate_datatypes.size(); i++) { |
1204 if (is_ANY_BIT_compatible(prev_il_instruction->candidate_datatypes[i])) |
1205 if (is_ANY_BIT_compatible(prev_il_instruction->candidate_datatypes[i])) |
1205 add_datatype_to_candidate_list(symbol, prev_il_instruction->candidate_datatypes[i]); |
1206 add_datatype_to_candidate_list(symbol, prev_il_instruction->candidate_datatypes[i]); |