From d2dc422b91ed628f0f8d6286a23f6f4fb9869248 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Mon, 1 Feb 2021 15:07:46 +0100 Subject: Obits_of_single etc --- riscV/NeedOp.v | 2 ++ 1 file changed, 2 insertions(+) (limited to 'riscV/NeedOp.v') diff --git a/riscV/NeedOp.v b/riscV/NeedOp.v index 117bbcb4..9a406b6f 100644 --- a/riscV/NeedOp.v +++ b/riscV/NeedOp.v @@ -87,6 +87,8 @@ Definition needs_of_operation (op: operation) (nv: nval): list nval := | Ointofsingle | Ointuofsingle | Osingleofint | Osingleofintu => op1 (default nv) | Olongofsingle | Olonguofsingle | Osingleoflong | Osingleoflongu => op1 (default nv) | Ocmp c => needs_of_condition c + | Obits_of_single => op1 (default nv) + | Obits_of_float => op1 (default nv) end. Definition operation_is_redundant (op: operation) (nv: nval): bool := -- cgit From 21aaf9c53b2bb0c6d376c2ce436d6dd7f5442a47 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Mon, 1 Feb 2021 18:53:04 +0100 Subject: bits to float --- riscV/NeedOp.v | 2 ++ 1 file changed, 2 insertions(+) (limited to 'riscV/NeedOp.v') diff --git a/riscV/NeedOp.v b/riscV/NeedOp.v index 9a406b6f..136c157f 100644 --- a/riscV/NeedOp.v +++ b/riscV/NeedOp.v @@ -89,6 +89,8 @@ Definition needs_of_operation (op: operation) (nv: nval): list nval := | Ocmp c => needs_of_condition c | Obits_of_single => op1 (default nv) | Obits_of_float => op1 (default nv) + | Osingle_of_bits => op1 (default nv) + | Ofloat_of_bits => op1 (default nv) end. Definition operation_is_redundant (op: operation) (nv: nval): bool := -- cgit From d2159e300b2d5e017a3144c747d34949b2ff2769 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Tue, 2 Feb 2021 10:21:17 +0100 Subject: begin implementing select --- riscV/NeedOp.v | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'riscV/NeedOp.v') diff --git a/riscV/NeedOp.v b/riscV/NeedOp.v index 136c157f..9e1ad004 100644 --- a/riscV/NeedOp.v +++ b/riscV/NeedOp.v @@ -91,6 +91,7 @@ Definition needs_of_operation (op: operation) (nv: nval): list nval := | Obits_of_float => op1 (default nv) | Osingle_of_bits => op1 (default nv) | Ofloat_of_bits => op1 (default nv) + | Oselectl => All :: nv :: nv :: nil end. Definition operation_is_redundant (op: operation) (nv: nval): bool := @@ -158,6 +159,16 @@ Proof. - apply shlimm_sound; auto. - apply shrimm_sound; auto. - apply shruimm_sound; auto. +- (* selectl *) + unfold ExtValues.select01_long. + destruct v0; auto with na. + assert (Val.lessdef (Vint i) v4) as LESSDEF by auto with na. + inv LESSDEF. + destruct (Int.eq i Int.one). + { apply normalize_sound; auto. } + destruct (Int.eq i Int.zero). + { apply normalize_sound; auto. } + cbn. auto with na. Qed. Lemma operation_is_redundant_sound: -- cgit