Skip to content

Commit 1e51464

Browse files
bors[bot]Disasm
andcommitted
Merge #26
26: Fix Misa::has_extension() r=dvc94ch a=Disasm Co-authored-by: Vadim Kaushan <[email protected]>
2 parents 3307043 + c3ff239 commit 1e51464

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "riscv"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
repository = "https://github.com/rust-embedded/riscv"
55
authors = ["The RISC-V Team <[email protected]>"]
66
categories = ["embedded", "hardware-support", "no-std"]

src/register/misa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl Misa {
4343
if bit > 25 {
4444
return false;
4545
}
46-
self.bits() & (1 >> bit) == (1 >> bit)
46+
self.bits() & (1 << bit) == (1 << bit)
4747
}
4848
}
4949

0 commit comments

Comments
 (0)