Question: 3. Consider the following C code and corresponding assembly program below. // C code int s = 0; for (int i = 0; i
3. Consider the following C code and corresponding assembly program below. // C code int s = 0; for (int i = 0; i < 1024; i++) { } x[i] = s * x[i]; s +=x[i]; ;; assembly LOOP1: LD MUL ST F4, 0 (R1) ADD F2, F2, F4 ADDI R1, R1, 8 SEQ R3, R1, R2 BEQZ R3, LOOP1 NOP FO, 0 (R1) F4, FO, F2 a) Convert the assembly code above to a DFG where the nodes of the graph represent the instructions. b) Using the DFG above, convert the assembly program above to SSA form, meaning each register only gets a single assignment and each register uses the alpha notation as we did in class.
Step by Step Solution
There are 3 Steps involved in it
a DFG Data Flow Graph for the given assembly code LD F0 0R1 V MUL F4 F0 F... View full answer
Get step-by-step solutions from verified subject matter experts
