From 651e72602de2bdaeda933934de7f2a9be01aff09 Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 30 Apr 2018 20:57:47 +0200 Subject: Add missing instruction translations --- src/eurm.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/eurm.ml b/src/eurm.ml index 2b8cc5b..1e6d7d2 100644 --- a/src/eurm.ml +++ b/src/eurm.ml @@ -130,10 +130,14 @@ let compile_stage4 eurmcmds state = in let transform = function | Inc(r) -> [ URMSucc(r) ], state | Zero(r) -> [ URMZero(r) ], state + | Copy(r1, r2) -> [ URMCopy(r1, r2) ], state | EqPredicate(r1, r2, lbl) -> [ URMJump(r1, r2, Hashtbl.find label_table lbl) ], state | Label(_) -> let dummy_reg = state.max_reg + 1 in [ URMZero(dummy_reg) ], add_reg_label state 1 0 + | Quit -> + let dummy_reg = state.max_reg + 1 + in [ URMZero(dummy_reg); URMJump(dummy_reg, dummy_reg, -1) ], add_reg_label state 1 0 | _ -> failwith "Invalid_argument" in build_label_table eurmcmds; apply_transform (transform) state eurmcmds -- cgit v1.2.3