mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 16:00:08 +01:00
nak: use foo &= bar instead of foo = foo & bar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
This commit is contained in:
parent
6d881284c3
commit
ce04b8a578
2 changed files with 2 additions and 2 deletions
|
|
@ -4432,7 +4432,7 @@ fn reduce_shift_imm(shift: &mut Src, wrap: bool, bits: u32) {
|
|||
debug_assert!(shift.src_mod.is_none());
|
||||
if let SrcRef::Imm32(shift) = &mut shift.src_ref {
|
||||
if wrap {
|
||||
*shift = *shift & (bits - 1);
|
||||
*shift &= bits - 1;
|
||||
} else {
|
||||
*shift = std::cmp::min(*shift, bits)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1053,7 +1053,7 @@ impl SM32Op for OpBfe {
|
|||
use RegFile::GPR;
|
||||
b.copy_alu_src_if_not_reg(&mut self.base, GPR, SrcType::ALU);
|
||||
if let SrcRef::Imm32(imm) = &mut self.range.src_ref {
|
||||
*imm = *imm & 0xffff; // Only the lower 2 bytes matter
|
||||
*imm &= 0xffff; // Only the lower 2 bytes matter
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue