Memory Barrier [Q]

Zach, Yoav yoav.zach@intel.com
Wed Jun 11 14:04:00 GMT 2003


Can someone help me with this question I have about gcc - How gcc treats
the instruction 'asm("":::"memory")' ? 

Is it treated as a memory barrier, that is - it prevents reordering
accesses to distinct memory locations; or 
Is it treated as some kind of volatile declaration, that is - it only
prevents gcc from assuming that two consecutive load operations from the
same memory location will result with the same value.

TIA,
Yoav.




More information about the Gcc mailing list