FAQ
Perhaps I'm missing something...

I've read http://www.doxsey.net/blog/go-and-assembly and
http://plan9.bell-labs.com/sys/doc/asm.html

I've also grep'd through the go source code. I can't see any references to
barriers/fences. How can I emit a barrier/fence?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Dmitry Vyukov at Mar 14, 2013 at 3:59 am
    You can see an example of emitting unsupported instructions in
    src/pkg/runtime/atomic_386.s:

    // uint64 atomicload64(uint64 volatile* addr);
    // so actually
    // void atomicload64(uint64 *res, uint64 volatile *addr);
    TEXT runtime·atomicload64(SB), 7, $0
    MOVL 4(SP), BX
    MOVL 8(SP), AX
    // MOVQ (%EAX), %MM0
    BYTE $0x0f; BYTE $0x6f; BYTE $0x00
    // MOVQ %MM0, 0(%EBX)
    BYTE $0x0f; BYTE $0x7f; BYTE $0x03
    // EMMS
    BYTE $0x0F; BYTE $0x77
    RET


    And I think the same in src/pkg/sync/atomic/...

    On Wed, Mar 13, 2013 at 8:18 PM, matt wrote:
    Perhaps I'm missing something...

    I've read http://www.doxsey.net/blog/go-and-assembly and
    http://plan9.bell-labs.com/sys/doc/asm.html

    I've also grep'd through the go source code. I can't see any references to
    barriers/fences. How can I emit a barrier/fence?

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 13, '13 at 4:18p
activeMar 14, '13 at 3:59a
posts2
users2
websitegolang.org

2 users in discussion

Dmitry Vyukov: 1 post Matt: 1 post

People

Translate

site design / logo © 2021 Grokbase