Defined variables module, not fully working
This commit is contained in:
@ -142,10 +142,10 @@ let reduce_instructions (prg: RISCArchitecture.t) (lo: string list) : int =
|
||||
in
|
||||
helper {prg with registers = RegisterMap.add {index = r3.index} n prg.registers} tl current_label
|
||||
)
|
||||
| LoadI (r1, i) :: tl -> (
|
||||
| LoadI (i, r3) :: tl -> (
|
||||
let n = i
|
||||
in
|
||||
helper {prg with registers = RegisterMap.add {index = r1.index} n prg.registers} tl current_label
|
||||
helper {prg with registers = RegisterMap.add {index = r3.index} n prg.registers} tl current_label
|
||||
)
|
||||
| Store (r1, r3) :: tl -> (
|
||||
let n = RegisterMap.find {index = r1.index} prg.registers in
|
||||
|
||||
Reference in New Issue
Block a user