[理工] [计组] BEQ

楼主: ken52011219 (呱)   2016-11-06 11:46:51
For a conditional branch instruction such as beq rs , rt , loop ,which
of following statement are true ?
(A) The label "loop" defines the base address of the branch target
(B) The label "loop" is an offset relative to the program counter which
points to the sequential instruction of the branch instruction
(C) The label "loop" is an unsigned number
(D) The label "loop" is coded into the instruction as "loop"
Ans : B
想请问C、D为何错 感谢
作者: boy00114 (ponny)   2016-11-08 00:26:00
这题老师上课是说c)可以填负数d)没有叫"loop"这个名字的指令 不知道有没有记错@@
作者: aa06697 (todo se andarà)   2016-11-07 11:51:00
楼上说的没错吧? 那16bit 要用signed number 来看
作者: yorunohoshi (夜の星)   2016-11-06 12:01:00
C的话 如果loop是在beq指令上方可以填负数D的话,在指令里会把loop转成"(PC+4)+相对位址*4"不晓得有没有记错@@
作者: Transfat (Transfat)   2016-11-06 13:21:00
C的解释还是有点不懂欸,什么叫作“可以填负数”啊
作者: k2shouai (coding....)   2016-11-06 14:03:00
你要跳的点在你所在行数的上方就要填负数。
作者: kyuudonut (善良老百姓)   2016-11-06 16:04:00
重点不是正数还是负数 而是se unit会把他当有号数看待啊啊 抱歉我看错意思了~ 请忽略

Links booklink

Contact Us: admin [ a t ] ucptt.com