title: SPARC: Segfault error when using a store instruction
body: <p>I need to update an element in a long array passed as an argument for this routine by a number also passed as an argument.</p>
  
  <pre><code>/*
   * Function Prototype:
   * updateNumber( long * numberAr, long newNumber);
   */
  
   updateNumber:
           save    %sp, -96, %sp            ! makes the arguments accessible in the in registers
           ld      [%i0], %l0               ! maps numberAr[0] to %l0
           mov     %i1, %l1                 ! puts newNumber in %l1
  
           st      %l1, [%i0]               ! should store newNumber in numberAr[0], but causes a segfault error
  </code></pre>
  
  <p>I tried loading with ldsb and ldub and storing with stb instead, but those didn't work. What should I check to make this work? 
  I recently asked a similar question to this, but I couldn't figure out the solution this time even though the only difference should be that it's with longs instead of chars.</p>