aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@kss-loka.si>2005-04-09 07:31:46 +0200
committerUros Bizjak <uros@gcc.gnu.org>2005-04-09 07:31:46 +0200
commitd8b42d069ef1e97ebba1c7d3730ff3673199d856 (patch)
tree03e11f5c02fd01186c4ac1e8629da56190c39031 /gcc/optabs.c
parentfbc315db4a79aee216b2e56e1653e22d86436fea (diff)
downloadgcc-d8b42d069ef1e97ebba1c7d3730ff3673199d856.zip
gcc-d8b42d069ef1e97ebba1c7d3730ff3673199d856.tar.gz
gcc-d8b42d069ef1e97ebba1c7d3730ff3673199d856.tar.bz2
* builtins.def (BUILT_IN_LFLOOR, BUILT_IN_LFLOORF, BUILT_IN_LFLOORL)
(BUILT_IN_LLFLOOR, BUILT_IN_LLFLOORF, BUILT_IN_LLFLOORL): New. * optabs.h (enum optab_index): Add new OTI_lfloor. (lfloor_optab): Define corresponding macro. * optabs.c (init_optabs): Initialize lfloor_optab. * genopinit.c (optabs): Implement lfloor_optab using lfloorsi2 and lfloordi2 patterns. * builtins.c (expand_builtin_int_roundingfn): New prototype. (expand_builtin_int_roundingfn): New function. (fold_builtin_int_roundingfn): New prototype. (fold_builtin_int_roundingfn): New function, renamed from fold_builtin_lround. Handle BUILT_IN_LROUND{,F,L}, BUILT_IN_LLROUND{,F,L} and BUILT_IN_LFLOOR{,F,L}, BUILT_IN_LLFLOOR{,F,L}. (fold_builtin_1): Fold BUILT_IN_LFLOOR{,F,L} and BUILT_IN_LLFLOOR{,F,L} using fold_builtin_int_roundingfn. (mathfn_built_in): Handle BUILT_IN LFLOOR and BUILT_IN_LLFLOOR. (expand_builtin): Expand BUILT_IN_LFLOOR{,F,L} and BUILT_IN_LLFLOOR{,F,L} using expand_builtin_int_roundingfn. * convert.c (convert_to_integer): Convert (long int)floor{,f,l}, into lfloor built-in function and (long long int)floor{,f,l} into llfloor built-in function. * fold-const.c (tree_expr_nonnegative_p): Add BUILT_IN_LFLOOR and BUILT_IN_LLFLOOR. testsuite: * gcc.dg/builtins-53.c: New test. From-SVN: r97886
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index ecaff98..d672744 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -5033,6 +5033,7 @@ init_optabs (void)
parity_optab = init_optab (PARITY);
sqrt_optab = init_optab (SQRT);
floor_optab = init_optab (UNKNOWN);
+ lfloor_optab = init_optab (UNKNOWN);
ceil_optab = init_optab (UNKNOWN);
round_optab = init_optab (UNKNOWN);
btrunc_optab = init_optab (UNKNOWN);