This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]