Subject: Re: x86 instructions reordering
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Lennart Augustsson <lennart@augustsson.net>
List: port-xen
Date: 03/24/2005 18:16:05
Oh, did the mb() only generate lock on Linux?
Then you should use x86_lfence() everywhere so
you get the lock-prefixed instructions.
-- Lennart
Manuel Bouyer wrote:
> On Thu, Mar 24, 2005 at 05:14:49PM +0100, Lennart Augustsson wrote:
>
>>The x86 can do some reordering, but nothing should ever
>>move across an instruction with a lock prefix. So with
>>enough mb() in your code you should be totally safe.
>
>
> And is __insn_barrier() equivalent to x86_lfence() in NetBSD ?
> The generated assembly doesn't change when I use one or the other.
> Using mb() didn't change anything either.
> There's no "lock" in the generated assembly file, or nothing looking different
> from normal instructions.
>