2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-03-28 23:31:19 +08:00

10771 Commits

Author SHA1 Message Date
Richard Kenner
3e4115b7e9 Try harder not to open or stat the same include file twice.
Simplify include file names so that they are more likely to match.
E.g. simplify "./a//b" to "a/b".  Represent directories with simplified
prefixes, e.g. replace "./a//b" with "a/b/", and "." with "".

(absolute_filename): New function.
(do_include): Use it.
(read_name_map): Likewise; this makes things more consistent for DOS.

(main, do_include, open_include_file): -M output now contains operands
of -imacros and -include.

(skip_to_end_of_comment): When copying a // comment, don't try to
change it to a /* comment.
(rescan, skip_if_group, skip_to_end_of_comment, macarg1): Tune.

(rescan, skip_if_group, skip_to_end_of_comment, macarg1):
If warn_comments is nonzero, warn if backslash-newline appears
in a // comment.  Simplify method for finding /* /* */ comment.
(skip_if_group): Optionally warn if /* /* */ appears between # and
a directive inside a skipped if group.
(macarg): Optionally warn if /* /* */ appears in a macro argument.

(strncat, VMS_strncat, vms_ino_t, ino_t): Remove.
(INCLUDE_LEN_FUDGE): Add 2 if VMS, for trailing ".h".
(INO_T_EQ, INO_T_HASH): New macros.

(struct file_buf): New member `inc'.
(expand_to_temp_buffer): Initialize it.

(struct file_name_list): New member `inc'.
(struct file_name_list): New member `st'.
c_system_include_path is now 1 if not 0.
fname is now an array, not a pointer.
(struct include_file): New members `next_ino', `deps_output', `st'.
Remove members `inode' and `dev'; they are now in `st'.

(INCLUDE_HASHSIZE): Rename from INCLUDE_HASH_SIZE.
(include_hashtab): Rename from include_hash_table.
(include_ino_hashtab): New variable.

(main): Store file status in struct stat, not in long and int pieces.
Use base_name to strip prefixes from file names.
When printing directory prefixes, omit trailing / and print "" as ".".
Fatal error if the input file is a directory.
(main, path_include): Regularize operands of -include, -imacros,
-isystem, -iwithprefix, and -iwithprefixbefore.
Regularize default include directories.

(do_include):
Allocate dsp with alloca, since fname is now dynamically allocated.
Use -3 to represent a never-opened file descriptor.
Make copy of file name, and simplify the copy.
Use base_name to identify the end of fname's directory.
Do not prepend dir for "..." if it matches the search list's first dir.
open_include_file now subsumes redundant_include_p and lookup_import.
Use bypass_slot to remember when to skip directories when including
a file that has already been seen.
Instead of using 0 to represent the working directory, and ""
to represent a directory to be ignored, use "" for the former,
and assume the latter has been removed before we get here.
Assume the directory prefixes have already been simplified.
Report as errors all open failures other than ENOENT.
Fatal error if fstat fails.
Use new deps_output member to avoid printing dependencies twice.
(bypass_hashtab): New variable.

(do_include, open_control_file, record_control_macro): New convention:
control_macro is "" if the file was imported or had #pragma once.
(pragma_once_marker): Remove.

(redundant_include_p, include_hash, lookup_include, lookup_import,
add_import, file_size_and_mode): Remove; subsumed by open_include_file.
(skip_redundant_dir_prefix): Remove; subsumed by simplify_filename.

(is_system_include, read_name_map, remap_include_file):
Assume arg is a directory prefix.

(base_name, simplify_filename, remap_include_file,
lookup_ino_include, new_include_prefix): New functions.

(open_include_file): New arguments `importing' and `pinc'.
Move filename mapping into new remap_include_file function.
First try to find file by name in include_hashtab;
if that doesn't work, open and fstat it and try to find it
by inode and dev in include_ino_hashtab.

(finclude): Get file status from inc->st instead of invoking fstat.
Store inc into fp->inc so that record_control_macro doesn't
need to do a table lookup.
(finclude, record_control_macro): Accept struct include_file *
instead of char * to identify include file.  All callers changed.

(check_precompiled): Get file status from new argument `st'.

(do_pragma): Output at most one warning about #pragma implementation.
Always return 0 instead of returning garbage sometimes.
(do_pragma, hack_vms_include_specification):
Use base_name for consistency, and remove redundant code.

From Per Bothner:
Unify the 3 separate mechanisms for avoiding processing
of redundant include files: #import, #pragma once, and
redundant_include_p to use a single more efficient data structure.
(struct file_name_list):  Remove no-longer needed field control_macro.
(dont_repeat_files, all_include_files):  Remove, no longer used.
(struct import_file):  Renmed to struct include_file, moved earlier
in file, renamed field name to fname, and added control_macro field.
(pragma_once_marker):  New constant.
(import_hash_table):  Renamed to include_hash_table.
(import_hash):  Renamed to include_hash.
(IMPORT_HASH_SIZE):  Renamed to INCLUDE_HASH_SIZE.
(main, path_include):  Don't clear removed control_macro field.
(lookup_include):  New function - look up fname in include_hash_table.
(redundant_include_p):  Re-write to use lookup_include.
(lookup_import, record_control_macro):  Likewise.
(add_import):  Defer fstat to caller.  Combine two xmallocs into one.
(do_once):  Use pragma_once_marker in include_hash_table.
(do_pragma):  Re-implement to scan include_hash_table.
(do_include):  Use new lookup_include and add_import.

From-SVN: r10784
1995-12-17 06:56:42 -05:00
Richard Kenner
393de53f61 (try_combine): When checking for two sets of the same register in a split insn...
(try_combine): When checking for two sets of the same register in a
split insn, also test for setting a ZERO_EXTRACT, STRICT_LOW_PART, or
SUBREG.

From-SVN: r10783
1995-12-17 06:45:16 -05:00
Richard Kenner
4bcdd4d0b2 (push_secondary_reload): Don't strip paradoxical SUBREG if
reload_class is CLASS_CANNOT_CHANGE_SIZE.

From-SVN: r10782
1995-12-17 06:36:47 -05:00
Richard Kenner
db3ec607e7 (expand_assignment): Fix alignment parm in emit_block_move.
From-SVN: r10781
1995-12-16 18:24:02 -05:00
Richard Kenner
058e0bb91b (optimize_reg_copy_2): Don't attempt optimization if destination
register dies.

From-SVN: r10780
1995-12-16 18:16:01 -05:00
Richard Kenner
0c9cabe7d4 (fold): Don't record overflow when negating unsigned constants.
From-SVN: r10779
1995-12-16 08:30:58 -05:00
Richard Kenner
e08e713766 (layout_record): When PCC_BITFIELD_TYPE_MATTERS, compute bitpos using
field_size % type_align instead of field_size.

From-SVN: r10778
1995-12-16 07:35:45 -05:00
Richard Kenner
ce805568cf (stdio.h): Fix return type of fread and fwrite on sysV68.
From-SVN: r10777
1995-12-16 07:03:25 -05:00
Richard Kenner
c46722a717 (fixup_var_refs_1): Fix two incorrect calls to single_set.
From-SVN: r10776
1995-12-16 06:57:01 -05:00
Stan Cox
9f541d35cf (AViiON): Add ix86-dg-dgux
From-SVN: r10744
1995-12-16 03:32:35 +00:00
Stan Cox
4befa6b603 Initial revision
From-SVN: r10743
1995-12-16 03:10:56 +00:00
Stan Cox
268bfa44d0 Use TARGET* macros.
From-SVN: r10742
1995-12-16 03:06:44 +00:00
Stan Cox
c8c5cb99de (override_options): Add -mcpu and -misa support
From-SVN: r10741
1995-12-16 03:06:03 +00:00
Stan Cox
241e1a89ac (TARGET_CPU_DEFAULT, PROCESSOR_*, TARGET_*,DOUBLE_WITH_ADD,BIT_TEST}): New macros.
From-SVN: r10740
1995-12-16 03:04:10 +00:00
Richard Kenner
f8e7d8e7c7 (sys/wait.h): Add forward declaration of struct rusage on AIX 3.2.5.
From-SVN: r10739
1995-12-15 18:41:43 -05:00
Richard Kenner
c9e39f3d12 (DO_GLOBAL_DTORS_BODY): Delete; obsolete.
From-SVN: r10738
1995-12-15 18:36:38 -05:00
Richard Kenner
4e911f0bbf main): Don't ignore an option merely because a language-specific option is a prefix of the option.
main): Don't ignore an option merely because a language-specific
option is a prefix of the option.  This catches typos like
`-fno-builtins'.

From-SVN: r10737
1995-12-15 18:30:39 -05:00
Stan Cox
40ae19b698 (i*86*) Change [345] to [3456]
From-SVN: r10736
1995-12-15 15:43:33 +00:00
Stan Cox
d4773242d7 (out_object_file): Add MAYBE_TARGET_DEFAULT.
From-SVN: r10735
1995-12-15 15:42:03 +00:00
Richard Kenner
adcd38c958 (rest_of_compilation): Call init_temp_slots.
From-SVN: r10734
1995-12-15 08:09:51 -05:00
Richard Kenner
bc0ebdf9ee (init_temp_slots): New function.
(init_function_start): Code moved to new function and called here.

From-SVN: r10733
1995-12-15 08:09:24 -05:00
Richard Kenner
1d269b0cdc (store_bit_field): Don't use insv for BLKmode value.
(store_split_bit_field): Set total_bits to BITS_PER_FOR for BLKmode value.

From-SVN: r10732
1995-12-15 08:05:34 -05:00
Richard Kenner
2afc5ce118 (DBX_STATIC_BLOCK_END): Use macro arguments.
(xcoff_begin_function_line, xcoff_current_function_file): Remove
unused extern declarations.
(DBX_OUTPUT_MAIN_SOURCE_FILENAME): Use macro argument.

From-SVN: r10731
1995-12-15 06:35:24 -05:00
Richard Kenner
d12de8cea3 (xcoff_begin_function_line): Make static.
(xcoff_inlining): Likewise.
(xcoff_current_function_file): Likewise.
(xcoff_output_standard_types): Remove TARGET_64BIT dependencies from
int and unsigned int.

From-SVN: r10730
1995-12-15 06:34:57 -05:00
Per Bothner
944420629e fix-header.c: Support different kinds of functions (ANSI and Posix1).
* fix-header.c:  Support different kinds of functions (ANSI and
Posix1).  Enable ANSI proptotypes if __STRICT_ANSI__.

From-SVN: r10729
1995-12-14 23:43:33 -08:00
Michael Meissner
8106dc0832 Fixes from Torbjorn/Dje
From-SVN: r10728
1995-12-15 00:23:39 +00:00
Torbjorn Granlund
34f016ed1f (expand_divmod...
(expand_divmod, case TRUNC_DIV_EXPR): Only reject
larger-than-HOST_BITS_PER_WIDE_INT modes for general constants,
not for powers-of-2.

From-SVN: r10727
1995-12-14 23:39:17 +00:00
Torbjorn Granlund
f20200f4bc (logic_operand): New function.
(i960_print_operand): Handle code `C'.

From-SVN: r10726
1995-12-14 23:16:23 +00:00
Torbjorn Granlund
82eaec4ab0 (PREDICATE_CODES): Add logic_operand.
(CONST_OK_FOR_LETTER_P): Handle `M'.
(SHIFT_COUNT_TRUNCATED): Define as 0 as appropriate.

From-SVN: r10725
1995-12-14 23:15:26 +00:00
Torbjorn Granlund
5d17176fdc (andsi3): Match op2 with logic_operand, change constraint accordingly.
(andsi3): Match op2 with logic_operand, change constraint
accordingly.  Output andnot for negative op2.
(iorsi3, xorsi3): Analogous changes.
Move all plain logical patterns together.

From-SVN: r10724
1995-12-14 23:14:22 +00:00
Richard Kenner
fb3ba99d63 (objc_alignof_type): Handle _C_PTR case.
From-SVN: r10723
1995-12-14 18:13:16 -05:00
Torbjorn Granlund
eeae1c7362 (untyped_call): New pattern.
From-SVN: r10722
1995-12-14 23:09:47 +00:00
Torbjorn Granlund
3f6ddf5456 (ashrsi_31): New pattern.
From-SVN: r10721
1995-12-14 23:08:23 +00:00
Richard Earnshaw
226a50517f arm/arm.c (output_move_double): Extract DFmode constants using
REAL_VALUE_TO_TARGET_DOUBLE.

From-SVN: r10720
1995-12-14 22:21:54 +00:00
Doug Evans
f92213c8c6 (CROSS_FLOAT_H): Delete.
From-SVN: r10719
1995-12-14 20:23:58 +00:00
Doug Evans
67446ffe25 * Makefile.in (distclean): Delete float.h
From-SVN: r10718
1995-12-14 20:12:12 +00:00
Doug Evans
32ebaaf09d Initial revision
From-SVN: r10717
1995-12-14 20:10:48 +00:00
Michael Meissner
fe6d5f6576 Fix typo
From-SVN: r10716
1995-12-14 01:31:57 +00:00
Mike Stump
3539e81693 * expr.c (expand_expr, case ADDR_EXPR): Ensure op0 isn't QUEUED.
From-SVN: r10715
1995-12-14 00:20:39 +00:00
Richard Kenner
c6b51be9d2 (my_strerror): Return "cannot access" if errno is 0.
(perror_with_name, pfatal_with_name, perror_exec): Don't assume that
the returned value from my_strerror contains no '%'s.
(sys_nerr): Declare only if HAVE_STRERROR is not defined.

From-SVN: r10714
1995-12-13 19:12:10 -05:00
Richard Kenner
493810116d (c-parse.y, objc-parse.y): Add warning that file is automatically generated.
From-SVN: r10713
1995-12-13 19:05:37 -05:00
Mike Stump
b2a59b1589 function.c (identify_blocks): Start with a chain of BLOCKs to match the rest of the backend (dbxout.c)...
* function.c (identify_blocks): Start with a chain of BLOCKs to
	match the rest of the backend (dbxout.c), instead of just one
	BLOCK.
	(reorder_blocks): Ditto.
	(all_blocks): Ditto.

	* stmt.c (find_loop_tree_blocks): Pass the toplevel list of
	blocks, not just the first subblock.
Fixes unroll1.C.

From-SVN: r10712
1995-12-14 00:00:20 +00:00
Ian Lance Taylor
869b061cfa Accept *-*-ieee*.
From-SVN: r10709
1995-12-13 21:43:08 +00:00
Richard Kenner
a45cf58ce9 (expand_divmod): Don't use TARGET if it's the wrong mode.
From-SVN: r10708
1995-12-13 16:11:05 -05:00
Ian Lance Taylor
8092a8e841 Define DBX_USE_BINCL.
From-SVN: r10707
1995-12-13 20:02:30 +00:00
Ian Lance Taylor
4bcaafd97b Output N_BINCL and N_EINCL stabs if DBX_USE_BINCL is defined.
From-SVN: r10706
1995-12-13 20:01:49 +00:00
Ian Lance Taylor
1a6281cb9c Call new dbxout functions when changing source files.
From-SVN: r10705
1995-12-13 20:00:25 +00:00
Michael Meissner
19d2d16f76 Use simpler functions instead of printf. INT_TYPE_SIZE is always 32. For NT, do not emit .extern for builtin functions
From-SVN: r10704
1995-12-13 12:03:00 +00:00
Doug Evans
8282721e69 (MULTILIB_{OPTIONS,DIRNAMES}): Add -mint32 support.
From-SVN: r10703
1995-12-12 18:57:58 +00:00
Per Bothner
c7b11bf8ee (powerpc-harris-powerunix): Add guess for port to new target.
From-SVN: r10700
1995-12-11 16:47:21 -08:00