diff options
Diffstat (limited to 'src/eurm.ml')
-rw-r--r-- | src/eurm.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eurm.ml b/src/eurm.ml index cb5a9cd..8198a5b 100644 --- a/src/eurm.ml +++ b/src/eurm.ml | |||
@@ -67,10 +67,10 @@ let compile_stage1 eurmcmds state = | |||
67 | add_reg_label state 1 0 | 67 | add_reg_label state 1 0 |
68 | 68 | ||
69 | | Mult(r1, r2) -> | 69 | | Mult(r1, r2) -> |
70 | let ctr_reg = state.max_reg + 1 and aux_reg = state.max_reg + 2 | 70 | let ctr_reg = state.max_reg + 1 and res_reg = state.max_reg + 2 |
71 | and start_label = string_of_int (state.label_count + 1) and end_label = string_of_int (state.label_count + 2) | 71 | and start_label = string_of_int (state.label_count + 1) and end_label = string_of_int (state.label_count + 2) |
72 | in [ Zero(ctr_reg); Copy(aux_reg, r1); Label(start_label); EqPredicate(ctr_reg, r2, end_label); | 72 | in [ Zero(ctr_reg); Zero(res_reg); Label(start_label); EqPredicate(ctr_reg, r2, end_label); |
73 | Add(r1, aux_reg); Inc(ctr_reg); Goto(start_label); Label(end_label) ], | 73 | Add(res_reg, r1); Inc(ctr_reg); Goto(start_label); Label(end_label); Copy(r1, res_reg) ], |
74 | add_reg_label state 2 2 | 74 | add_reg_label state 2 2 |
75 | 75 | ||
76 | | ZeroPredicate(r, l) -> | 76 | | ZeroPredicate(r, l) -> |