bitwise #15

Open
dbidwell wants to merge 17 commits from bitwise into master
Showing only changes of commit 1f98ab8d75 - Show all commits

View File

@@ -39,7 +39,7 @@ pub fn constant_propagation<'a>(
}), }),
Instruction::Sra(dst, a, b) => try_fold_bitwise(dst, a, b, &registers, |x, y| { Instruction::Sra(dst, a, b) => try_fold_bitwise(dst, a, b, &registers, |x, y| {
if y >= 64 { if y >= 64 {
(if x < 0 { -1 } else { 0 }) if x < 0 { -1 } else { 0 }
} else { } else {
x >> y as u32 x >> y as u32
} }