summaryrefslogtreecommitdiff
path: root/gcc/genopinit.c
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-21 14:16:39 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-21 14:16:39 +0000
commitd8492bd3ebdf16222a744e495a4de4f2aa3bd58e (patch)
treeee32816cbc97cc6b5823412e083d7944b01b96a7 /gcc/genopinit.c
parent0a5cd24b53f25f58c958cfae4e2aa478059f5fb8 (diff)
downloadgcc-d8492bd3ebdf16222a744e495a4de4f2aa3bd58e.tar.gz
libgcc/
* Makefile.in (lib2funcs): Add _clrsbsi2 and _clrsbdi2. * libgcc-std.ver.in (GCC_4.7.0): New section. gcc/ * doc/extend.texi (__builtin_clrsb, __builtin_clrsbl, __builtin_clrsbll): Document. * doc/rtl.texi (clrsb): New entry. * optabs.c (widen_leading): Renamed from widen_clz. New argument UNOPTAB. All callers changed. Use UNOPTAB instead of clz_optab. (expand_unop): Handle clrsb_optab. (init_optabs): Initialize it. * optabs.h (enum optab_index): New entry OTI_clrsb. (clrsb_optab): Define. * genopinit.c (optabs): Add an entry for it. * builtins.c (expand_builtin): Handle clrsb builtin functions. * builtins.def (BUILT_IN_CLRSB, BUILT_IN_CLRSBIMAX, BUILT_IN_CLRSBL, BUILT_IN_CLRSBLL): New. * rtl.def (CLRSB): New code. * dwarf2out.c (mem_loc_descriptor): Handle it. * simplify-rtx.c (simplify_const_unary_operation): Likewise. Use op_mode rather than mode when optimizing ffs, clz, ctz, parity and popcount. * libgcc2.c (__clrsbSI2, __clrsbDI2): New functions. * libgcc2.h (__clrsbSI2, __clrsbDI2): Define and declare. (__ctzDI2): Move declaration. * config/bfin/bfin.md (clrsbsi2): New expander. (signbitssi2): Use the CLRSB rtx. (clrsbhi2): Renamed from signbitshi2. Use the CLRSB rtx. * config/bfin/bfin.c (bdesc_1arg): Changed accordingly. gcc/testsuite/ * gcc.c-torture/excute/builtin-bitops-1.c (MAKE_FUNS): Make my_clrsb test functions. (main): Test clrsb. * gcc.dg/builtin-protos-1.c (test_s, test_u, test_sl, test_ul, test_sll, test_ull): Add clrsb tests. * gcc.dg/torture/builtin-attr-1.c: Add tests for clrsb, clrsbl, clrsbll. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175261 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genopinit.c')
-rw-r--r--gcc/genopinit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index 35e994b024c..570540dacb0 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -199,6 +199,7 @@ static const char * const optabs[] =
"set_optab_handler (ffs_optab, $A, CODE_FOR_$(ffs$a2$))",
"set_optab_handler (clz_optab, $A, CODE_FOR_$(clz$a2$))",
"set_optab_handler (ctz_optab, $A, CODE_FOR_$(ctz$a2$))",
+ "set_optab_handler (clrsb_optab, $A, CODE_FOR_$(clrsb$a2$))",
"set_optab_handler (popcount_optab, $A, CODE_FOR_$(popcount$a2$))",
"set_optab_handler (parity_optab, $A, CODE_FOR_$(parity$a2$))",
"set_optab_handler (mov_optab, $A, CODE_FOR_$(mov$a$))",