summaryrefslogtreecommitdiff
path: root/cfrontend/C2C.ml
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-11-06 13:51:31 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-11-06 13:51:31 +0000
commitf8202f62ed65d15738e0868005c856168a302696 (patch)
treed9a16b650e62be1c15830eb41f9339485e948bd8 /cfrontend/C2C.ml
parentf9c799143067c3197dc925f7fd916206d075a25d (diff)
- Recognize __builtin_fabs as an operator, not just a builtin,
enabling more aggressive optimizations. - Less aggressive CSE for EF_builtin builtins, causes problems for __builtin_write{16,32}_reversed. git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2363 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'cfrontend/C2C.ml')
-rw-r--r--cfrontend/C2C.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml
index 285797d..8083535 100644
--- a/cfrontend/C2C.ml
+++ b/cfrontend/C2C.ml
@@ -576,6 +576,9 @@ let rec convertExpr env e =
| C.ECall({edesc = C.EVar {name = "__builtin_memcpy_aligned"}}, args) ->
make_builtin_memcpy (convertExprList env args)
+ | C.ECall({edesc = C.EVar {name = "__builtin_fabs"}}, [arg]) ->
+ Eunop(Oabsfloat, convertExpr env arg, ty)
+
| C.ECall(fn, args) ->
if not (supported_return_type env e.etyp) then
unsupported ("function returning a result of type " ^ string_of_type e.etyp);