26: Fix Misa::has_extension() r=dvc94ch a=Disasm Co-authored-by: Vadim Kaushan <admin@disasm.info>
@@ -1,6 +1,6 @@
[package]
name = "riscv"
-version = "0.5.1"
+version = "0.5.2"
repository = "https://github.com/rust-embedded/riscv"
authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"]
categories = ["embedded", "hardware-support", "no-std"]
@@ -43,7 +43,7 @@ impl Misa {
if bit > 25 {
return false;
}
- self.bits() & (1 >> bit) == (1 >> bit)
+ self.bits() & (1 << bit) == (1 << bit)