On Tue, 18 Nov 2014, Andrew Bennett wrote:

> My fix places a nop in the delay slot of the branch likely instruction
> by using the %~ output operation.  This then causes the sync code for the 
> previous example to be correct:
> 
>         .set    noat
>         sync     # 15   sync_new_addsi/2        [length = 24]
> 1:
>         ll      $3,0($4)
>         addu    $1,$3,$2
>         sc      $1,0($4)
>         beql    $1,$0,1b
>         nop
>         addu    $3,$3,$2
>         sync
>         .set    at

 OK, this does look to me like the correct way to address the issue, but 
where is the second NOP that you previously mentioned?  I fail to see it 
here and this code can't be made any better, there isn't anything you 
could possibly schedule into the delay slot as there is nothing else to 
do in this loop.

  Maciej

Reply via email to