|
|
|
|
|
by toolslive
2958 days ago
|
|
It does a reasonable job: external my_sqrt : float -> float = "caml_sqrt_float"
"sqrt" [@@unboxed] [@@noalloc]
let () =
let x= my_sqrt 1.0 in
Printf.printf "x = %f" x
becomes something like: ...
camlInline__entry:
.cfi_startproc
subq $8, %rsp
.cfi_adjust_cfa_offset 8
.L102:
movsd .L103(%rip), %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, (%rsp)
movq camlInline__6@GOTPCREL(%rip), %rbx
movq camlPervasives@GOTPCREL(%rip), %rax
movq 208(%rax), %rax
call camlPrintf__fprintf_1291@PLT
....
|
|