diff options
author | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-09-01 16:08:57 +0200 |
---|---|---|
committer | Léo Gourdin <leo.gourdin@univ-grenoble-alpes.fr> | 2021-09-01 16:08:57 +0200 |
commit | 269208723faff37e6f6539b71101515b17a8a36f (patch) | |
tree | 2a52dd6fc5ae0b65b2a40a08c8e20c2eb8357ff3 /common | |
parent | 1fbe45e2d1f02ef6e8fb6fe7545728a744e047b8 (diff) | |
parent | 54a22d92bc18fa3ece958a097844caa5e7b2e0c5 (diff) | |
download | compcert-kvx-269208723faff37e6f6539b71101515b17a8a36f.tar.gz compcert-kvx-269208723faff37e6f6539b71101515b17a8a36f.zip |
[MERGE] BTL into kvx-work (replacing RTLpath)
Diffstat (limited to 'common')
-rw-r--r-- | common/DebugPrint.ml | 8 | ||||
-rw-r--r-- | common/Values.v | 14 |
2 files changed, 17 insertions, 5 deletions
diff --git a/common/DebugPrint.ml b/common/DebugPrint.ml index 275e6a71..83a485b0 100644 --- a/common/DebugPrint.ml +++ b/common/DebugPrint.ml @@ -1,6 +1,7 @@ open Maps open Camlcoq open Registers +open RTLcommonaux let debug_flag = ref false @@ -128,11 +129,8 @@ end let print_instructions insts code = - let get_some = function - | None -> failwith "Did not get some" - | Some thing -> thing - in if (!debug_flag) then begin - debug "[\n"; + if (!debug_flag) then begin + debug "[ "; List.iter ( fun n -> (PrintRTL.print_instruction stdout (P.to_int n, get_some @@ PTree.get n code)) ) insts; debug " ]" diff --git a/common/Values.v b/common/Values.v index 9353366d..87ebea00 100644 --- a/common/Values.v +++ b/common/Values.v @@ -2016,6 +2016,20 @@ Proof. destruct (Float.cmp Cgt f f0); destruct (Float.cmp Ceq f f0); auto. Qed. +Theorem swap_cmpf_bool: + forall c x y, + Val.cmpf_bool (swap_comparison c) x y = Val.cmpf_bool c y x. +Proof. + destruct x; destruct y; simpl; auto. rewrite Float.cmp_swap. auto. +Qed. + +Theorem swap_cmpfs_bool: + forall c x y, + Val.cmpfs_bool (swap_comparison c) x y = Val.cmpfs_bool c y x. +Proof. + destruct x; destruct y; simpl; auto. rewrite Float32.cmp_swap. auto. +Qed. + Theorem cmp_ne_0_optbool: forall ob, cmp Cne (of_optbool ob) (Vint Int.zero) = of_optbool ob. Proof. |