vyre-conform 0.1.0

Conformance suite for vyre backends — proves byte-identical output to CPU reference
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub(crate) fn tweak(value: u32, mode: u8) -> u32 {
    let wrong = match mode % 8 {
        0 => value.wrapping_add(1),
        1 => value.wrapping_sub(1),
        2 => value ^ 1,
        3 => !value,
        4 => value.rotate_left(1),
        5 => value.rotate_right(1),
        6 => value.wrapping_add(0x9E37_79B9),
        _ => value ^ 0xA5A5_5A5A,
    };
    if wrong == value {
        value ^ 1
    } else {
        wrong
    }
}