diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-04-11 11:05:58 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:27 -0400 |
commit | 6449bb62448bbe18166fda0ceb83aaf30c534552 (patch) | |
tree | 09c2b6157c767489953d942c78a8e0699dfcb740 | |
parent | 4e3c5bf89c36b33bbdf79b9398b501f2d8e08cd6 (diff) | |
download | roux-6449bb62448bbe18166fda0ceb83aaf30c534552.tar.gz |
bugfix in regalloc (Div,Rem) and in peucl
-rw-r--r-- | lo2.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lo2.ml b/lo2.ml index 47f2765..64bf3ae 100644 --- a/lo2.ml +++ b/lo2.ml @@ -249,7 +249,7 @@ let regalloc (p: iprog): rprog = if (op = Div || op = Rem) && not (List.mem rdx !free) then getreg (List.filter ((<>) rdx) regs) |> ignore else - free := (List.filter ((<>) rdx) regs); + free := (List.filter ((<>) rdx) !free); let l1 = regloc frz ir1 in let frz = match l1 with | LReg r1 -> r1 :: frz @@ -667,7 +667,7 @@ let peucl: iprog = ; { bb_name = "end" ; bb_phis = [||] ; bb_inss = [||] - ; bb_jmp = `Ret (IRPhi (1, 0)) + ; bb_jmp = `Ret (IRPhi (1, 1)) } |] |