diff --git a/src/riscv/Platform/MinimalCSRs.v b/src/riscv/Platform/MinimalCSRs.v index 3e0ebaf..ad25851 100644 --- a/src/riscv/Platform/MinimalCSRs.v +++ b/src/riscv/Platform/MinimalCSRs.v @@ -53,14 +53,15 @@ Section Riscv. { mach with pc := mach.(nextPc); nextPc ::= word.add (word.of_Z 4) }. Definition getReg(regs: Registers)(reg: Z): word := - if Z.eq_dec reg 0 then word.of_Z 0 - else match map.get regs reg with - | Some x => x - | None => word.of_Z 0 - end. + if ((0 x + | None => word.of_Z 0 + end + else word.of_Z 0. Definition setReg(reg: Z)(v: word)(regs: Registers): Registers := - if Z.eq_dec reg Register0 then regs else map.put regs reg v. + if ((0 State -> Prop) -> (State -> Prop) -> Prop :=