Delay slot instruction

This topic contains 1 reply, has 2 voices, and was last updated by  ChrisImgtec 5 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #54053

    Anders
    Member

    Hi,

    Should the instruction in a branch delay slot be restartable? That is, are there circumstances in which the following snippet can return a value other than one?

      li $v0, 0
      b 1f
      addiu $v0, $v0, 1
    1:
      jr $ra
      nop
    #55732

    ChrisImgtec
    Moderator

    If there is a branch to the branch instead of the li then the code would add a 1 to what ever is in v0 at the time.

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.