aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2000-03-23 00:20:37 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2000-03-23 00:20:37 +0000
commitcb1072f45021824406e8ac504a111d6bbccb5b81 (patch)
tree749b1c40907afda0f70894c379324d941e4fe7ab /gcc
parentdc397323c699c6491853417cd4011bfbab64a19f (diff)
downloadgcc-cb1072f45021824406e8ac504a111d6bbccb5b81.zip
gcc-cb1072f45021824406e8ac504a111d6bbccb5b81.tar.gz
gcc-cb1072f45021824406e8ac504a111d6bbccb5b81.tar.bz2
builtins.def: New file.
* builtins.def: New file. * Makefile.in (TREE_H): Depend on builtins.def. * builtins.c (built_in_names): Use builtins.def. * tree.h (built_in_function): Likewise. From-SVN: r32695
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/builtins.c23
-rw-r--r--gcc/builtins.def85
-rw-r--r--gcc/tree.h67
5 files changed, 104 insertions, 83 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e1d6eae..fddb52a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2000-03-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.def: New file.
+
+ * Makefile.in (TREE_H): Depend on builtins.def.
+
+ * builtins.c (built_in_names): Use builtins.def.
+
+ * tree.h (built_in_function): Likewise.
+
2000-03-22 Mark Mitchell <mark@codesourcery.com>
* tree.c (size_in_bytes): Return size_zero_node, not
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 6fa0873..2c0096a 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -753,7 +753,7 @@ CONFIG_H =
MACHMODE_H = machmode.h machmode.def
RTL_BASE_H = rtl.h rtl.def $(MACHMODE_H)
RTL_H = $(RTL_BASE_H) genrtl.h
-TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h
+TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.def
BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h
DEMANGLE_H = $(srcdir)/../include/demangle.h
RECOG_H = recog.h
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 7da5161..c4b2e76 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -60,25 +60,12 @@ Boston, MA 02111-1307, USA. */
const char *const built_in_class_names[4]
= {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"};
+#define DEF_BUILTIN(x) STRINGIFY(x),
const char *const built_in_names[(int) END_BUILTINS] =
-{"BUILT_IN_ALLOCA", "BUILT_IN_ABS", "BUILT_IN_FABS", "BUILT_IN_LABS",
- "BUILT_IN_FFS", "BUILT_IN_DIV", "BUILT_IN_LDIV", "BUILT_IN_FFLOOR",
- "BUILT_IN_FCEIL", "BUILT_IN_FMOD", "BUILT_IN_FREM", "BUILT_IN_MEMCPY",
- "BUILT_IN_MEMCMP", "BUILT_IN_MEMSET", "BUILT_IN_STRCPY", "BUILT_IN_STRCMP",
- "BUILT_IN_STRLEN", "BUILT_IN_FSQRT", "BUILT_IN_SIN", "BUILT_IN_COS",
- "BUILT_IN_GETEXP", "BUILT_IN_GETMAN", "BUILT_IN_SAVEREGS",
- "BUILT_IN_CLASSIFY_TYPE", "BUILT_IN_NEXT_ARG", "BUILT_IN_ARGS_INFO",
- "BUILT_IN_CONSTANT_P", "BUILT_IN_FRAME_ADDRESS", "BUILT_IN_RETURN_ADDRESS",
- "BUILT_IN_AGGREGATE_INCOMING_ADDRESS", "BUILT_IN_APPLY_ARGS",
- "BUILT_IN_APPLY", "BUILT_IN_RETURN", "BUILT_IN_SETJMP", "BUILT_IN_LONGJMP",
- "BUILT_IN_TRAP", "BUILT_IN_ISGREATER", "BUILT_IN_ISGREATEREQUAL",
- "BUILT_IN_ISLESS", "BUILT_IN_ISLESSEQUAL", "BUILT_IN_ISLESSGREATER",
- "BUILT_IN_ISUNORDERED", "BUILT_IN_UNWIND_INIT", "BUILT_IN_DWARF_CFA",
- "BUILT_IN_DWARF_FP_REGNUM", "BUILT_IN_INIT_DWARF_REG_SIZES",
- "BUILT_IN_FROB_RETURN_ADDR", "BUILT_IN_EXTRACT_RETURN_ADDR",
- "BUILT_IN_EH_RETURN", "BUILT_IN_VARARGS_START", "BUILT_IN_STDARG_START",
- "BUILT_IN_VA_END", "BUILT_IN_VA_COPY", "BUILT_IN_NEW", "BUILT_IN_VEC_NEW",
- "BUILT_IN_DELETE", "BUILT_IN_VEC_DELETE" };
+{
+#include "builtins.def"
+};
+#undef DEF_BUILTIN
tree (*lang_type_promotes_to) PARAMS ((tree));
diff --git a/gcc/builtins.def b/gcc/builtins.def
new file mode 100644
index 0000000..0a0f72d
--- /dev/null
+++ b/gcc/builtins.def
@@ -0,0 +1,85 @@
+/* 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_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_STRCPY)
+DEF_BUILTIN(BUILT_IN_STRCMP)
+DEF_BUILTIN(BUILT_IN_STRLEN)
+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)
+
+ /* 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)
+
+ /* C++ extensions */
+DEF_BUILTIN(BUILT_IN_NEW)
+DEF_BUILTIN(BUILT_IN_VEC_NEW)
+DEF_BUILTIN(BUILT_IN_DELETE)
+DEF_BUILTIN(BUILT_IN_VEC_DELETE)
diff --git a/gcc/tree.h b/gcc/tree.h
index 3f1d627..61e7818 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -83,76 +83,15 @@ extern const char *const built_in_class_names[4];
/* Codes that identify the various built in functions
so that expand_call can identify them quickly. */
+#define DEF_BUILTIN(x) x,
enum built_in_function
{
- BUILT_IN_ALLOCA,
- BUILT_IN_ABS,
- BUILT_IN_FABS,
- BUILT_IN_LABS,
- BUILT_IN_FFS,
- BUILT_IN_DIV,
- BUILT_IN_LDIV,
- BUILT_IN_FFLOOR,
- BUILT_IN_FCEIL,
- BUILT_IN_FMOD,
- BUILT_IN_FREM,
- BUILT_IN_MEMCPY,
- BUILT_IN_MEMCMP,
- BUILT_IN_MEMSET,
- BUILT_IN_STRCPY,
- BUILT_IN_STRCMP,
- BUILT_IN_STRLEN,
- BUILT_IN_FSQRT,
- BUILT_IN_SIN,
- BUILT_IN_COS,
- BUILT_IN_GETEXP,
- BUILT_IN_GETMAN,
- BUILT_IN_SAVEREGS,
- BUILT_IN_CLASSIFY_TYPE,
- BUILT_IN_NEXT_ARG,
- BUILT_IN_ARGS_INFO,
- BUILT_IN_CONSTANT_P,
- BUILT_IN_FRAME_ADDRESS,
- BUILT_IN_RETURN_ADDRESS,
- BUILT_IN_AGGREGATE_INCOMING_ADDRESS,
- BUILT_IN_APPLY_ARGS,
- BUILT_IN_APPLY,
- BUILT_IN_RETURN,
- BUILT_IN_SETJMP,
- BUILT_IN_LONGJMP,
- BUILT_IN_TRAP,
-
- /* ISO C99 floating point unordered comparisons. */
- BUILT_IN_ISGREATER,
- BUILT_IN_ISGREATEREQUAL,
- BUILT_IN_ISLESS,
- BUILT_IN_ISLESSEQUAL,
- BUILT_IN_ISLESSGREATER,
- BUILT_IN_ISUNORDERED,
-
- /* Various hooks for the DWARF 2 __throw routine. */
- BUILT_IN_UNWIND_INIT,
- BUILT_IN_DWARF_CFA,
- BUILT_IN_DWARF_FP_REGNUM,
- BUILT_IN_INIT_DWARF_REG_SIZES,
- BUILT_IN_FROB_RETURN_ADDR,
- BUILT_IN_EXTRACT_RETURN_ADDR,
- BUILT_IN_EH_RETURN,
-
- BUILT_IN_VARARGS_START,
- BUILT_IN_STDARG_START,
- BUILT_IN_VA_END,
- BUILT_IN_VA_COPY,
-
- /* C++ extensions */
- BUILT_IN_NEW,
- BUILT_IN_VEC_NEW,
- BUILT_IN_DELETE,
- BUILT_IN_VEC_DELETE,
+#include "builtins.def"
/* Upper bound on non-language-specific builtins. */
END_BUILTINS
};
+#undef DEF_BUILTIN
/* Names for the above. */
extern const char *const built_in_names[(int) END_BUILTINS];