Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
给定 MIPS 中的两个输入寄存器:$t0, $t1
如果不使用分支,您如何确定哪个更大?
您可以使用 SLT/SLTU 指令(设置小于 [无符号]):
SLT $t2,$t0,$t1
或者
SLTU $t2,$t0,$t1
如果 $t0 小于 $t1 则 $t2 将为 1,否则 $t2 将为 0。