From f8202f62ed65d15738e0868005c856168a302696 Mon Sep 17 00:00:00 2001 From: xleroy Date: Wed, 6 Nov 2013 13:51:31 +0000 Subject: - 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 --- cfrontend/PrintCsyntax.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cfrontend/PrintCsyntax.ml') diff --git a/cfrontend/PrintCsyntax.ml b/cfrontend/PrintCsyntax.ml index ec82869..0bed647 100644 --- a/cfrontend/PrintCsyntax.ml +++ b/cfrontend/PrintCsyntax.ml @@ -30,6 +30,7 @@ let name_unop = function | Onotbool -> "!" | Onotint -> "~" | Oneg -> "-" + | Oabsfloat -> "__builtin_fabs" let name_binop = function | Oadd -> "+" @@ -215,6 +216,8 @@ let rec expr p (prec, e) = fprintf p "sizeof(%s)" (name_type ty) | Ealignof(ty, _) -> fprintf p "__alignof__(%s)" (name_type ty) + | Eunop(Oabsfloat, a1, _) -> + fprintf p "__builtin_fabs(%a)" expr (2, a1) | Eunop(op, a1, _) -> fprintf p "%s%a" (name_unop op) expr (prec', a1) | Eaddrof(a1, _) -> -- cgit v1.2.3