Beware of GNU-ARM compiler for Cortex-M0/M0+/M1

No, that only limits the compiler's ability to re-order data reads and writes to memory - it does not affect statements or executable code except indirectly (if code is needed to calculate a value that is written before the memory clobber, then of course that code needs to run before the clobber statement). See the URL I gave a couple of lines down for an example where even asm volatile("" ::: "memory") does not help.

Reply to
David Brown
Loading thread data ...

he

se

en

is

many

ead here

? I

little

e

o you.

ed

en

nd

y

od

d

p.

to

; \

o

am

Well that makes sense. I'm pretty sure I only use this clobber macro for me m rd/wr barriers so I think I'm okay but still, good to know. Thanks.

Reply to
mrfirmware

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.