[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] [PATCH] virtio: Make memory barriers be memory barriers |
Date: |
Sat, 3 Sep 2011 11:53:43 +0000 |
On Fri, Sep 2, 2011 at 6:49 AM, Paolo Bonzini <address@hidden> wrote:
> On 09/02/2011 02:08 AM, David Gibson wrote:
>>>
>>> >
>>>>
>>>> > >Signed-off-by: Alexey Kardashevskiy<address@hidden>
>>>> > >Signed-off-by: David Gibson<address@hidden>
>>>
>>> >
>>> > It will most definitely break OpenBSD, but anyway:
>>
>> Uh, why?
>
> They use an ancient compiler because they do not want to use GPLv3. I
> thought it was 4.1.something but actually it is 4.2.1, so it should work.
It works:
$ cat >sync_synch.c
void f(void)
{
__sync_synchronize();
}
$ gcc -c sync_synch.c -Wall
$ objdump -d sync_synch.o
sync_synch.o: file format elf64-sparc
Disassembly of section .text:
0000000000000000 <f>:
0: 9d e3 bf 40 save %sp, -192, %sp
4: 81 43 e0 0f membar #StoreStore|#LoadStore|#StoreLoad|#LoadLoad
8: 81 cf e0 08 rett %i7 + 8
c: 01 00 00 00 nop
$ gcc -v
Reading specs from
/usr/bin/../lib/gcc-lib/sparc64-unknown-openbsd4.9/4.2.1/specs
Target: sparc64-unknown-openbsd4.9
Configured with: OpenBSD/sparc64 system compiler
Thread model: posix
gcc version 4.2.1 20070719