On Thu, May 26, 2011 at 4:34 PM, Jakub Jelinek <ja...@redhat.com> wrote: > On Thu, May 26, 2011 at 04:29:50PM +0200, Richard Guenther wrote: >> To make it a compiler memory barrier you have to "expand" the >> builtin already in the frontend and present the middle-end with >> __asm__ ("...." : : : "memory"). That will serve as a compiler >> memory barrier also covering local non-address taken storage >> (global and practically most of address-taken local storage >> is covered by a builtin function call already). > > But then, what is the point of the builtin when > __asm__ __volatile__ ("rep; nop" : : : "memory"); > does all of that already and has been supported for years...
Good question ;) Richard.