| 724 | |
| 725 | #[test] |
| 726 | fn test_high_bits() { |
| 727 | let mut block = pcode::Block::new(); |
| 728 | let tmp = block.alloc_tmp(2); |
| 729 | block.push((tmp, pcode::Op::Load(0), 0x1000)); |
| 730 | let tmp2 = block.alloc_tmp(1); |
| 731 | block.push((tmp2, pcode::Op::Copy, tmp.slice(1, 1))); |
| 732 | let reg = pcode::VarNode::new(1, 2); |
| 733 | block.push((reg, pcode::Op::ZeroExtend, tmp2)); |
| 734 | |
| 735 | // If only the high bits are used then check that we support a zero-extend and shift. |
| 736 | check(block, 0, Some((8, 15))); |
| 737 | } |
| 738 | |
| 739 | #[test] |
| 740 | fn test_shift_and_slt() { |