title: Can anyone please explain this in a easier way?
body: <p>I had take up a computer organization course a year ago and now I have a follow up to it as 'Computer architecture' , I am using the 3rd edition of John Hennessy's book 'Quantitative approach to computer architecture', I went through the MIPS ISA but still need some help , can you explain this line of code in greater detail </p>
  
  <p><strong>Source code:</strong></p>
  
  <pre><code>for(i=1000; i&gt;0; i--)
      x[i] = x[i] + s;
  </code></pre>
  
  <p><strong>Assembly code:</strong></p>
  
  <pre><code>   Loop:      L.D         F0, 0(R1)          ; F0 = array element
                ADD.D       F4, F0, F2        ; add scalar
                S.D         F4, 0(R1)          ; store result
                DADDUI      R1, R1,# -8      ; decrement address pointer
                BNE         R1, R2, Loop    ; branch if R1 != R2
  </code></pre>
  
  <p>This is given as an example for loop unrolling to exploit ILP , I have a few doubts . I do get it that the array starts at Mem[0+R1] and goes backwards till Mem[R+8](as given in the text) , any reason for this or they just randomly took this  location?</p>
  
  <p>Also why use a DADDUI (unsigned ) when we are adding a signed number (-8) ? </p>
  
  <p>Please give a detailed overview of this so that i can follow along the rest of the topics.
  Thanks</p>