SPRUI04F july 2015 – april 2023
Declare Memory References as Volatile
.volatile memref1 [, memref2 , …]
The .volatile directive allows you to designate memory references as volatile. Volatile loads and stores are not deleted. Volatile loads and stores are not reordered with respect to other volatile loads and stores.
If the .volatile directive references a memory location that may be modified during an interrupt, compile with the --interrupt_threshold=1 option to ensure all code referencing the volatile memory location can be interrupted.
The st and ld memory references are designated as volatile.
.volatile st, ld
STW W, *X{st} ; volatile store
STW U, *V
LDW *Y{ld}, Z ; volatile load