26: Fix Misa::has_extension() r=dvc94ch a=Disasm



Co-authored-by: Vadim Kaushan <admin@disasm.info>
This commit is contained in:
bors[bot] 2019-04-01 19:06:47 +00:00
commit 1e514648fd
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "riscv" name = "riscv"
version = "0.5.1" version = "0.5.2"
repository = "https://github.com/rust-embedded/riscv" repository = "https://github.com/rust-embedded/riscv"
authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"] authors = ["The RISC-V Team <risc-v@teams.rust-embedded.org>"]
categories = ["embedded", "hardware-support", "no-std"] categories = ["embedded", "hardware-support", "no-std"]

View File

@ -43,7 +43,7 @@ impl Misa {
if bit > 25 { if bit > 25 {
return false; return false;
} }
self.bits() & (1 >> bit) == (1 >> bit) self.bits() & (1 << bit) == (1 << bit)
} }
} }