From ffc27e4048ac3e963054de1ff27bb5387f259ad1 Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Sun, 13 Dec 2020 14:08:04 +0100 Subject: Removing the PseudoAsm IR --- aarch64/Asmblock.v | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'aarch64/Asmblock.v') diff --git a/aarch64/Asmblock.v b/aarch64/Asmblock.v index f12e8922..5e41d96a 100644 --- a/aarch64/Asmblock.v +++ b/aarch64/Asmblock.v @@ -420,6 +420,22 @@ Fixpoint size_blocks (l: bblocks): Z := end . +Lemma to_nat_pos : forall z:Z, (Z.to_nat z > 0)%nat -> z > 0. +Proof. + intros. destruct z; auto. + - contradict H. cbn. apply gt_irrefl. + - apply Zgt_pos_0. + - contradict H. cbn. apply gt_irrefl. +Qed. + +Lemma size_positive (b:bblock): size b > 0. +Proof. + unfold size. destruct b as [hd bdy ex cor]. cbn. + destruct ex; destruct bdy; try (apply to_nat_pos; rewrite Nat2Z.id; cbn; omega); + unfold non_empty_bblockb in cor; simpl in cor. + inversion cor. +Qed. + Record function : Type := mkfunction { fn_sig: signature; fn_blocks: bblocks }. Definition fundef := AST.fundef function. Definition program := AST.program fundef unit. -- cgit From 21f6353cfbed8192c63bc44551ab3c1b5bf7d85a Mon Sep 17 00:00:00 2001 From: Léo Gourdin Date: Mon, 14 Dec 2020 08:59:48 +0100 Subject: Generals lemmas for asmblockgenproof --- aarch64/Asmblock.v | 2 ++ 1 file changed, 2 insertions(+) (limited to 'aarch64/Asmblock.v') diff --git a/aarch64/Asmblock.v b/aarch64/Asmblock.v index 5e41d96a..c163ea10 100644 --- a/aarch64/Asmblock.v +++ b/aarch64/Asmblock.v @@ -41,6 +41,8 @@ Require Export Asm. Local Open Scope option_monad_scope. +Notation regset := Asm.regset. + (** * Abstract syntax *) (* First task: splitting the big [instruction] type below into CFI and basic instructions. -- cgit