This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
29
unikernel/duniverse/ocaml_intrinsics_kernel/src/float.mli
Normal file
29
unikernel/duniverse/ocaml_intrinsics_kernel/src/float.mli
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
(* X86 docs say:
|
||||
|
||||
If only one value is a NaN (SNaN or QNaN) for this instruction, the second source
|
||||
operand, either a NaN or a valid floating-point value
|
||||
is written to the result.
|
||||
|
||||
So we have to be VERY careful how we use these!
|
||||
*)
|
||||
(** Equivalent to [if x < y then x else y].
|
||||
|
||||
On an x86-64 machine, this compiles to [minsd xmm0, xmm1].
|
||||
On ARM, this calls a C implementation. *)
|
||||
external min
|
||||
: (float[@unboxed])
|
||||
-> (float[@unboxed])
|
||||
-> (float[@unboxed])
|
||||
= "caml_sse2_float64_min_bytecode" "caml_sse2_float64_min"
|
||||
[@@noalloc] [@@builtin] [@@no_effects] [@@no_coeffects]
|
||||
|
||||
(** Equivalent to [if x > y then x else y].
|
||||
|
||||
On an x86-64 machine, this compiles to [maxsd xmm0, xmm1].
|
||||
On ARM, this calls a C implementation. *)
|
||||
external max
|
||||
: (float[@unboxed])
|
||||
-> (float[@unboxed])
|
||||
-> (float[@unboxed])
|
||||
= "caml_sse2_float64_max_bytecode" "caml_sse2_float64_max"
|
||||
[@@noalloc] [@@builtin] [@@no_effects] [@@no_coeffects]
|
||||
Loading…
Add table
Add a link
Reference in a new issue