nak: Fix shf.l.high on Maxwell

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30275>
This commit is contained in:
Faith Ekstrand 2024-07-20 17:47:30 -05:00 committed by Marge Bot
parent 9321a785cf
commit e1f1af58d9

View file

@ -1558,7 +1558,13 @@ impl SM50Op for OpShf {
e.set_reg_src(39..47, self.high);
e.set_bit(47, false); // .CC
e.set_bit(48, self.dst_high);
// If we're shifting left, the HW will throw an illegal instrucction
// encoding error if we set .high and will give us the high part anyway
// if we don't. This makes everything a bit more consistent.
assert!(self.right || self.dst_high);
e.set_bit(48, self.dst_high && self.right); // .high
e.set_bit(49, false); // .X
e.set_bit(50, self.wrap);
}