diff options
-rw-r--r-- | src/isa/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/isa/mod.rs b/src/isa/mod.rs index cfdde50..9da1751 100644 --- a/src/isa/mod.rs +++ b/src/isa/mod.rs @@ -155,8 +155,8 @@ impl Instruction { pub fn s_imm(&self) -> SignedWord { let low = (self.word >> 7) & 0x1F; - let high = (((self.word as SignedWord) >> 25) & 0x7F) as Word; - ((high << 7) | low) as SignedWord + let high = ((self.word as SignedWord) >> 25) as Word; + ((high << 5) | low) as SignedWord } pub fn uj_imm(&self) -> SignedWord { |