From bd0be59eb6ed363faba14adf9ab04efe8a714316 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 24 Oct 2021 19:20:27 -0700 Subject: unsigned immediate encodings do not have signed immediates --- src/armv8/a64.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs index c51d526..6bce61e 100644 --- a/src/armv8/a64.rs +++ b/src/armv8/a64.rs @@ -2827,7 +2827,7 @@ impl Decoder for InstDecoder { // V == 0 let Rt = (word & 0x1f) as u16; let Rn = ((word >> 5) & 0x1f) as u16; - let imm12 = ((((word >> 10) as i16) & 0x0fff) << 4) >> 4; + let imm12 = ((word >> 10) & 0x0fff) as i16; let size_opc = ((word >> 22) & 0x3) | ((word >> 28) & 0xc); match size_opc { 0b0000 => { -- cgit v1.1