Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2023-08

Volatile store usage

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

denisgolovan

Hi all

I'd like to get some clarification about "volatile" intrinsic.

https://wiki.freepascal.org/FPC_New_Features_Trunk#Support_for_.22volatile.22_intrinsic says just following:

Support for "volatile" intrinsic
Overview: A volatile intrinsic has been added to indicate to the code generator that a particular load from or store to a memory location must not be removed.

... and states that example is here - https://gitlab.com/freepascal.org/fpc/source/-/blob/main/tests/test/tmt1.pp

However I cannot find "store" usage example there. Only "load".

Are "volatile" stores supported?
I tried following using my rather old 3.3.1 compiler, but none of them compile:

volatile(mem):=0;
mem:=volatile(0);

Any help?

-- Regards,
Denis Golovan

denisgolovan
to Jonas Maebe
Show quoted text 5 lines
On 11/08/2023 18:05, denisgolovan via fpc-pascal wrote: > Are "volatile" stores supported? They weren't, but I've added support for it now.

Aha.
Thanks.

-- Regards,
Denis Golovan