diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-21 22:01:24 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-21 22:01:24 +0000 |
commit | ffde65b31066f17eef243be882bb89a6e19370aa (patch) | |
tree | ea876d041c0a63eefccdac5416a8678e75da4cfc /include | |
parent | a8c7acc4db08ce7c8ac3ddcb943f9219e2893792 (diff) | |
download | gcc-ffde65b31066f17eef243be882bb89a6e19370aa.tar.gz |
[.]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net>
{{merged with trunk -i.e. GCC5.0 in stage4- using
svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk
but should probably have used
svn merge -r209216:219879 ^/trunk
we don't use svnmerge.py anymore since our svn is version 1.8.10
}}
VERY UNSTABLE
2015-01-20 Basile Starynkevitch <basile@starynkevitch.net>
Move previous topdir ChangeLog.MELT to ChangeLog.MELT.2008-2014
[contrib/]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net>
* MELT-Plugin-Makefile: Able to make upgrade-melt as a
plugin. Works for GCC 5.0. Remove GCC 4.7 old stuff.
Move previous contrib/ChangeLog.MELT to ChangeLog.MELT.2008-2014
[gcc/]
2015-01-21 Basile Starynkevitch <basile@starynkevitch.net>
{{merged with trunk -i.e. GCC5.0 in stage4- using
svn merge -r209216:219879 svn+ssh://bstarynk@gcc.gnu.org/svn/gcc/trunk
but should probably have used
svn merge -r209216:219879 ^/trunk
**@@@ UNSTABLE since libmelt-ana-gimple.melt not compiling, but
translator painfully bootstrapping!!@@@@ }}
* toplev.c: Merged manually by keeping MELT extra stuff.
* toplev.h: Likewise.
* gengtype.c: Add "melt-runtime.h" in list, but merged with trunk.
* melt-runtime.h (MELT_VERSION_STRING): Bump to "1.2-pre-merged".
(meltgc_walk_gimple_seq): Remove.
(gt_ggc_mx_gimple_statement_d): Same for GCC 4.9 & 5.0
* melt-runtime.cc: Update copyright year.
(ggc_alloc_cleared_melt_valuevector_st, melt_resize_scangcvect):
Call ggc_internal_cleared_alloc.
(melt_val2passflag): Skip TODO_verify_ssa, TODO_verify_flow,
TODO_verify_stmts, TODO_verify_rtl_sharing for GCC 5.0.
(meltgc_walkstmt_cb, meltgc_walktree_cb)
(melt_tree_walk_frame_size, meltgc_walk_gimple_seq): Remove.
(melt_gt_ggc_mx_gimple_seq_d): Call
gt_ggc_mx_gimple_statement_base.
* melt-build-script.tpl: Update copyright year. Don't symlink
meltrunsup.h anymore.
* melt-build-script.sh: Regenerate.
* melt/warmelt-base.melt: Update copyright year.
(valdesc_object, valdesc_mapobjects, valdesc_mapstrings)
(valdesc_multiple, valdesc_closure, valdesc_routine, valdesc_hook)
(valdesc_bucketlongs, valdesc_jsonobject, valdesc_string)
(valdesc_strbuf, valdesc_pair, valdesc_list, valdesc_int)
(valdesc_double, valdesc_mixint, valdesc_mixloc)
(valdesc_mixbigint, valdesc_real, valdesc_special_data): Use
ggc_internal_alloc & ggc_internal_cleared_alloc for GCC 5.0.
(json_canonical_name): Use ISUPPER, ISALPHA, TOUPPER instead of
their standard <ctype.h> lowercase macros.
* melt/warmelt-modes.melt: Update copyright year.
(generate_runtypesupport_forwcopy_fun): Emit both GCC 4.9 & 5.0
compatible code.
* melt/libmelt-ana-base.melt: Update copyright year.
* melt/libmelt-ana-gimple.melt: TO BE IMPROVED
* melt/generated/*: Painfully regenerated several times thru GCC
4.9 MELT plugin.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@219975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include')
-rw-r--r-- | include/ChangeLog | 125 | ||||
-rw-r--r-- | include/ChangeLog.jit | 11 | ||||
-rw-r--r-- | include/demangle.h | 11 | ||||
-rw-r--r-- | include/dwarf2.def | 20 | ||||
-rw-r--r-- | include/dwarf2.h | 4 | ||||
-rw-r--r-- | include/filenames.h | 2 | ||||
-rw-r--r-- | include/gcc-c-fe.def | 197 | ||||
-rw-r--r-- | include/gcc-c-interface.h | 220 | ||||
-rw-r--r-- | include/gcc-interface.h | 127 | ||||
-rw-r--r-- | include/gomp-constants.h | 116 | ||||
-rw-r--r-- | include/hashtab.h | 10 | ||||
-rw-r--r-- | include/libiberty.h | 59 | ||||
-rw-r--r-- | include/longlong.h | 29 | ||||
-rw-r--r-- | include/splay-tree.h | 20 |
14 files changed, 923 insertions, 28 deletions
diff --git a/include/ChangeLog b/include/ChangeLog index d83e6b74720..0917d9443bc 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,128 @@ +2015-01-15 Thomas Schwinge <thomas@codesourcery.com> + Julian Brown <julian@codesourcery.com> + James Norris <jnorris@codesourcery.com> + + * gomp-constants.h: New file. + +2015-12-14 Jan-Benedict Glaw <jbglaw@lug-owl.de> + + * libiberty.h: Merge Copyright year update from Binutils. + +2014-12-24 Uros Bizjak <ubizjak@gmail.com> + Ben Elliston <bje@au.ibm.com> + Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + * libiberty.h (xasprintf): Declare. + +2014-12-11 Uros Bizjak <ubizjak@gmail.com> + Ben Elliston <bje@au.ibm.com> + Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + * libiberty.h (xvasprintf): Declare. + +2014-12-09 Trevor Saunders <tsaunders@mozilla.com> + + * hashtab.h, splay-tree.h: Remove GTY markers. + +2014-12-08 Mark Wielaard <mjw@redhat.com> + + PR debug/60782 + * dwarf2.def: Add DWARFv5 DW_TAG_atomic_type. + +2014-11-21 Mark Wielaard <mjw@redhat.com> + + * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and + DW_LANG_C_plus_plus_14. + +2014-11-25 Mark Wielaard <mjw@redhat.com> + + * dwarf2.def (DW_AT_noreturn): New DWARF5 attribute. + +2014-11-14 Shinichiro Hamaji <shinichiro.hamaji@gmail.com> + + * dwarf2.def (DW_AT_APPLE_optimized, DW_AT_APPLE_flags) + (DW_AT_APPLE_isa, DW_AT_APPLE_block) + (DW_AT_APPLE_major_runtime_vers, DW_AT_APPLE_runtime_class) + (DW_AT_APPLE_omit_frame_ptr, DW_AT_APPLE_property_name) + (DW_AT_APPLE_property_getter, DW_AT_APPLE_property_setter) + (DW_AT_APPLE_property_attribute, DW_AT_APPLE_objc_complete_type) + (DW_AT_APPLE_property): New macros. + +2014-11-11 Anthony Brandon <anthony.brandon@gmail.com> + Manuel López-Ibáñez <manu@gcc.gnu.org> + + PR driver/36312 + * filenames.h: Add prototype for canonical_filename_eq. + +2014-11-11 David Malcolm <dmalcolm@redhat.com> + + * ChangeLog.jit: New. + +2014-10-28 Richard Henderson <rth@redhat.com> + + * longlong.h [__alpha] (umul_ppmm): Disable for c++. + +2014-10-28 Yury Gribov <y.gribov@samsung.com> + + * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes. + +2014-10-27 Phil Muldoon <pmuldoon@redhat.com> + Jan Kratochvil <jan.kratochvil@redhat.com> + Tom Tromey <tromey@redhat.com> + + * gcc-c-fe.def: New file. + * gcc-c-interface.h: New file. + * gcc-interface.h: New file. + +2014-10-15 David Malcolm <dmalcolm@redhat.com> + + * libiberty.h (choose_tmpdir): New prototype. + +2013-10-02 Mark Wielaard <mjw@redhat.com> + + PR debug/63239 + * dwarf2.def (DW_AT_GNU_deleted): New attribute. + +2014-09-26 Max Ostapenko <m.ostapenko@partner.samsung.com> + + * libiberty.h (PEX_STDOUT_APPEND): New flag. + (PEX_STDERR_APPEND): Likewise. + +2014-09-23 Iain Buclaw <ibuclaw@gdcproject.org> + + * demangle.h (DMGL_DLANG): New macro. + (DMGL_STYLE_MASK): Add DMGL_DLANG. + (demangling_styles): Add dlang_demangling. + (DLANG_DEMANGLING_STYLE_STRING): New macro. + (DLANG_DEMANGLING): New macro. + (dlang_demangle): New prototype. + +2014-09-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> + + * longlong.h: Add __udiv_w_sdiv prototype. + +2014-06-10 Thomas Schwinge <thomas@codesourcery.com> + + PR lto/61334 + * libiberty.h [defined (HAVE_DECL_STRNLEN) && + !HAVE_DECL_STRNLEN] (strnlen): New prototype. + +2014-05-21 John Marino <gnugcc@marino.st> + + * liberty.h: Use basename function on DragonFly. + +2014-05-01 Steve Ellcey <sellcey@mips.com> + + * include/longlong.h: Use 'defined()' to check __mips16. + +2014-04-30 Richard Sandiford <rdsandiford@googlemail.com> + + * longlong.h (__i386__): Remove W_TYPE_SIZE==64 handling. + +2014-04-22 Yufeng Zhang <yufeng.zhang@arm.com> + + * longlong.h: Merge from glibc. + 2014-01-21 Tom Tromey <tromey@redhat.com> * ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, PARAMS) diff --git a/include/ChangeLog.jit b/include/ChangeLog.jit new file mode 100644 index 00000000000..84acd3314f1 --- /dev/null +++ b/include/ChangeLog.jit @@ -0,0 +1,11 @@ +2014-09-25 David Malcolm <dmalcolm@redhat.com> + + * libiberty.h (choose_tmpdir): New prototype. + * ChangeLog.jit: New. + + +Copyright (C) 2014 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. diff --git a/include/demangle.h b/include/demangle.h index bbad71bd8c7..d2a6731a9ee 100644 --- a/include/demangle.h +++ b/include/demangle.h @@ -63,9 +63,10 @@ extern "C" { #define DMGL_EDG (1 << 13) #define DMGL_GNU_V3 (1 << 14) #define DMGL_GNAT (1 << 15) +#define DMGL_DLANG (1 << 16) /* If none of these are set, use 'current_demangling_style' as the default. */ -#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT) +#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT|DMGL_DLANG) /* Enumeration of possible demangling styles. @@ -87,7 +88,8 @@ extern enum demangling_styles edg_demangling = DMGL_EDG, gnu_v3_demangling = DMGL_GNU_V3, java_demangling = DMGL_JAVA, - gnat_demangling = DMGL_GNAT + gnat_demangling = DMGL_GNAT, + dlang_demangling = DMGL_DLANG } current_demangling_style; /* Define string names for the various demangling styles. */ @@ -102,6 +104,7 @@ extern enum demangling_styles #define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3" #define JAVA_DEMANGLING_STYLE_STRING "java" #define GNAT_DEMANGLING_STYLE_STRING "gnat" +#define DLANG_DEMANGLING_STYLE_STRING "dlang" /* Some macros to test what demangling style is active. */ @@ -115,6 +118,7 @@ extern enum demangling_styles #define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3) #define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA) #define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT) +#define DLANG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_DLANG) /* Provide information about the available demangle styles. This code is pulled from gdb into libiberty because it is useful to binutils also. */ @@ -169,6 +173,9 @@ java_demangle_v3 (const char *mangled); char * ada_demangle (const char *mangled, int options); +extern char * +dlang_demangle (const char *mangled, int options); + enum gnu_v3_ctor_kinds { gnu_v3_complete_object_ctor = 1, gnu_v3_base_object_ctor, diff --git a/include/dwarf2.def b/include/dwarf2.def index 71a37b30c9f..ea8127c8b1d 100644 --- a/include/dwarf2.def +++ b/include/dwarf2.def @@ -133,6 +133,8 @@ DW_TAG (DW_TAG_shared_type, 0x40) DW_TAG (DW_TAG_type_unit, 0x41) DW_TAG (DW_TAG_rvalue_reference_type, 0x42) DW_TAG (DW_TAG_template_alias, 0x43) +/* DWARF 5. */ +DW_TAG (DW_TAG_atomic_type, 0x47) DW_TAG_DUP (DW_TAG_lo_user, 0x4080) DW_TAG_DUP (DW_TAG_hi_user, 0xffff) @@ -308,6 +310,8 @@ DW_AT (DW_AT_data_bit_offset, 0x6b) DW_AT (DW_AT_const_expr, 0x6c) DW_AT (DW_AT_enum_class, 0x6d) DW_AT (DW_AT_linkage_name, 0x6e) +/* DWARF 5. */ +DW_AT (DW_AT_noreturn, 0x87) DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start. */ DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end. */ @@ -383,6 +387,8 @@ DW_AT (DW_AT_GNU_all_call_sites, 0x2117) DW_AT (DW_AT_GNU_all_source_call_sites, 0x2118) /* Section offset into .debug_macro section. */ DW_AT (DW_AT_GNU_macros, 0x2119) +/* Attribute for C++ deleted special member functions (= delete;). */ +DW_AT (DW_AT_GNU_deleted, 0x211a) /* Extensions for Fission. See http://gcc.gnu.org/wiki/DebugFission. */ DW_AT (DW_AT_GNU_dwo_name, 0x2130) DW_AT (DW_AT_GNU_dwo_id, 0x2131) @@ -406,6 +412,20 @@ DW_AT (DW_AT_upc_threads_scaled, 0x3210) DW_AT (DW_AT_PGI_lbase, 0x3a00) DW_AT (DW_AT_PGI_soffset, 0x3a01) DW_AT (DW_AT_PGI_lstride, 0x3a02) +/* Apple extensions. */ +DW_AT (DW_AT_APPLE_optimized, 0x3fe1) +DW_AT (DW_AT_APPLE_flags, 0x3fe2) +DW_AT (DW_AT_APPLE_isa, 0x3fe3) +DW_AT (DW_AT_APPLE_block, 0x3fe4) +DW_AT (DW_AT_APPLE_major_runtime_vers, 0x3fe5) +DW_AT (DW_AT_APPLE_runtime_class, 0x3fe6) +DW_AT (DW_AT_APPLE_omit_frame_ptr, 0x3fe7) +DW_AT (DW_AT_APPLE_property_name, 0x3fe8) +DW_AT (DW_AT_APPLE_property_getter, 0x3fe9) +DW_AT (DW_AT_APPLE_property_setter, 0x3fea) +DW_AT (DW_AT_APPLE_property_attribute, 0x3feb) +DW_AT (DW_AT_APPLE_objc_complete_type, 0x3fec) +DW_AT (DW_AT_APPLE_property, 0x3fed) DW_END_AT DW_FIRST_OP (DW_OP_addr, 0x03) diff --git a/include/dwarf2.h b/include/dwarf2.h index 120e2c16b48..ca440dd42b5 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -309,6 +309,10 @@ enum dwarf_source_language /* DWARF 5. */ DW_LANG_Go = 0x0016, + DW_LANG_C_plus_plus_11 = 0x001a, /* dwarf5.20141029.pdf DRAFT */ + DW_LANG_C11 = 0x001d, + DW_LANG_C_plus_plus_14 = 0x0021, + DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */ DW_LANG_hi_user = 0xffff, /* Implementation-defined range start. */ diff --git a/include/filenames.h b/include/filenames.h index e799a51b6ad..470c5e091ab 100644 --- a/include/filenames.h +++ b/include/filenames.h @@ -90,6 +90,8 @@ extern hashval_t filename_hash (const void *s); extern int filename_eq (const void *s1, const void *s2); +extern int canonical_filename_eq (const char *a, const char *b); + #ifdef __cplusplus } #endif diff --git a/include/gcc-c-fe.def b/include/gcc-c-fe.def new file mode 100644 index 00000000000..19cb8674db9 --- /dev/null +++ b/include/gcc-c-fe.def @@ -0,0 +1,197 @@ +/* Interface between GCC C FE and GDB -*- c -*- + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GCC. + + This program 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 3 of the License, or + (at your option) any later version. + + This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ + + + +/* Create a new "decl" in GCC. A decl is a declaration, basically a + kind of symbol. + + NAME is the name of the new symbol. SYM_KIND is the kind of + symbol being requested. SYM_TYPE is the new symbol's C type; + except for labels, where this is not meaningful and should be + zero. If SUBSTITUTION_NAME is not NULL, then a reference to this + decl in the source will later be substituted with a dereference + of a variable of the given name. Otherwise, for symbols having + an address (e.g., functions), ADDRESS is the address. FILENAME + and LINE_NUMBER refer to the symbol's source location. If this + is not known, FILENAME can be NULL and LINE_NUMBER can be 0. + This function returns the new decl. */ + +GCC_METHOD7 (gcc_decl, build_decl, + const char *, /* Argument NAME. */ + enum gcc_c_symbol_kind, /* Argument SYM_KIND. */ + gcc_type, /* Argument SYM_TYPE. */ + const char *, /* Argument SUBSTITUTION_NAME. */ + gcc_address, /* Argument ADDRESS. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Insert a GCC decl into the symbol table. DECL is the decl to + insert. IS_GLOBAL is true if this is an outermost binding, and + false if it is a possibly-shadowing binding. */ + +GCC_METHOD2 (int /* bool */, bind, + gcc_decl, /* Argument DECL. */ + int /* bool */) /* Argument IS_GLOBAL. */ + +/* Insert a tagged type into the symbol table. NAME is the tag name + of the type and TAGGED_TYPE is the type itself. TAGGED_TYPE must + be either a struct, union, or enum type, as these are the only + types that have tags. FILENAME and LINE_NUMBER refer to the type's + source location. If this is not known, FILENAME can be NULL and + LINE_NUMBER can be 0. */ + +GCC_METHOD4 (int /* bool */, tagbind, + const char *, /* Argument NAME. */ + gcc_type, /* Argument TAGGED_TYPE. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Return the type of a pointer to a given base type. */ + +GCC_METHOD1 (gcc_type, build_pointer_type, + gcc_type) /* Argument BASE_TYPE. */ + +/* Create a new 'struct' type. Initially it has no fields. */ + +GCC_METHOD0 (gcc_type, build_record_type) + +/* Create a new 'union' type. Initially it has no fields. */ + +GCC_METHOD0 (gcc_type, build_union_type) + +/* Add a field to a struct or union type. FIELD_NAME is the field's + name. FIELD_TYPE is the type of the field. BITSIZE and BITPOS + indicate where in the struct the field occurs. */ + +GCC_METHOD5 (int /* bool */, build_add_field, + gcc_type, /* Argument RECORD_OR_UNION_TYPE. */ + const char *, /* Argument FIELD_NAME. */ + gcc_type, /* Argument FIELD_TYPE. */ + unsigned long, /* Argument BITSIZE. */ + unsigned long) /* Argument BITPOS. */ + +/* After all the fields have been added to a struct or union, the + struct or union type must be "finished". This does some final + cleanups in GCC. */ + +GCC_METHOD2 (int /* bool */, finish_record_or_union, + gcc_type, /* Argument RECORD_OR_UNION_TYPE. */ + unsigned long) /* Argument SIZE_IN_BYTES. */ + +/* Create a new 'enum' type. The new type initially has no + associated constants. */ + +GCC_METHOD1 (gcc_type, build_enum_type, + gcc_type) /* Argument UNDERLYING_INT_TYPE. */ + +/* Add a new constant to an enum type. NAME is the constant's + name and VALUE is its value. */ + +GCC_METHOD3 (int /* bool */, build_add_enum_constant, + gcc_type, /* Argument ENUM_TYPE. */ + const char *, /* Argument NAME. */ + unsigned long) /* Argument VALUE. */ + +/* After all the constants have been added to an enum, the type must + be "finished". This does some final cleanups in GCC. */ + +GCC_METHOD1 (int /* bool */, finish_enum_type, + gcc_type) /* Argument ENUM_TYPE. */ + +/* Create a new function type. RETURN_TYPE is the type returned by + the function, and ARGUMENT_TYPES is a vector, of length NARGS, of + the argument types. IS_VARARGS is true if the function is + varargs. */ + +GCC_METHOD3 (gcc_type, build_function_type, + gcc_type, /* Argument RETURN_TYPE. */ + const struct gcc_type_array *, /* Argument ARGUMENT_TYPES. */ + int /* bool */) /* Argument IS_VARARGS. */ + +/* Return an integer type with the given properties. */ + +GCC_METHOD2 (gcc_type, int_type, + int /* bool */, /* Argument IS_UNSIGNED. */ + unsigned long) /* Argument SIZE_IN_BYTES. */ + +/* Return a floating point type with the given properties. */ + +GCC_METHOD1 (gcc_type, float_type, + unsigned long) /* Argument SIZE_IN_BYTES. */ + +/* Return the 'void' type. */ + +GCC_METHOD0 (gcc_type, void_type) + +/* Return the 'bool' type. */ + +GCC_METHOD0 (gcc_type, bool_type) + +/* Create a new array type. If NUM_ELEMENTS is -1, then the array + is assumed to have an unknown length. */ + +GCC_METHOD2 (gcc_type, build_array_type, + gcc_type, /* Argument ELEMENT_TYPE. */ + int) /* Argument NUM_ELEMENTS. */ + +/* Create a new variably-sized array type. UPPER_BOUND_NAME is the + name of a local variable that holds the upper bound of the array; + it is one less than the array size. */ + +GCC_METHOD2 (gcc_type, build_vla_array_type, + gcc_type, /* Argument ELEMENT_TYPE. */ + const char *) /* Argument UPPER_BOUND_NAME. */ + +/* Return a qualified variant of a given base type. QUALIFIERS says + which qualifiers to use; it is composed of or'd together + constants from 'enum gcc_qualifiers'. */ + +GCC_METHOD2 (gcc_type, build_qualified_type, + gcc_type, /* Argument UNQUALIFIED_TYPE. */ + enum gcc_qualifiers) /* Argument QUALIFIERS. */ + +/* Build a complex type given its element type. */ + +GCC_METHOD1 (gcc_type, build_complex_type, + gcc_type) /* Argument ELEMENT_TYPE. */ + +/* Build a vector type given its element type and number of + elements. */ + +GCC_METHOD2 (gcc_type, build_vector_type, + gcc_type, /* Argument ELEMENT_TYPE. */ + int) /* Argument NUM_ELEMENTS. */ + +/* Build a constant. NAME is the constant's name and VALUE is its + value. FILENAME and LINE_NUMBER refer to the type's source + location. If this is not known, FILENAME can be NULL and + LINE_NUMBER can be 0. */ + +GCC_METHOD5 (int /* bool */, build_constant, + gcc_type, /* Argument TYPE. */ + const char *, /* Argument NAME. */ + unsigned long, /* Argument VALUE. */ + const char *, /* Argument FILENAME. */ + unsigned int) /* Argument LINE_NUMBER. */ + +/* Emit an error and return an error type object. */ + +GCC_METHOD1 (gcc_type, error, + const char *) /* Argument MESSAGE. */ diff --git a/include/gcc-c-interface.h b/include/gcc-c-interface.h new file mode 100644 index 00000000000..25ef62f6e81 --- /dev/null +++ b/include/gcc-c-interface.h @@ -0,0 +1,220 @@ +/* Interface between GCC C FE and GDB + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GCC. + + This program 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 3 of the License, or + (at your option) any later version. + + This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef GCC_C_INTERFACE_H +#define GCC_C_INTERFACE_H + +#include "gcc-interface.h" + +/* This header defines the interface to the GCC API. It must be both + valid C and valid C++, because it is included by both programs. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declaration. */ + +struct gcc_c_context; + +/* + * Definitions and declarations for the C front end. + */ + +/* Defined versions of the C front-end API. */ + +enum gcc_c_api_version +{ + GCC_C_FE_VERSION_0 = 0 +}; + +/* Qualifiers. */ + +enum gcc_qualifiers +{ + GCC_QUALIFIER_CONST = 1, + GCC_QUALIFIER_VOLATILE = 2, + GCC_QUALIFIER_RESTRICT = 4 +}; + +/* This enumerates the kinds of decls that GDB can create. */ + +enum gcc_c_symbol_kind +{ + /* A function. */ + + GCC_C_SYMBOL_FUNCTION, + + /* A variable. */ + + GCC_C_SYMBOL_VARIABLE, + + /* A typedef. */ + + GCC_C_SYMBOL_TYPEDEF, + + /* A label. */ + + GCC_C_SYMBOL_LABEL +}; + +/* This enumerates the types of symbols that GCC might request from + GDB. */ + +enum gcc_c_oracle_request +{ + /* An ordinary symbol -- a variable, function, typedef, or enum + constant. */ + + GCC_C_ORACLE_SYMBOL, + + /* A struct, union, or enum tag. */ + + GCC_C_ORACLE_TAG, + + /* A label. */ + + GCC_C_ORACLE_LABEL +}; + +/* The type of the function called by GCC to ask GDB for a symbol's + definition. DATUM is an arbitrary value supplied when the oracle + function is registered. CONTEXT is the GCC context in which the + request is being made. REQUEST specifies what sort of symbol is + being requested, and IDENTIFIER is the name of the symbol. */ + +typedef void gcc_c_oracle_function (void *datum, + struct gcc_c_context *context, + enum gcc_c_oracle_request request, + const char *identifier); + +/* The type of the function called by GCC to ask GDB for a symbol's + address. This should return 0 if the address is not known. */ + +typedef gcc_address gcc_c_symbol_address_function (void *datum, + struct gcc_c_context *ctxt, + const char *identifier); + +/* An array of types used for creating a function type. */ + +struct gcc_type_array +{ + /* Number of elements. */ + + int n_elements; + + /* The elements. */ + + gcc_type *elements; +}; + +/* The vtable used by the C front end. */ + +struct gcc_c_fe_vtable +{ + /* The version of the C interface. The value is one of the + gcc_c_api_version constants. */ + + unsigned int c_version; + + /* Set the callbacks for this context. + + The binding oracle is called whenever the C parser needs to look + up a symbol. This gives the caller a chance to lazily + instantiate symbols using other parts of the gcc_c_fe_interface + API. + + The address oracle is called whenever the C parser needs to look + up a symbol. This is only called for symbols not provided by the + symbol oracle -- that is, just built-in functions where GCC + provides the declaration. + + DATUM is an arbitrary piece of data that is passed back verbatim + to the callbakcs in requests. */ + + void (*set_callbacks) (struct gcc_c_context *self, + gcc_c_oracle_function *binding_oracle, + gcc_c_symbol_address_function *address_oracle, + void *datum); + +#define GCC_METHOD0(R, N) \ + R (*N) (struct gcc_c_context *); +#define GCC_METHOD1(R, N, A) \ + R (*N) (struct gcc_c_context *, A); +#define GCC_METHOD2(R, N, A, B) \ + R (*N) (struct gcc_c_context *, A, B); +#define GCC_METHOD3(R, N, A, B, C) \ + R (*N) (struct gcc_c_context *, A, B, C); +#define GCC_METHOD4(R, N, A, B, C, D) \ + R (*N) (struct gcc_c_context *, A, B, C, D); +#define GCC_METHOD5(R, N, A, B, C, D, E) \ + R (*N) (struct gcc_c_context *, A, B, C, D, E); +#define GCC_METHOD7(R, N, A, B, C, D, E, F, G) \ + R (*N) (struct gcc_c_context *, A, B, C, D, E, F, G); + +#include "gcc-c-fe.def" + +#undef GCC_METHOD0 +#undef GCC_METHOD1 +#undef GCC_METHOD2 +#undef GCC_METHOD3 +#undef GCC_METHOD4 +#undef GCC_METHOD5 +#undef GCC_METHOD7 + +}; + +/* The C front end object. */ + +struct gcc_c_context +{ + /* Base class. */ + + struct gcc_base_context base; + + /* Our vtable. This is a separate field because this is simpler + than implementing a vtable inheritance scheme in C. */ + + const struct gcc_c_fe_vtable *c_ops; +}; + +/* The name of the .so that the compiler builds. We dlopen this + later. */ + +#define GCC_C_FE_LIBCC libcc1.so + +/* The compiler exports a single initialization function. This macro + holds its name as a symbol. */ + +#define GCC_C_FE_CONTEXT gcc_c_fe_context + +/* The type of the initialization function. The caller passes in the + desired base version and desired C-specific version. If the + request can be satisfied, a compatible gcc_context object will be + returned. Otherwise, the function returns NULL. */ + +typedef struct gcc_c_context *gcc_c_fe_context_function + (enum gcc_base_api_version, + enum gcc_c_api_version); + +#ifdef __cplusplus +} +#endif + +#endif /* GCC_C_INTERFACE_H */ diff --git a/include/gcc-interface.h b/include/gcc-interface.h new file mode 100644 index 00000000000..34010f24704 --- /dev/null +++ b/include/gcc-interface.h @@ -0,0 +1,127 @@ +/* Generic interface between GCC and GDB + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GCC. + + This program 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 3 of the License, or + (at your option) any later version. + + This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef GCC_INTERFACE_H +#define GCC_INTERFACE_H + +/* This header defines the interface to the GCC API. It must be both + valid C and valid C++, because it is included by both programs. */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Opaque typedefs for objects passed through the interface. */ + +typedef unsigned long long gcc_type; +typedef unsigned long long gcc_decl; + +/* An address in the inferior. */ + +typedef unsigned long long gcc_address; + +/* Forward declaration. */ + +struct gcc_base_context; + +/* Defined versions of the generic API. */ + +enum gcc_base_api_version +{ + GCC_FE_VERSION_0 = 0 +}; + +/* The operations defined by the GCC base API. This is the vtable for + the real context structure which is passed around. + + The "base" API is concerned with basics shared by all compiler + front ends: setting command-line arguments, the file names, etc. + + Front-end-specific interfaces inherit from this one. */ + +struct gcc_base_vtable +{ + /* The actual version implemented in this interface. This field can + be relied on not to move, so users can always check it if they + desire. The value is one of the gcc_base_api_version constants. + */ + + unsigned int version; + + /* Set the compiler's command-line options for the next compilation. + TRIPLET_REGEXP is a regular expression that is used to match the + configury triplet prefix to the compiler. + The arguments are copied by GCC. ARGV need not be + NULL-terminated. The arguments must be set separately for each + compilation; that is, after a compile is requested, the + previously-set arguments cannot be reused. + + This returns NULL on success. On failure, returns a malloc()d + error message. The caller is responsible for freeing it. */ + + char *(*set_arguments) (struct gcc_base_context *self, + const char *triplet_regexp, + int argc, char **argv); + + /* Set the file name of the program to compile. The string is + copied by the method implementation, but the caller must + guarantee that the file exists through the compilation. */ + + void (*set_source_file) (struct gcc_base_context *self, const char *file); + + /* Set a callback to use for printing error messages. DATUM is + passed through to the callback unchanged. */ + + void (*set_print_callback) (struct gcc_base_context *self, + void (*print_function) (void *datum, + const char *message), + void *datum); + + /* Perform the compilation. FILENAME is the name of the resulting + object file. VERBOSE can be set to cause GCC to print some + information as it works. Returns true on success, false on + error. */ + + int /* bool */ (*compile) (struct gcc_base_context *self, + const char *filename, + int /* bool */ verbose); + + /* Destroy this object. */ + + void (*destroy) (struct gcc_base_context *self); +}; + +/* The GCC object. */ + +struct gcc_base_context +{ + /* The virtual table. */ + + const struct gcc_base_vtable *ops; +}; + +/* The name of the dummy wrapper function generated by gdb. */ + +#define GCC_FE_WRAPPER_FUNCTION "_gdb_expr" + +#ifdef __cplusplus +} +#endif + +#endif /* GCC_INTERFACE_H */ diff --git a/include/gomp-constants.h b/include/gomp-constants.h new file mode 100644 index 00000000000..e3d2820d763 --- /dev/null +++ b/include/gomp-constants.h @@ -0,0 +1,116 @@ +/* Communication between GCC and libgomp. + + Copyright (C) 2014-2015 Free Software Foundation, Inc. + + Contributed by Mentor Embedded. + + This file is part of the GNU Offloading and Multi Processing Library + (libgomp). + + Libgomp 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 3, or (at your option) + any later version. + + Libgomp 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. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef GOMP_CONSTANTS_H +#define GOMP_CONSTANTS_H 1 + +/* Memory mapping types. */ + +/* One byte. */ +#define GOMP_MAP_LAST (1 << 8) + +#define GOMP_MAP_FLAG_TO (1 << 0) +#define GOMP_MAP_FLAG_FROM (1 << 1) +/* Special map kinds, enumerated starting here. */ +#define GOMP_MAP_FLAG_SPECIAL_0 (1 << 2) +#define GOMP_MAP_FLAG_SPECIAL_1 (1 << 3) +#define GOMP_MAP_FLAG_SPECIAL (GOMP_MAP_FLAG_SPECIAL_1 \ + | GOMP_MAP_FLAG_SPECIAL_0) +/* Flag to force a specific behavior (or else, trigger a run-time error). */ +#define GOMP_MAP_FLAG_FORCE (1 << 7) + +enum gomp_map_kind + { + /* If not already present, allocate. */ + GOMP_MAP_ALLOC = 0, + /* ..., and copy to device. */ + GOMP_MAP_TO = (GOMP_MAP_ALLOC | GOMP_MAP_FLAG_TO), + /* ..., and copy from device. */ + GOMP_MAP_FROM = (GOMP_MAP_ALLOC | GOMP_MAP_FLAG_FROM), + /* ..., and copy to and from device. */ + GOMP_MAP_TOFROM = (GOMP_MAP_TO | GOMP_MAP_FROM), + /* The following kind is an internal only map kind, used for pointer based + array sections. OMP_CLAUSE_SIZE for these is not the pointer size, + which is implicitly POINTER_SIZE_UNITS, but the bias. */ + GOMP_MAP_POINTER = (GOMP_MAP_FLAG_SPECIAL_0 | 0), + /* Also internal, behaves like GOMP_MAP_TO, but additionally any + GOMP_MAP_POINTER records consecutive after it which have addresses + falling into that range will not be ignored if GOMP_MAP_TO_PSET wasn't + mapped already. */ + GOMP_MAP_TO_PSET = (GOMP_MAP_FLAG_SPECIAL_0 | 1), + /* Must already be present. */ + GOMP_MAP_FORCE_PRESENT = (GOMP_MAP_FLAG_SPECIAL_0 | 2), + /* Deallocate a mapping, without copying from device. */ + GOMP_MAP_FORCE_DEALLOC = (GOMP_MAP_FLAG_SPECIAL_0 | 3), + /* Is a device pointer. OMP_CLAUSE_SIZE for these is unused; is implicitly + POINTER_SIZE_UNITS. */ + GOMP_MAP_FORCE_DEVICEPTR = (GOMP_MAP_FLAG_SPECIAL_1 | 0), + /* Allocate. */ + GOMP_MAP_FORCE_ALLOC = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_ALLOC), + /* ..., and copy to device. */ + GOMP_MAP_FORCE_TO = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TO), + /* ..., and copy from device. */ + GOMP_MAP_FORCE_FROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_FROM), + /* ..., and copy to and from device. */ + GOMP_MAP_FORCE_TOFROM = (GOMP_MAP_FLAG_FORCE | GOMP_MAP_TOFROM) + }; + +#define GOMP_MAP_COPY_TO_P(X) \ + (!((X) & GOMP_MAP_FLAG_SPECIAL) \ + && ((X) & GOMP_MAP_FLAG_TO)) + +#define GOMP_MAP_COPY_FROM_P(X) \ + (!((X) & GOMP_MAP_FLAG_SPECIAL) \ + && ((X) & GOMP_MAP_FLAG_FROM)) + +#define GOMP_MAP_POINTER_P(X) \ + ((X) == GOMP_MAP_POINTER) + + +/* Asynchronous behavior. Keep in sync with + libgomp/{openacc.h,openacc.f90,openacc_lib.h}:acc_async_t. */ + +#define GOMP_ASYNC_NOVAL -1 +#define GOMP_ASYNC_SYNC -2 + + +/* Device codes. Keep in sync with + libgomp/{openacc.h,openacc.f90,openacc_lib.h}:acc_device_t as well as + libgomp/libgomp_target.h. */ +#define GOMP_DEVICE_NONE 0 +#define GOMP_DEVICE_DEFAULT 1 +#define GOMP_DEVICE_HOST 2 +#define GOMP_DEVICE_HOST_NONSHM 3 +#define GOMP_DEVICE_NOT_HOST 4 +#define GOMP_DEVICE_NVIDIA_PTX 5 +#define GOMP_DEVICE_INTEL_MIC 6 + +#define GOMP_DEVICE_ICV -1 +#define GOMP_DEVICE_HOST_FALLBACK -2 + +#endif diff --git a/include/hashtab.h b/include/hashtab.h index 4bb65d6c7a2..188b8494db2 100644 --- a/include/hashtab.h +++ b/include/hashtab.h @@ -39,10 +39,6 @@ extern "C" { #include "ansidecl.h" -#ifndef GTY -#define GTY(X) -#endif - /* The type for a hash code. */ typedef unsigned int hashval_t; @@ -97,7 +93,7 @@ typedef void (*htab_free_with_arg) (void *, void *); functions mentioned below. The size of this structure is subject to change. */ -struct GTY(()) htab { +struct htab { /* Pointer to hash function. */ htab_hash hash_f; @@ -108,7 +104,7 @@ struct GTY(()) htab { htab_del del_f; /* Table itself. */ - void ** GTY ((use_param, length ("%h.size"))) entries; + void **entries; /* Current size (in entries) of the hash table. */ size_t size; @@ -132,7 +128,7 @@ struct GTY(()) htab { htab_free free_f; /* Alternate allocate/free functions, which take an extra argument. */ - void * GTY((skip)) alloc_arg; + void *alloc_arg; htab_alloc_with_arg alloc_with_arg_f; htab_free_with_arg free_with_arg_f; diff --git a/include/libiberty.h b/include/libiberty.h index 78c42eb88f1..b33dd65982d 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -1,7 +1,6 @@ /* Function declarations for libiberty. - Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, - 2006, 2007, 2008, 2009, 2010, 2011, 2013 Free Software Foundation, Inc. + Copyright (C) 1997-2015 Free Software Foundation, Inc. Note - certain prototypes declared in this header file are for functions whoes implementation copyright does not belong to the @@ -106,7 +105,10 @@ extern int countargv (char**); to find the declaration so provide a fully prototyped one. If it is 1, we found it so don't provide any declaration at all. */ #if !HAVE_DECL_BASENAME -#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME) +#if defined (__GNU_LIBRARY__ ) || defined (__linux__) \ + || defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) \ + || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) \ + || defined (__DragonFly__) || defined (HAVE_DECL_BASENAME) extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1); #else /* Do not allow basename to be used if there is no prototype seen. We @@ -224,6 +226,11 @@ extern char *make_relative_prefix (const char *, const char *, extern char *make_relative_prefix_ignore_links (const char *, const char *, const char *) ATTRIBUTE_MALLOC; +/* Returns a pointer to a directory path suitable for creating temporary + files in. */ + +extern const char *choose_tmpdir (void) ATTRIBUTE_RETURNS_NONNULL; + /* Choose a temporary directory to use for scratch files. */ extern char *choose_temp_base (void) ATTRIBUTE_MALLOC ATTRIBUTE_RETURNS_NONNULL; @@ -442,6 +449,11 @@ extern struct pex_obj *pex_init (int flags, const char *pname, on Unix. */ #define PEX_BINARY_ERROR 0x80 +/* Append stdout to existing file instead of truncating it. */ +#define PEX_STDOUT_APPEND 0x100 + +/* Thes same as PEX_STDOUT_APPEND, but for STDERR. */ +#define PEX_STDERR_APPEND 0x200 /* Execute one program. Returns NULL on success. On error returns an error string (typically just the name of a system call); the error @@ -616,6 +628,11 @@ extern int pwait (int, int *, int); extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; #endif +/* Like asprintf but allocates memory without fail. This works like + xmalloc. */ + +extern char *xasprintf (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF_1; + #if !HAVE_DECL_VASPRINTF /* Like vsprintf but provides a pointer to malloc'd storage, which must be freed by the caller. */ @@ -623,6 +640,11 @@ extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0); #endif +/* Like vasprintf but allocates memory without fail. This works like + xmalloc. */ + +extern char *xvasprintf (const char *, va_list) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF(1,0); + #if defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF /* Like sprintf but prints at most N characters. */ extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3; @@ -633,6 +655,37 @@ extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3; extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,0); #endif +#if defined (HAVE_DECL_STRNLEN) && !HAVE_DECL_STRNLEN +extern size_t strnlen (const char *, size_t); +#endif + +#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP +/* Compare version strings. */ +extern int strverscmp (const char *, const char *); +#endif + +#if defined(HAVE_DECL_STRTOL) && !HAVE_DECL_STRTOL +extern long int strtol (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_DECL_STRTOUL) && !HAVE_DECL_STRTOUL +extern unsigned long int strtoul (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOLL) && !HAVE_DECL_STRTOLL +__extension__ +extern long long int strtoll (const char *nptr, + char **endptr, int base); +#endif + +#if defined(HAVE_LONG_LONG) && defined(HAVE_DECL_STRTOULL) && !HAVE_DECL_STRTOULL +__extension__ +extern unsigned long long int strtoull (const char *nptr, + char **endptr, int base); +#endif + #if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP /* Compare version strings. */ extern int strverscmp (const char *, const char *); diff --git a/include/longlong.h b/include/longlong.h index 5f00e548a70..8cd2c79898c 100644 --- a/include/longlong.h +++ b/include/longlong.h @@ -1,5 +1,5 @@ /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. - Copyright (C) 1991-2013 Free Software Foundation, Inc. + Copyright (C) 1991-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -122,7 +122,26 @@ extern const UQItype __clz_tab[256] attribute_hidden; #define __AND_CLOBBER_CC , "cc" #endif /* __GNUC__ < 2 */ +#if defined (__aarch64__) + +#if W_TYPE_SIZE == 32 +#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clz (X)) +#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctz (X)) +#define COUNT_LEADING_ZEROS_0 32 +#endif /* W_TYPE_SIZE == 32 */ + +#if W_TYPE_SIZE == 64 +#define count_leading_zeros(COUNT, X) ((COUNT) = __builtin_clzll (X)) +#define count_trailing_zeros(COUNT, X) ((COUNT) = __builtin_ctzll (X)) +#define COUNT_LEADING_ZEROS_0 64 +#endif /* W_TYPE_SIZE == 64 */ + +#endif /* __aarch64__ */ + #if defined (__alpha) && W_TYPE_SIZE == 64 +/* There is a bug in g++ before version 5 that + errors on __builtin_alpha_umulh. */ +#if !defined(__cplusplus) || __GNUC__ >= 5 #define umul_ppmm(ph, pl, m0, m1) \ do { \ UDItype __m0 = (m0), __m1 = (m1); \ @@ -130,6 +149,7 @@ extern const UQItype __clz_tab[256] attribute_hidden; (pl) = __m0 * __m1; \ } while (0) #define UMUL_TIME 46 +#endif /* !c++ */ #ifndef LONGLONG_STANDALONE #define udiv_qrnnd(q, r, n1, n0, d) \ do { UDItype __r; \ @@ -467,7 +487,7 @@ extern UDItype __umulsidi3 (USItype, USItype); #define UDIV_TIME 40 #endif /* 80x86 */ -#if (defined (__x86_64__) || defined (__i386__)) && W_TYPE_SIZE == 64 +#if defined (__x86_64__) && W_TYPE_SIZE == 64 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ __asm__ ("add{q} {%5,%1|%1,%5}\n\tadc{q} {%3,%0|%0,%3}" \ : "=r" ((UDItype) (sh)), \ @@ -832,7 +852,7 @@ extern UDItype __umulsidi3 (USItype, USItype); #define UMUL_TIME 10 #define UDIV_TIME 100 -#if (__mips == 32 || __mips == 64) && ! __mips16 +#if (__mips == 32 || __mips == 64) && ! defined (__mips16) #define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) #define COUNT_LEADING_ZEROS_0 32 #endif @@ -1671,7 +1691,8 @@ extern UHItype __stormy16_count_leading_zeros (UHItype); #if !defined (udiv_qrnnd) && defined (sdiv_qrnnd) #define udiv_qrnnd(q, r, nh, nl, d) \ do { \ - USItype __r; \ + extern UWtype __udiv_w_sdiv (UWtype *, UWtype, UWtype, UWtype); \ + UWtype __r; \ (q) = __udiv_w_sdiv (&__r, nh, nl, d); \ (r) = __r; \ } while (0) diff --git a/include/splay-tree.h b/include/splay-tree.h index a26135a099d..ec48a1fa5b8 100644 --- a/include/splay-tree.h +++ b/include/splay-tree.h @@ -44,10 +44,6 @@ extern "C" { #include <inttypes.h> #endif -#ifndef GTY -#define GTY(X) -#endif - /* Use typedefs for the key and data types to facilitate changing these types, if necessary. These types should be sufficiently wide that any pointer or scalar can be cast to these types, and then @@ -86,22 +82,22 @@ typedef void *(*splay_tree_allocate_fn) (int, void *); typedef void (*splay_tree_deallocate_fn) (void *, void *); /* The nodes in the splay tree. */ -struct GTY(()) splay_tree_node_s { +struct splay_tree_node_s { /* The key. */ - splay_tree_key GTY ((use_param1)) key; + splay_tree_key key; /* The value. */ - splay_tree_value GTY ((use_param2)) value; + splay_tree_value value; /* The left and right children, respectively. */ - splay_tree_node GTY ((use_params)) left; - splay_tree_node GTY ((use_params)) right; + splay_tree_node left; + splay_tree_node right; }; /* The splay tree itself. */ -struct GTY(()) splay_tree_s { +struct splay_tree_s { /* The root of the tree. */ - splay_tree_node GTY ((use_params)) root; + splay_tree_node root; /* The comparision function. */ splay_tree_compare_fn comp; @@ -119,7 +115,7 @@ struct GTY(()) splay_tree_s { splay_tree_deallocate_fn deallocate; /* Parameter for allocate/free functions. */ - void * GTY((skip)) allocate_data; + void *allocate_data; }; typedef struct splay_tree_s *splay_tree; |