Skip to content

Instantly share code, notes, and snippets.

@m0wfo
Created March 23, 2016 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m0wfo/6a32eb2e161525915dfe to your computer and use it in GitHub Desktop.
Save m0wfo/6a32eb2e161525915dfe to your computer and use it in GitHub Desktop.
HotSpot-generated assembly for a volatile read + write
0x000000010be89ca3: jmpq 0x000000010be89d1e ;*iload_1
; - com.logentries.blog.VolatileClass::run@2 (line 12)
0x000000010be89ca8: vmovsd 0x10(%rsi),%xmm0 ; implicit exception: dispatches to 0x000000010be89eae
0x000000010be89cad: vmovq %xmm0,%rdx ;*getfield a
; - com.logentries.blog.VolatileClass::run@13 (line 13)
0x000000010be89cb2: movabs $0x1,%r10
0x000000010be89cbc: add %r10,%rdx
0x000000010be89cbf: mov %rdx,0x40(%rsp)
0x000000010be89cc4: vmovsd 0x40(%rsp),%xmm0
0x000000010be89cca: vmovsd %xmm0,0x10(%rsi)
0x000000010be89ccf: lock addl $0x0,(%rsp) ;*putfield a
; - com.logentries.blog.VolatileClass::run@18 (line 13)
0x000000010be89cd4: inc %edi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment