stc.w


Conditional storage when atomic word data manipulation is complete (Store Conditional)

[Syntax]

-

stc.w reg3, [reg1]

[Function]

This instruction can only be executed successfully if a link exists that corresponds to the specified address. If a corresponding link exists, the word data of general-purpose register reg3 is stored in the memory and an atomic read-modify-write is executed.

If the corresponding link has been lost, the data is not stored in the memory and execution of this instruction fails.

Whether execution of the stc.w instruction has succeeded or not can be ascertained by checking the contents of general-purpose register reg3 after the instruction has been executed.

If execution of the stc.w instruction was successful, general-purpose register reg3 will be set (1). If execution failed, reg3 will be cleared (0).

This instruction can be used together with the ldl.w instruction to ensure accurate updating of the memory in a multi-core system.

Remark

Use the ldl.w and stc.w instructions instead of the caxi instruction if an atomic guarantee is required when updating the memory in a multi-core system.

[Description]

-

The assembler generates one stc.w machine instruction.

[Flag]

CY

---

OV

---

S

---

Z

---

SAT

---