diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-08-30 19:10:42 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-08-30 19:10:42 +0200 |
commit | caac487ae23a9785602cf235f5b4a2b6749f2c18 (patch) | |
tree | e81ae59a6e06a0373afdfbf8f1ee94f16a2770f2 /mppa_k1c/SelectOp.vp | |
parent | 1522f289301f37da0324570297c65256d8a32316 (diff) | |
download | compcert-kvx-caac487ae23a9785602cf235f5b4a2b6749f2c18.tar.gz compcert-kvx-caac487ae23a9785602cf235f5b4a2b6749f2c18.zip |
fma
Diffstat (limited to 'mppa_k1c/SelectOp.vp')
-rw-r--r-- | mppa_k1c/SelectOp.vp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mppa_k1c/SelectOp.vp b/mppa_k1c/SelectOp.vp index 6539184c..71078046 100644 --- a/mppa_k1c/SelectOp.vp +++ b/mppa_k1c/SelectOp.vp @@ -683,7 +683,18 @@ Nondetfunction divfs_base (e1: expr) := else divfs_baseX e1) | _ => divfs_baseX e1 end. -End SELECT. + +Nondetfunction gen_fma args := + match args with + | e1:::e2:::e3:::Enil => Some (Eop Ofmaddf (e3:::e1:::e2:::Enil)) + | _ => None + end. + +Nondetfunction gen_fmaf args := + match args with + | e1:::e2:::e3:::Enil => Some (Eop Ofmaddfs (e3:::e1:::e2:::Enil)) + | _ => None + end. Definition platform_builtin (b: platform_builtin) (args: exprlist) : option expr := match b with @@ -692,7 +703,10 @@ Definition platform_builtin (b: platform_builtin) (args: exprlist) : option expr | BI_fminf => Some (Eop Ominfs args) | BI_fmaxf => Some (Eop Omaxfs args) | BI_fabsf => Some (Eop Oabsfs args) + | BI_fma => gen_fma args + | BI_fmaf => gen_fmaf args end. +End SELECT. (* Local Variables: *) (* mode: coq *) |