Skip to content

Commit

Permalink
Reuse the variable introduced in GPR#2083 for integer operations symbols
Browse files Browse the repository at this point in the history
No change entry needed
  • Loading branch information
lthls committed Feb 21, 2019
1 parent e0cf24a commit fa97bea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions asmcomp/cmmgen.ml
Expand Up @@ -3001,23 +3001,23 @@ and emit_string_constant s cont =
and emit_boxed_int32_constant n cont =
let n = Nativeint.of_int32 n in
if size_int = 8 then
Csymbol_address("caml_int32_ops") :: Cint32 n :: Cint32 0n :: cont
Csymbol_address(caml_int32_ops) :: Cint32 n :: Cint32 0n :: cont
else
Csymbol_address("caml_int32_ops") :: Cint n :: cont
Csymbol_address(caml_int32_ops) :: Cint n :: cont

and emit_boxed_nativeint_constant n cont =
Csymbol_address("caml_nativeint_ops") :: Cint n :: cont
Csymbol_address(caml_nativeint_ops) :: Cint n :: cont

and emit_boxed_int64_constant n cont =
let lo = Int64.to_nativeint n in
if size_int = 8 then
Csymbol_address("caml_int64_ops") :: Cint lo :: cont
Csymbol_address(caml_int64_ops) :: Cint lo :: cont
else begin
let hi = Int64.to_nativeint (Int64.shift_right n 32) in
if big_endian then
Csymbol_address("caml_int64_ops") :: Cint hi :: Cint lo :: cont
Csymbol_address(caml_int64_ops) :: Cint hi :: Cint lo :: cont
else
Csymbol_address("caml_int64_ops") :: Cint lo :: Cint hi :: cont
Csymbol_address(caml_int64_ops) :: Cint lo :: Cint hi :: cont
end

(* Emit constant closures *)
Expand Down

0 comments on commit fa97bea

Please sign in to comment.