(entry: &CmpInstData)
| 3 | use crate::{config::SKIP_COMPLEX_COMPARISIONS, i2s::Comparisons}; |
| 4 | |
| 5 | pub(crate) fn analyse_comparisons(entry: &CmpInstData) -> (ValueKind, ValueKind) { |
| 6 | let a_kind = match entry.op.arg1 { |
| 7 | pcode::Value::Var(_) => ValueKind::from_sequence(entry.values.iter().map(|(a, _)| *a)), |
| 8 | pcode::Value::Const(x, sz) => ValueKind::AlwaysConst(pcode::sxt64(x, sz as u64 * 8) as i64), |
| 9 | }; |
| 10 | let b_kind = match entry.op.arg2 { |
| 11 | pcode::Value::Var(_) => ValueKind::from_sequence(entry.values.iter().map(|(_, b)| *b)), |
| 12 | pcode::Value::Const(x, sz) => ValueKind::AlwaysConst(pcode::sxt64(x, sz as u64 * 8) as i64), |
| 13 | }; |
| 14 | (a_kind, b_kind) |
| 15 | } |
| 16 | |
| 17 | pub(crate) fn add_interesting_inst_cmps(entry: &CmpInstData, output: &mut Comparisons) { |
| 18 | if SKIP_COMPLEX_COMPARISIONS |
no outgoing calls
no test coverage detected