MIPS计划:指令数量

时间:2018-04-16 06:41:14

标签: assembly mips instructions

如何计算以下MIPS程序中执行的指令总数?

      ADDI R1, R0, #1
      SW R1, 2000 (R0)
LOOP: LW R1, 2000 (R0)
      MULT R2, R1, #4
      ADDI R3,R2, #5000
      LW R4, 0 (R3)
      LW R5, 1500 (R0)
      ADD R6, R4, R5
      LW R1, 2000 (R0)
      MULT R2, R1, #4
      ADDI R1, R1, #1
      SW R6, 0(R7)
      SW R1, 2000 (R0)
      ADDI R1, R1, #1
      SW R1, 2000 (R0)
      ADDI R1, R1, #1
      LW R1, 2000 (R0)
      ADDI R8, R1, #-101
      BNEZ R8, LOOP

0 个答案:

没有答案