specifyng wrapping add

This commit is contained in:
Mwa
2026-03-12 15:10:14 +01:00
parent 2741332630
commit d762e1449b
2 changed files with 7 additions and 5 deletions

View File

@@ -309,7 +309,7 @@ fn op2(s: &str, n: usize, l: &str) -> Op2 {
"r15" => 15,
_ => match parse_int::parse::<i64>(s) {
Ok(v) => {
if -0xFFFF <= v && v <= 0xFFFF {
if -0x10000 <= v && v <= 0xFFFF {
return Op2::Direct(v as i32);
} else {
println!("Error: constant {s} is too large to fit in {l} at line {n}");