作者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