Consider this code snippet. bnez r1, L1 ; branch to L1 if r1 != 0 addi r1, r1, #1 ; r1 ß r1 + 1; with bnez instr. above, is if (r1 == 0) r1 = 1; L1: subi r3, r1, #1 ; subtract immediate, r3 ß r1 – 1,...


Consider this code snippet.
                 bnez    r1, L1              ; branch to L1 if r1 != 0
                  addi     r1, r1, #1         ; r1 ß r1 + 1; with bnez instr. above, is  if (r1 == 0) r1 = 1;
 L1:            subi     r3, r1, #1         ; subtract immediate, r3 ß r1 – 1, leading to ask if r1 == 1
                  bnez    r3, L2              ; branch to L2 if r1 != 1
                  …
 L2:


List the true data dependencies and the anti-dependencies in the code snippet in the form:
(From instruction mnemonic, To instruction mnemonic, register name).



Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here