aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-02-29 02:34:48 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-02-28 21:34:48 -0500
commit9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f (patch)
tree9d32681a03d3ca309091c1dee14f1053a1621f84 /gcc/builtins.c
parentc27ba9120aa6d7a4477315f359088ea7e4267bd3 (diff)
downloadgcc-9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f.zip
gcc-9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f.tar.gz
gcc-9df2c88cf7ee9be1a279bf7e1fc032b77d9bb56f.tar.bz2
* Eliminate DECL_FIELD_SIZE.
* builtins.c (built_in_class_names, built_in_names): New variables. * c-decl.c (finish_struct): Set specified size in DECL_SIZE. * expr.c (expand_expr, case COMPONENT_REF): Get field size from DECL_SIZE, not DECL_FIELD_SIZE. * print-tree.c (print_node): Remove code that prints extra blank lines in some cases. Properly handle inline and builtin function cases. * stor-layout.c (layout_decl): Get specified size from DEC_SIZE. * tree.h (built_in_class_named, built_in_names): New declarations. (union tree_decl): Rename internal unions to u1 and u2 and change some of their components. Add new field built_in_class. (DECL_ALIGN, DECL_INCOMING_RTL, DECL_SAVED_INSNS, DECL_FRAME_SIZE): Reflect above changes. (DECL_FUNCTION_CODE, DECL_BUILT_IN_CLASS): Likewise. (DECL_SET_FUNCTION_CODE, DECL_FIELD_SIZE): Deleted. * objc/objc-act.c (objc_copy_list): Use DECL_SIZE, not DECL_FIELD_SIZE. (encode_field_decl): Likewise; also remove obsolete test for bitfield. * ch/ch-tree.h (DECL_ACTION_NESTING_LEVEL): Use new tree union name. * ch/decl.c (finish_struct): Don't clear DECL_FIELD_SIZE. * ch/typeck.c (make_chill_struct_type): Likewise. (apply_decl_field_layout): General cleanup. Set DECL_SIZE instead of DECL_FIELD_SIZE. * cp/class.c (build_vtbl_or_vbase_field, check_methods): Don't clear DECL_FIELD_SIZE. (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not DECL_FIELD_SIZE. * cp/rtti.c (expand_class_desc): Likewise. * cp/cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name. (THUNK_VCALL_OFFSET): Likewise. (THUNK_DELTA): Reflect changes in ../tree.h. * java/java-tree.h (LABEL_PC): Relect name changes in ../tree.h. (DECL_BIT_INDEX): Use underlying representation. * java/parse.h (DECL_INHERITED_SOURCE_LINE): Likewise. From-SVN: r32249
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index e32d0bd..c77d51c 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -56,6 +56,30 @@ Boston, MA 02111-1307, USA. */
#define PAD_VARARGS_DOWN BYTES_BIG_ENDIAN
#endif
+/* Define the names of the builtin function types and codes. */
+char *built_in_class_names[4]
+ = {"NOT_BUILT_IN", "BUILT_IN_FRONTEND", "BUILT_IN_MD", "BUILT_IN_NORMAL"};
+
+char *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" };
+
tree (*lang_type_promotes_to) PARAMS ((tree));
static int get_pointer_alignment PARAMS ((tree, unsigned));
@@ -85,7 +109,8 @@ static rtx expand_builtin_strcmp PARAMS ((tree, rtx));
static rtx expand_builtin_memcpy PARAMS ((tree));
static rtx expand_builtin_strcpy PARAMS ((tree));
static rtx expand_builtin_memset PARAMS ((tree));
-static rtx expand_builtin_strlen PARAMS ((tree, rtx, enum machine_mode));
+static rtx expand_builtin_strlen PARAMS ((tree, rtx,
+ enum machine_mode));
static rtx expand_builtin_alloca PARAMS ((tree, rtx));
static rtx expand_builtin_ffs PARAMS ((tree, rtx, rtx));
static rtx expand_builtin_frame_address PARAMS ((tree));