Last active
September 10, 2021 09:52
-
-
Save actionshrimp/4074c03b3b8a88cb2fa065d42e69f742 to your computer and use it in GitHub Desktop.
ocamlopt assembler error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ opam exec -- ocamlopt --version | |
4.12.0 | |
$ cat int64_test.ml | |
module Datetime = struct | |
module Conv (M : sig | |
val xs_in_a_second : int64 | |
val picos_in_an_x : int64 | |
end) = | |
struct | |
open Int64 | |
let second = M.xs_in_a_second | |
let minute = mul (of_int 60) second | |
let hour = mul (of_int 60) minute | |
let day = mul (of_int 24) hour | |
let to_picos micros = mul micros M.picos_in_an_x | |
let of_picos picos = div picos M.picos_in_an_x | |
let to_days micros = div micros day | |
let of_days days = mul days day | |
let f x = | |
let y = to_days x in | |
y | |
let of_days_picos (days, picos) = add (of_days days) (of_picos picos) | |
end | |
end | |
$ opam exec -- ocamlopt int64_test.ml | |
/tmp/camlasm6c2cb6.s: Assembler messages: | |
/tmp/camlasm6c2cb6.s:51: Error: operand size mismatch for `imul' | |
File "int64_test.ml", line 1: | |
Error: Assembler error, input left in file /tmp/camlasm6c2cb6.s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment