1.htm
来自「浙江大学计算机学院计算机组成教材《计算机组成与设计》(潘学增)的课堂教学课件。」· HTM 代码 · 共 201 行 · 第 1/2 页
HTM
201 行
<td width="27%"><strong><font color="#000000">3 operands;data in registers</font> </strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">subtract</font></strong></td>
<td width="22%"><strong><font color="#000000">sub $1,$2,$3</font></strong></td>
<td width="29%"><strong><font color="#000000">$1=$2-$3</font></strong></td>
<td width="27%"><strong><font color="#000000">3 operands;data in registers</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">add immediate</font></strong></td>
<td width="22%"><strong><font color="#000000">addi $1,$2,100</font></strong></td>
<td width="29%"><strong><font color="#000000">$1=$2+100</font></strong></td>
<td width="27%"><strong><font color="#000000">Used to add constants</font></strong></td>
</tr>
<tr>
<td width="9%" rowspan="3"><strong><font color="#000000">Data transfer</font></strong></td>
<td width="13%"><strong><font color="#000000">load word</font></strong></td>
<td width="22%"><strong><font color="#000000">lw $1,100($2)</font></strong></td>
<td width="29%"><strong><font color="#000000">$1=Memory[$2+100]</font></strong></td>
<td width="27%"><strong><font color="#000000">Data from memory to register</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">store word</font></strong></td>
<td width="22%"><strong><font color="#000000">sw $1,100($2)</font></strong></td>
<td width="29%"><strong><font color="#000000">Memory[$2+100]=$1</font></strong></td>
<td width="27%"><strong><font color="#000000">Date from register to memory</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">load upper imm</font></strong></td>
<td width="22%"><strong><font color="#000000">lui $1,100</font></strong></td>
<td width="29%"><strong><font color="#000000">S1=100*2^16</font></strong></td>
<td width="27%"><strong><font color="#000000">Loads constant in upper 16 bits</font></strong></td>
</tr>
<tr>
<td width="9%" rowspan="6"><strong><font color="#000000">Conditional branch</font></strong></td>
<td width="13%"><strong><font color="#000000">branch on equal</font> </strong></td>
<td width="22%"><strong><font color="#000000">beq $1,$2,100</font></strong></td>
<td width="29%"><strong><font color="#000000">if($1==$2) go to PC+4+100</font></strong></td>
<td width="27%"><strong><font color="#000000">Equal test;PC relative branch</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">branch on not equal</font></strong></td>
<td width="22%"><strong><font color="#000000">bne $1,$2,100</font></strong></td>
<td width="29%"><strong><font color="#000000">if($1!=$2) go to PC+4+100</font></strong></td>
<td width="27%"><strong><font color="#000000">Not equal test;PC relative branch</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">set on less than</font></strong></td>
<td width="22%"><strong><font color="#000000">slt $1,$2,$3</font></strong></td>
<td width="29%"><strong><font color="#000000">if($2<$3) $1=1;else $1=0</font></strong></td>
<td width="27%"><strong><font color="#000000">Compare less than; 2's comp</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">set on less than imm</font></strong></td>
<td width="22%"><strong><font color="#000000">slti $1,$2,100</font></strong></td>
<td width="29%"><strong><font color="#000000">if($2<100) $1=1;else $1=0</font></strong></td>
<td width="27%"><strong><font color="#000000">Compare < constant; 2's comp</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">set on less than unsigned</font></strong></td>
<td width="22%"><strong><font color="#000000">sltu $1,$2,$2</font></strong></td>
<td width="29%"><strong><font color="#000000">if($2<$3) $1=1;else $1=0</font></strong></td>
<td width="27%"><strong><font color="#000000">Compare less than;unsigned numbers</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">set on less than imm.unsegned</font></strong></td>
<td width="22%"><strong><font color="#000000">sltiu $1,$2,100</font></strong></td>
<td width="29%"><strong><font color="#000000">if($2<100) $1=1;else $1=0</font></strong></td>
<td width="27%"><strong><font color="#000000">Compare less than constant;unsigned numbers</font></strong></td>
</tr>
<tr>
<td width="9%" rowspan="3"><strong><font color="#000000">Unconditional jump</font></strong></td>
<td width="13%"><strong><font color="#000000">jump</font> </strong></td>
<td width="22%"><strong><font color="#000000">j 10000</font></strong></td>
<td width="29%"><strong><font color="#000000">go to 10000</font></strong></td>
<td width="27%"><strong><font color="#000000">Jump to target address</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">jump register</font></strong></td>
<td width="22%"><strong><font color="#000000">jr $31</font></strong></td>
<td width="29%"><strong><font color="#000000">go to $31</font></strong></td>
<td width="27%"><strong><font color="#000000">For switch,procedure return</font></strong></td>
</tr>
<tr>
<td width="13%"><strong><font color="#000000">jump and link</font></strong></td>
<td width="22%"><strong><font color="#000000">jal 10000</font></strong></td>
<td width="29%"><strong><font color="#000000">$31=PC+4; to to 10000</font></strong></td>
<td width="27%"><strong><font color="#000000">For procedure call</font></strong></td>
</tr>
</table>
<p><font color="#000000"> </font></p>
<p><strong><font color="#000000"> </font>
</strong></p>
<p><font color="#000000"> </font></p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?