aboutsummaryrefslogtreecommitdiff
path: root/examples/OCaml-Kaleidoscope/Chapter5/codegen.ml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/OCaml-Kaleidoscope/Chapter5/codegen.ml')
-rw-r--r--examples/OCaml-Kaleidoscope/Chapter5/codegen.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/OCaml-Kaleidoscope/Chapter5/codegen.ml b/examples/OCaml-Kaleidoscope/Chapter5/codegen.ml
index e0db2d2c86..e4570a6575 100644
--- a/examples/OCaml-Kaleidoscope/Chapter5/codegen.ml
+++ b/examples/OCaml-Kaleidoscope/Chapter5/codegen.ml
@@ -22,9 +22,9 @@ let rec codegen_expr = function
let rhs_val = codegen_expr rhs in
begin
match op with
- | '+' -> build_add lhs_val rhs_val "addtmp" builder
- | '-' -> build_sub lhs_val rhs_val "subtmp" builder
- | '*' -> build_mul lhs_val rhs_val "multmp" builder
+ | '+' -> build_fadd lhs_val rhs_val "addtmp" builder
+ | '-' -> build_fsub lhs_val rhs_val "subtmp" builder
+ | '*' -> build_fmul lhs_val rhs_val "multmp" builder
| '<' ->
(* Convert bool 0/1 to double 0.0 or 1.0 *)
let i = build_fcmp Fcmp.Ult lhs_val rhs_val "cmptmp" builder in