diff options
author | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-09-27 14:46:30 +0200 |
---|---|---|
committer | David Monniaux <David.Monniaux@univ-grenoble-alpes.fr> | 2021-09-27 14:46:30 +0200 |
commit | a0385b882df506b03770166117dd4e9fa18e63f2 (patch) | |
tree | 029715256bd5f2342ed5f75d133aeca928a2e032 /kvx/SelectOp.vp | |
parent | 475d590db4877d0eddbba675d0c54343f4d04ccf (diff) | |
download | compcert-kvx-a0385b882df506b03770166117dd4e9fa18e63f2.tar.gz compcert-kvx-a0385b882df506b03770166117dd4e9fa18e63f2.zip |
progress in selectop
Diffstat (limited to 'kvx/SelectOp.vp')
-rw-r--r-- | kvx/SelectOp.vp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kvx/SelectOp.vp b/kvx/SelectOp.vp index 295506b9..5ddd2ca7 100644 --- a/kvx/SelectOp.vp +++ b/kvx/SelectOp.vp @@ -435,10 +435,18 @@ Nondetfunction or (e1: expr) (e2: expr) := (Int.eq_dec nmask (Int.not mask')) then Eop (Oinsf zstop zstart) (prev:::fld:::Enil) else Eop Oor (e1:::e2:::Enil) + else let zstart := 0 in + let zstop := int_highest_bit mask in + if is_bitfield zstop zstart + then + let mask' := Int.repr (zbitfield_mask zstop zstart) in + if and_dec (Int.eq_dec mask mask') + (Int.eq_dec nmask (Int.not mask')) + then Eop (Oinsf zstop zstart) (prev:::fld:::Enil) + else Eop Oor (e1:::e2:::Enil) else Eop Oor (e1:::e2:::Enil) | _, _ => Eop Oor (e1:::e2:::Enil) end. -(* TODO traiter le cas pas de shift *) Nondetfunction xorimm (n1: int) (e2: expr) := if Int.eq n1 Int.zero |