Lut3

lut3.sail

Generated by tools/lut3gen.py: do not edit. Every truth table of three inputs as the shortest straight-line program of AND, OR, XOR and NOT of the inputs (784 operations for the 256, fewest NOTs among the shortest): x is the 0xf0 input, y 0xcc and z 0xaa, and bit 4x + 2y + z of lut the result for those bits. gpu.sail's Lut3 (of a word's bits) and Lut3Bool (of bools), which LOP3 and PLOP3 take; tests/shader_sail_sm86.c checks every table whole

Part 1 2 3

        0xd9 => { let t0 = x & y; let t1 = not_vec(y); let t2 = z | t0; let t3 = EOR(t1, t2); t3 },
        0xda => { let t0 = x & y; let t1 = EOR(x, z); let t2 = t0 | t1; t2 },
        0xdb => { let t0 = not_vec(x); let t1 = EOR(x, z); let t2 = EOR(y, t0); let t3 = t1 | t2; t3 },
        0xdc => { let t0 = x & z; let t1 = EOR(x, t0); let t2 = y | t1; t2 },
        0xdd => { let t0 = not_vec(z); let t1 = y | t0; t1 },
        0xde => { let t0 = EOR(x, z); let t1 = y | t0; t1 },
        0xdf => { let t0 = x & z; let t1 = not_vec(t0); let t2 = y | t1; t2 },
        0xe0 => { let t0 = y | z; let t1 = x & t0; t1 },
        0xe1 => { let t0 = not_vec(x); let t1 = y | z; let t2 = EOR(t0, t1); t2 },
        0xe2 => { let t0 = EOR(x, z); let t1 = y & t0; let t2 = EOR(z, t1); t2 },
        0xe3 => { let t0 = not_vec(x); let t1 = x & z; let t2 = EOR(y, t0); let t3 = t1 | t2; t3 },
        0xe4 => { let t0 = EOR(x, y); let t1 = z & t0; let t2 = EOR(y, t1); t2 },
        0xe5 => { let t0 = not_vec(x); let t1 = x & y; let t2 = EOR(z, t0); let t3 = t1 | t2; t3 },
        0xe6 => { let t0 = x & y; let t1 = EOR(y, z); let t2 = t0 | t1; t2 },
        0xe7 => { let t0 = not_vec(x); let t1 = EOR(y, z); let t2 = EOR(y, t0); let t3 = t1 | t2; t3 },
        0xe8 => { let t0 = x & y; let t1 = x | y; let t2 = z | t0; let t3 = t1 & t2; t3 },
        0xe9 => { let t0 = not_vec(x); let t1 = x & y; let t2 = EOR(y, z); let t3 = EOR(t0, t2); let t4 = t1 | t3; t4 },
        0xea => { let t0 = x & y; let t1 = z | t0; t1 },
        0xeb => { let t0 = not_vec(x); let t1 = EOR(y, t0); let t2 = z | t1; t2 },
        0xec => { let t0 = x & z; let t1 = y | t0; t1 },
        0xed => { let t0 = not_vec(x); let t1 = EOR(z, t0); let t2 = y | t1; t2 },
        0xee => y | z,
        0xef => { let t0 = not_vec(x); let t1 = y | z; let t2 = t0 | t1; t2 },
        0xf0 => x,
        0xf1 => { let t0 = y | z; let t1 = not_vec(t0); let t2 = x | t1; t2 },
        0xf2 => { let t0 = y & z; let t1 = EOR(z, t0); let t2 = x | t1; t2 },
        0xf3 => { let t0 = not_vec(y); let t1 = x | t0; t1 },
        0xf4 => { let t0 = y & z; let t1 = EOR(y, t0); let t2 = x | t1; t2 },
        0xf5 => { let t0 = not_vec(z); let t1 = x | t0; t1 },
        0xf6 => { let t0 = EOR(y, z); let t1 = x | t0; t1 },
        0xf7 => { let t0 = y & z; let t1 = not_vec(t0); let t2 = x | t1; t2 },
        0xf8 => { let t0 = y & z; let t1 = x | t0; t1 },
        0xf9 => { let t0 = not_vec(y); let t1 = EOR(z, t0); let t2 = x | t1; t2 },
        0xfa => x | z,
        0xfb => { let t0 = x | z; let t1 = not_vec(y); let t2 = t0 | t1; t2 },
        0xfc => x | y,
        0xfd => { let t0 = x | y; let t1 = not_vec(z); let t2 = t0 | t1; t2 },
        0xfe => { let t0 = x | y; let t1 = z | t0; t1 },
        _ => 0xffffffff
    }

Part 1 2 3

Used by


Made from ScarletNX's Sail at 166ad3910f80. The Sail and the encodings' file are ScarletNX's (GPL-3.0-or-later); its encodings are from Mesa's NAK (sm70_encode.rs, MIT) and CuAssembler's sm_86 records.