Explorar el Código

Merge #26

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



Co-authored-by: Vadim Kaushan <admin@disasm.info>
bors[bot] hace 6 años
padre
commit
1e514648fd
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1 1
      Cargo.toml
  2. 1 1
      src/register/misa.rs

+ 1 - 1
Cargo.toml

@@ -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"]

+ 1 - 1
src/register/misa.rs

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