aboutsummaryrefslogtreecommitdiffstats
path: root/aarch64/Asmblock.v
diff options
context:
space:
mode:
authorSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2020-11-18 10:04:52 +0100
committerSylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr>2020-11-18 10:04:52 +0100
commitc3158661c6acd07df3deaa3ed2d0fc0fffb285b1 (patch)
tree8b489d0a542d40499a1da7fc3feec1ceaff2f933 /aarch64/Asmblock.v
parent917179f4f3889fd3c233d8c156184ab92102bf51 (diff)
downloadcompcert-kvx-c3158661c6acd07df3deaa3ed2d0fc0fffb285b1.tar.gz
compcert-kvx-c3158661c6acd07df3deaa3ed2d0fc0fffb285b1.zip
fix the semantics ?
Diffstat (limited to 'aarch64/Asmblock.v')
-rw-r--r--aarch64/Asmblock.v10
1 files changed, 9 insertions, 1 deletions
diff --git a/aarch64/Asmblock.v b/aarch64/Asmblock.v
index 5da7e20a..3973abc0 100644
--- a/aarch64/Asmblock.v
+++ b/aarch64/Asmblock.v
@@ -754,6 +754,12 @@ Definition arith_eval_p (i : arith_p) : val :=
| Pfmovimmd f => Vfloat f
end.
+Definition destroy_X16 (i : arith_p) : bool :=
+ match i with
+ | Pfmovimms _ | Pfmovimmd _ => true (* TODO: we may refine this condition, according to the value of the immediate like in TargetPrinter *)
+ | _ => false
+ end.
+
Definition if_opt_bool_val (c: option bool) v1 v2: val :=
match c with
| Some true => v1
@@ -948,7 +954,9 @@ Definition arith_comparison_p_compare i :=
Definition exec_arith_instr (ai: ar_instruction) (rs: regset): regset :=
match ai with
- | PArithP i d => rs#d <- (arith_eval_p i)
+ | PArithP i d =>
+ let rs' := rs#d <- (arith_eval_p i) in
+ if destroy_X16 i then rs'#X16 <- Vundef else rs'
| PArithPP i d s => rs#d <- (arith_eval_pp i rs#s)
| PArithPPP i d s1 s2 => rs#d <- (arith_eval_ppp i rs#s1 rs#s2)