1
我真的是MIPS新手,我有這些問題,我發現他們有很多不同的答案......如果有人能幫上忙,那就太好了。謝謝mips時鐘週期數和如何提高代碼
這段代碼需要多少個時鐘週期?
#Macro Instructions
li $t0, 32 # 1 or 2 cycles ?
# lui $at, Upper 16-bits of value
# ori Rd, $at, Lower 16-bits of value
# -----------------------------------
# ori Rt, $0, value
#
# Which set of instructions will be executed?
div $t2, $t2, $t0 # 41 cycles?
# bne Rt, $0,
# break $0
# ok: div Rs, Rt
# mflo Rd
#Integer Instruction
lw $t2, 0($t13) # 1 cycles?
sw $t2, 0($t3) # 1 cycles?
如何那些4行代碼可以顯著改善?通過避免使用宏或...?