On Fri, Sep 2, 2011 at 6:49 AM, Paolo Bonzini <pbonz...@redhat.com> wrote: > On 09/02/2011 02:08 AM, David Gibson wrote: >>> >>> > >>>> >>>> > >Signed-off-by: Alexey Kardashevskiy<a...@ozlabs.ru> >>>> > >Signed-off-by: David Gibson<da...@gibson.dropbear.id.au> >>> >>> > >>> > 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