[理工] [計算機組織]-MIPS語言

看板Grad-ProbAsk作者 (123)時間14年前 (2009/09/20 20:18), 編輯推噓1(108)
留言9則, 2人參與, 最新討論串1/1
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

09/20 20:32, , 1F
要你以最少的MIPS指令去完成假指令該做的內容
09/20 20:32, 1F

09/20 20:35, , 2F
第一題mov $t5,$t3就要改成add $t5,$t3,$zero才有辦法執行
09/20 20:35, 2F

09/20 20:42, , 3F
前面的指令不能執行哦= = 我以為可以執行的說
09/20 20:42, 3F

09/20 20:43, , 4F
我有趣查一下MIPS指令 他是不是沒有move 指令?
09/20 20:43, 4F

09/20 20:48, , 5F
第一行要你完成$t5=$t3 照ex給的 add $t5,$t3,$zero
09/20 20:48, 5F

09/20 20:49, , 6F
代表的是$t3+0放到$t5 就會等於$t5=$t3
09/20 20:49, 6F

09/20 20:50, , 7F
照以前寫程式的觀念 $t5和$t3又沒初始怎麼能$t5=$t3
09/20 20:50, 7F

09/20 21:04, , 8F
就當成$t5和$t3裡面已經有data,而你只要完成$t5<--$t3就好
09/20 21:04, 8F

09/20 21:06, , 9F
而你只能用MIPS能用的指令去完成,而且還規定是最少指令完成
09/20 21:06, 9F
文章代碼(AID): #1AjXsOWp (Grad-ProbAsk)