Closed mkst closed 6 months ago
Looks like we have code to cover this exact case.. so perhaps it's for an older version of aspsx?
elif op == "sltu":
r_dest, r_source, r_operand = rest[0].split(",")
if re.match(r"^-?\d+$", r_operand) or re.match(
r"^-?0x[A-Fa-f0-9]+$", r_operand
):
value = int(r_operand)
if value < 0:
res.append(f"li\t$at,{r_operand}")
res.append(f"{op}\t{r_dest},{r_source},$at")
else:
res.append(line)
else:
res.append(line)
This scratch has a call to $at where it should just use $v1.
I feel like we shouldn't need to load the immediate value into a register?