8sa1-gcc/gcc/builtins.def
Kaveh R. Ghazi d118937d79 builtins.c (expand_builtin_strcat, [...]): New functions.
* builtins.c (expand_builtin_strcat, expand_builtin_strncat,
	expand_builtin_strspn, expand_builtin_strcspn): New functions.
	(expand_builtin): Handle BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
	BUILT_IN_STRSPN and BUILT_IN_STRCSPN.

	* builtins.def (BUILT_IN_STRCAT, BUILT_IN_STRNCAT,
	BUILT_IN_STRSPN, BUILT_IN_STRCSPN): New entries.

	* c-common.c (c_common_nodes_and_builtins): Declare builtin
	strcat, strncat, strspn and strcspn.
	(string_ftype_string_cstring): Renamed from `string_ftype_ptr_ptr'.

	* extend.texi (strcat, strcspn, strncat, strspn): Document new
	builtins.

testsuite:
	* gcc.c-torture/execute/string-opt-9.c: New test.
	* gcc.c-torture/execute/string-opt-10.c: Likewise.
	* gcc.c-torture/execute/string-opt-11.c: Likewise.
	* gcc.c-torture/execute/string-opt-12.c: Likewise.

From-SVN: r37964
2000-12-03 03:46:03 +00:00

111 lines
3.4 KiB
Modula-2

/* This file contains the definitions and documentation for the
builtins used in the GNU compiler.
Copyright (C) 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
DEF_BUILTIN(BUILT_IN_ALLOCA)
DEF_BUILTIN(BUILT_IN_ABS)
DEF_BUILTIN(BUILT_IN_FABS)
DEF_BUILTIN(BUILT_IN_LABS)
DEF_BUILTIN(BUILT_IN_LLABS)
DEF_BUILTIN(BUILT_IN_IMAXABS)
DEF_BUILTIN(BUILT_IN_FFS)
DEF_BUILTIN(BUILT_IN_DIV)
DEF_BUILTIN(BUILT_IN_LDIV)
DEF_BUILTIN(BUILT_IN_FFLOOR)
DEF_BUILTIN(BUILT_IN_FCEIL)
DEF_BUILTIN(BUILT_IN_FMOD)
DEF_BUILTIN(BUILT_IN_FREM)
DEF_BUILTIN(BUILT_IN_MEMCPY)
DEF_BUILTIN(BUILT_IN_MEMCMP)
DEF_BUILTIN(BUILT_IN_MEMSET)
DEF_BUILTIN(BUILT_IN_BZERO)
DEF_BUILTIN(BUILT_IN_BCMP)
DEF_BUILTIN(BUILT_IN_INDEX)
DEF_BUILTIN(BUILT_IN_RINDEX)
DEF_BUILTIN(BUILT_IN_STRCAT)
DEF_BUILTIN(BUILT_IN_STRNCAT)
DEF_BUILTIN(BUILT_IN_STRCPY)
DEF_BUILTIN(BUILT_IN_STRNCPY)
DEF_BUILTIN(BUILT_IN_STRCMP)
DEF_BUILTIN(BUILT_IN_STRNCMP)
DEF_BUILTIN(BUILT_IN_STRLEN)
DEF_BUILTIN(BUILT_IN_STRSTR)
DEF_BUILTIN(BUILT_IN_STRPBRK)
DEF_BUILTIN(BUILT_IN_STRSPN)
DEF_BUILTIN(BUILT_IN_STRCSPN)
DEF_BUILTIN(BUILT_IN_STRCHR)
DEF_BUILTIN(BUILT_IN_STRRCHR)
DEF_BUILTIN(BUILT_IN_FSQRT)
DEF_BUILTIN(BUILT_IN_SIN)
DEF_BUILTIN(BUILT_IN_COS)
DEF_BUILTIN(BUILT_IN_GETEXP)
DEF_BUILTIN(BUILT_IN_GETMAN)
DEF_BUILTIN(BUILT_IN_SAVEREGS)
DEF_BUILTIN(BUILT_IN_CLASSIFY_TYPE)
DEF_BUILTIN(BUILT_IN_NEXT_ARG)
DEF_BUILTIN(BUILT_IN_ARGS_INFO)
DEF_BUILTIN(BUILT_IN_CONSTANT_P)
DEF_BUILTIN(BUILT_IN_FRAME_ADDRESS)
DEF_BUILTIN(BUILT_IN_RETURN_ADDRESS)
DEF_BUILTIN(BUILT_IN_AGGREGATE_INCOMING_ADDRESS)
DEF_BUILTIN(BUILT_IN_APPLY_ARGS)
DEF_BUILTIN(BUILT_IN_APPLY)
DEF_BUILTIN(BUILT_IN_RETURN)
DEF_BUILTIN(BUILT_IN_SETJMP)
DEF_BUILTIN(BUILT_IN_LONGJMP)
DEF_BUILTIN(BUILT_IN_TRAP)
/* Stdio builtins. */
DEF_BUILTIN(BUILT_IN_PUTCHAR)
DEF_BUILTIN(BUILT_IN_PUTS)
DEF_BUILTIN(BUILT_IN_PRINTF)
DEF_BUILTIN(BUILT_IN_FPUTC)
DEF_BUILTIN(BUILT_IN_FPUTS)
DEF_BUILTIN(BUILT_IN_FWRITE)
/* ISO C99 floating point unordered comparisons. */
DEF_BUILTIN(BUILT_IN_ISGREATER)
DEF_BUILTIN(BUILT_IN_ISGREATEREQUAL)
DEF_BUILTIN(BUILT_IN_ISLESS)
DEF_BUILTIN(BUILT_IN_ISLESSEQUAL)
DEF_BUILTIN(BUILT_IN_ISLESSGREATER)
DEF_BUILTIN(BUILT_IN_ISUNORDERED)
/* Various hooks for the DWARF 2 __throw routine. */
DEF_BUILTIN(BUILT_IN_UNWIND_INIT)
DEF_BUILTIN(BUILT_IN_DWARF_CFA)
DEF_BUILTIN(BUILT_IN_DWARF_FP_REGNUM)
DEF_BUILTIN(BUILT_IN_INIT_DWARF_REG_SIZES)
DEF_BUILTIN(BUILT_IN_FROB_RETURN_ADDR)
DEF_BUILTIN(BUILT_IN_EXTRACT_RETURN_ADDR)
DEF_BUILTIN(BUILT_IN_EH_RETURN)
DEF_BUILTIN(BUILT_IN_VARARGS_START)
DEF_BUILTIN(BUILT_IN_STDARG_START)
DEF_BUILTIN(BUILT_IN_VA_END)
DEF_BUILTIN(BUILT_IN_VA_COPY)
DEF_BUILTIN(BUILT_IN_EXPECT)
/* C++ extensions */
DEF_BUILTIN(BUILT_IN_NEW)
DEF_BUILTIN(BUILT_IN_VEC_NEW)
DEF_BUILTIN(BUILT_IN_DELETE)
DEF_BUILTIN(BUILT_IN_VEC_DELETE)