I’m fairly new to MIPS, and I need to convert this MIPS code into C:
addi $t0, $t0, 0
sltiu $t1, $t0, 1000
beq $t1, $0, 7
sll $t1, $1, 2
After that it goes into some more operations, but this is the section I am having trouble translating. I think it is something along the lines of (not actual code following):
if (condition)
go 7 lines down
But I am confused by the 1000 in the sltiu, and how to set that up. If anyone can help me out I would really appreciate it. Thanks!
You can simplify the code to: