【導(dǎo)讀】.11999©UCB. CPSC161. Lecture3. Prof..Bhuyan. .21999©UCB. oprsrtrdshamtfunct. oprsrt16bitaddress. op26bitaddress. R. I. J. .31999©UCB. add. add$s1,$s2,$s3$s1=$s2+$s3. Threeoperands;datainregisters. Arithmeticsubtract. sub$s1,$s2,$s3$s1=$s2-$s3. Threeoperands;datainregisters. loadupperimmediate. lui$s1,100. $s1=100*2. branchonequal. beq$s1,$s2,25. if($s1==$s2)goto. PC+4+100. Equaltest;PC-relativebranch. Conditional. branchonnotequal. bne$s1,$s2,25. if($s1!=$s2)goto. PC+4+100. Notequaltest;PC-relative. slt$s1,$s2,$s3. if($s2<$s3)$s1=1;else$s1=0. Comparelessthan;forbeq,bne. setlessthan. immediate. slti$s1,$s2,100. if($s2<100)$s1=1;else$s1=0. Uncondi-jumpregisterjr$ragoto$raForswitch,procedurereturn. R-format. I-format. I-format. <-R-format. <-J-format. <-R-format. <-J-format. .41999©UCB. insteadofr0,r1,…,r31,use. $s0,$s1,…forregisters. $t0,$t1,…forregisters. $s0,$s1,…,$t0,$t1,…,tor0,r1,…(.,intfahr),Assemblyoperands. .51999©UCB. $a0-$a34-7arguments. $t0-$t78-15temporaries. $s0-$s716-23saved. $t8-$t924-25moretemporaries. $gp28globalpointer. $sp29stackpointer. $fp30framepointer. $ra31returnaddress. .61999©UCB. registers