Skip to content

Instantly share code, notes, and snippets.

@stedolan
Created August 10, 2020 10:21
Show Gist options
  • Save stedolan/4c63d296fe00df47fb3eee04f8d8f389 to your computer and use it in GitHub Desktop.
Save stedolan/4c63d296fe00df47fb3eee04f8d8f389 to your computer and use it in GitHub Desktop.
type pair32 = { mutable left : #int32; mutable right: #int32 }
external box32 : #int32 -> int32 = "%identity"
external unbox32 : int32 -> #int32 = "%identity"
let incr_left x =
x.left <- unbox32 (Int32.add (box32 x.left) 1l)
(function{hax/flatrecord.ml:6,14-67} camlFlatrecord__incr_left_85 (x/87: val)
(store signed int32 (+a x/87 0) (+ (load_mut signed int32 (+a x/87 0)) 1)))
camlFlatrecord__incr_left_85:
.cfi_startproc
.L100:
movl $1, %ebx
movslq (%rax), %rdi
addq %rbx, %rdi
movl %edi, (%rax)
ret
.cfi_endproc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment