作者gn00618777 (123)
看板Grad-ProbAsk
標題[理工] [計算機組織]-MIPS語言
時間Sun Sep 20 20:18:31 2009
Pseudoinstruction what is accomplishes Solution
mov $t5,$t3 $t5=$t3 add $t5,$t3,$zero
clear $t5 $t5=0
li $t5,small $t5=small
li $t5,big $t5=big
lw $t5,big($t3) $t5=Memory[$t3+big]
addi $t5,$t3,big $t5=$t3+big
beq $t5,small,L if($t5=small) go to L
beg $t5,big,L if($t5=big)go to L
ble $t5,$t3,L if($t5<=$t3)go to L
bgt $t5,$t3,L if($t5>$t3) go to L
bge $t5,$t3,L if($t5>=$t3)go to L
Q:for each pseudoinstructions in the following table,produce
a minimal sequence of actural MIPS instructions to accomplish
the same thing. You may need to use $at for some of the sequences
In the following table,big refers to aspecific number that requires 32bits
to respent and small to a number that can be express using 16bits
請問這個題目要你幹嘛= = 參詳了很久不知如何下手
能否大大能講解一下,我想知道他要我們幹嘛
92年成大資工
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.168.60.36
1F:→ BF3716:要你以最少的MIPS指令去完成假指令該做的內容 09/20 20:32
2F:→ BF3716:第一題mov $t5,$t3就要改成add $t5,$t3,$zero才有辦法執行 09/20 20:35
3F:→ gn00618777:前面的指令不能執行哦= = 我以為可以執行的說 09/20 20:42
4F:→ gn00618777:我有趣查一下MIPS指令 他是不是沒有move 指令? 09/20 20:43
5F:→ gn00618777:第一行要你完成$t5=$t3 照ex給的 add $t5,$t3,$zero 09/20 20:48
6F:→ gn00618777:代表的是$t3+0放到$t5 就會等於$t5=$t3 09/20 20:49
7F:→ gn00618777:照以前寫程式的觀念 $t5和$t3又沒初始怎麼能$t5=$t3 09/20 20:50
8F:推 BF3716:就當成$t5和$t3裡面已經有data,而你只要完成$t5<--$t3就好 09/20 21:04
9F:→ BF3716:而你只能用MIPS能用的指令去完成,而且還規定是最少指令完成 09/20 21:06