[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] d5373c: Use MemoryBarrier on Win64

GitHub noreply at github.com
Tue Jul 26 07:01:47 UTC 2016


  Branch: refs/heads/krono/win32-fixes
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: d5373c34ae8f0814a6435d2d9de6c367fb4c4b63
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/d5373c34ae8f0814a6435d2d9de6c367fb4c4b63
  Author: Tobias Pape <tobias at netshed.de>
  Date:   2016-07-26 (Tue, 26 Jul 2016)

  Changed paths:
    M platforms/Cross/vm/sqMemoryFence.h

  Log Message:
  -----------
  Use MemoryBarrier on Win64

We leave the 32 bit version, tho. The `MemoryBarrier` expands to a
`__faststorefence` on x86_64, which compiles to

    lock or DWORD PTR [rsp], ebp

The 32bit code we use is quite similar but avoids the ebp access:

    lock add [esp], 0

whereas the x86 `MemoryBarrier` is a more costly `xchg [...], eax`.


  Commit: 5da712ffc5af51b67c28400507b2d436681538fc
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/5da712ffc5af51b67c28400507b2d436681538fc
  Author: Tobias Pape <tobias at netshed.de>
  Date:   2016-07-26 (Tue, 26 Jul 2016)

  Changed paths:
    M platforms/win32/vm/sqWin32Main.c

  Log Message:
  -----------
  Make sure DWORDs are printed correctly


Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/03c0ef741a5d...5da712ffc5af


More information about the Vm-dev mailing list