aboutsummaryrefslogtreecommitdiffstats
path: root/backend
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-07-25 10:38:18 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2020-07-27 16:29:38 +0200
commit4cf2fc41657fac51d806c14fdf481c7047e39df3 (patch)
tree0b48bd146bb6032ae0048aa7aee0c8ecef234580 /backend
parent465f6b4120bb38d2ef2871de4972df92ee935ed6 (diff)
downloadcompcert-4cf2fc41657fac51d806c14fdf481c7047e39df3.tar.gz
compcert-4cf2fc41657fac51d806c14fdf481c7047e39df3.zip
Add support for __builtin_fabsf
Diffstat (limited to 'backend')
-rw-r--r--backend/Selection.v2
-rw-r--r--backend/Selectionproof.v4
2 files changed, 6 insertions, 0 deletions
diff --git a/backend/Selection.v b/backend/Selection.v
index 480b09a2..a5bef9ae 100644
--- a/backend/Selection.v
+++ b/backend/Selection.v
@@ -248,6 +248,8 @@ Function sel_known_builtin (bf: builtin_function) (args: exprlist) :=
Some (sel_select ty a1 a2 a3)
| BI_standard BI_fabs, a1 ::: Enil =>
Some (SelectOp.absf a1)
+ | BI_standard BI_fabsf, a1 ::: Enil =>
+ Some (SelectOp.absfs a1)
| _, _ =>
None
end.
diff --git a/backend/Selectionproof.v b/backend/Selectionproof.v
index a66bcf81..987926aa 100644
--- a/backend/Selectionproof.v
+++ b/backend/Selectionproof.v
@@ -394,6 +394,10 @@ Proof.
inv ARGS; try discriminate. inv H0; try discriminate.
inv SEL.
simpl in SEM; inv SEM. apply eval_absf; auto.
++ (* fabsf *)
+ inv ARGS; try discriminate. inv H0; try discriminate.
+ inv SEL.
+ simpl in SEM; inv SEM. apply eval_absfs; auto.
- eapply eval_platform_builtin; eauto.
Qed.