Browse Source

src/asm_parser.rs: support 64-bit unsigned immediate for lddw

Rich Lane 8 years ago
parent
commit
23ff50d8fa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/asm_parser.rs

+ 1 - 1
src/asm_parser.rs

@@ -47,7 +47,7 @@ fn integer<I>(input: I) -> ParseResult<i64, I>
     });
     let hex = string("0x")
         .with(many1(hex_digit()))
-        .map(|x: String| i64::from_str_radix(&x, 16).unwrap());
+        .map(|x: String| u64::from_str_radix(&x, 16).unwrap() as i64);
     let dec = many1(digit()).map(|x: String| i64::from_str_radix(&x, 10).unwrap());
     (sign, try(hex).or(dec)).map(|(s, x)| s * x).parse_stream(input)
 }