What do the LL and SC instructions do?

This topic contains 1 reply, has 1 voice, and was last updated by  ChrisImgtec 3 years, 11 months ago.

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

    ChrisImgtec
    Moderator

    The LL (Load Linked) and SC (Store Conditional) instructions are used to atomically update (read-modify-write) locations in memory. When the LL instruction initiates a 32-bit load from memory, an internal CPU status bit is set. A subsequent SC instruction to the same address checks if the read-modify-write begun by the previous LL can complete atomically, and if so, writes the value to memory and sets rt = 1 (true). If the read-modify-write cannot complete atomically, no write to memory is performed and rt is set to 0 (false).

    #38259

    ChrisImgtec
    Moderator

    Imagination MIPS Support

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