From fe51292c36aab529fd1c2bc2df196d970b0bd338 Mon Sep 17 00:00:00 2001
From: Wilke Pierre <pierre.wilke@centralesupelec.fr>
Date: Thu, 19 Mar 2020 18:29:34 +0100
Subject: [PATCH] =?UTF-8?q?R=C3=A9pare=20ltl=5Fgen.ml=20pour=20Rprint=20!?=
 =?UTF-8?q?=20D=C3=A9sol=C3=A9...?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/ltl_gen.ml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ltl_gen.ml b/src/ltl_gen.ml
index 69094c7..851cca0 100644
--- a/src/ltl_gen.ml
+++ b/src/ltl_gen.ml
@@ -303,7 +303,7 @@ let ltl_instrs_of_linear_instr fname live_out allocation
     let (save_a_regs, arg_saved, ofs) =
       save_caller_save
         (range 32)
-        (- !Archi.wordsize * (numspilled+1)) in
+        (- (numspilled+1)) in
     let parameter_passing =
       match Hashtbl.find_option allocation r with
       | None -> Error (Format.sprintf "Could not find allocation for register %d\n" r)
@@ -312,7 +312,7 @@ let ltl_instrs_of_linear_instr fname live_out allocation
     in
     parameter_passing >>= fun parameter_passing ->
     OK (LComment "Saving a0-a7,t0-t6" :: save_a_regs @
-        LAddi(reg_sp, reg_s0, ofs) ::
+        LAddi(reg_sp, reg_s0, !Archi.wordsize * ofs) ::
         parameter_passing @
         LCall "print" ::
         LComment "Restoring a0-a7,t0-t6" :: restore_caller_save arg_saved)
-- 
GitLab