diff options
author | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2022-01-25 12:19:05 +0100 |
---|---|---|
committer | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2022-01-25 12:19:05 +0100 |
commit | 82d72ac1253b2c45dbc8f305349611ea2eae0675 (patch) | |
tree | 8e98b30779b971769849f7b9b253c2323f0e0a38 /kvx | |
parent | a32b5bf92865e354f81330353857ae2d9ec80d57 (diff) | |
download | compcert-kvx-82d72ac1253b2c45dbc8f305349611ea2eae0675.tar.gz compcert-kvx-82d72ac1253b2c45dbc8f305349611ea2eae0675.zip |
attempt at definition
Diffstat (limited to 'kvx')
-rw-r--r-- | kvx/FPDivision64.v | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kvx/FPDivision64.v b/kvx/FPDivision64.v index e57f0d66..1739e5cf 100644 --- a/kvx/FPDivision64.v +++ b/kvx/FPDivision64.v @@ -1948,3 +1948,16 @@ Proof. } reflexivity. Qed. + +Definition full_div_longu a b m := + let is_big := Val.cmpl_bool Clt b (Vlong Int64.zero) in + let is_one := Val.cmplu_bool (Mem.valid_pointer m) Cle b (Vlong Int64.one) in + let is_special := Val.or (Val.of_optbool is_big) (Val.of_optbool is_one) in + let if_big := Val.select (Val.cmplu_bool (Mem.valid_pointer m) Clt a b) + (Vlong Int64.zero) (Vlong Int64.one) Tlong in + let if_special := Val.select is_big if_big a Tlong in + Val.select (Val.cmp_bool Cne is_special (Vlong Int64.zero)) + if_special + (anystep_div_longu a b m) Tlong. + + |