This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Memory Barrier [Q]
- From: "Zach, Yoav" <yoav dot zach at intel dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 11 Jun 2003 16:55:23 +0300
- Subject: Memory Barrier [Q]
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.