MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / test_shift_and_slt

Function test_shift_and_slt

hail-fuzz/src/load_resizer.rs:740–753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

738
739#[test]
740fn test_shift_and_slt() {
741 let reg = pcode::VarNode::new(1, 1);
742
743 let mut block = pcode::Block::new();
744 let tmp = block.alloc_tmp(4);
745 block.push((tmp, pcode::Op::Load(0), 0x1000));
746
747 // Common pattern on THUMB is to check a particular bit by shifting it to the sign-bit and
748 // checking if the value is less than zero.
749 block.push((tmp, pcode::Op::IntLeft, tmp, 21));
750 block.push((reg, pcode::Op::IntSignedLess, (tmp, 0)));
751
752 check(block, 0, Some((10, 10)));
753}
754
755#[test]
756fn test_branch() {

Callers

nothing calls this directly

Calls 1

checkFunction · 0.85

Tested by

no test coverage detected