blob: 346311a4267fadf2d7fe44d82a2b2072ea9bfdbd [file] [log] [blame]
Fri Jul 19 18:56:14 1991 Richard Kenner (kenner at
* cse.c (canon_reg): Allow for recursive call returning 0 (if we had
* sched.c (init_aliases_analysis): Ignore REG_EQUAL note when its value
is an EXPR_LIST.
* unroll.c (loop_iterations): Likewise.
* (andsi3): Fix typo in and-with-cc pattern.
Fri Jul 19 11:23:22 1991 Tom Wood (wood at
* toplev.c (set_target_switch): For TARGET_OPTIONS, set the
variable to the variable part of the actual option.
* tm-m88k.h, out-m88k.c: Change the use of m88k_short_data.
* varasm.c (output_constant_def): Merge get_or_assign_label and
delete it. Ensure that ENCODE_SEGMENT_INFO is evaluated before
Thu Jul 18 19:57:45 1991 Richard Stallman (rms at
* expr.h (MUST_PASS_IN_STACK_BAD_PADDING): Definitions were backwards.
Thu Jul 18 17:52:46 1991 Jim Wilson (wilson at
* unroll.c: Fix typos in comments.
(splittable_regs_updates): New static global variable.
Indicates the number of instructions that modify a split biv
remaining during the last iteration of a loop, so that the last one
can be handled specially.
(unroll_loop): Allocate and clear it.
(copy_loop_body): Use it to determine how to rewrite an insn
modifying a split iv.
(find_splittable_regs): When a splittable biv is identified, set it
equal to the number of insn modifying the biv.
(find_splittable_givs): When a splittable giv is identified, set
it to one if this giv is a reg.
* unroll.c (copy_loop_body): Instead of trying to special case
insns that use start_label, use the label_map to map the start
label to the appropriate label for all insns except those that
must be inverted and redirected. The former code did not handle
tablejumps that used the start_label correctly.
* integrate.c (copy_rtx_and_substitute): Don't legitimize an
address inside of an ADDRESS rtx. This fails, because this need
not be a validate address, but it is always valid in the context
it appears in.
Thu Jul 18 08:13:56 1991 Tom Wood (wood at
* toplev.c (set_target_switch): Support TARGET_OPTIONS for command
options with values.
* varasm.c (output_constant_def): Set flags with
ENCODE_SEGMENT_INFO for strings and constructors.
* tm-mips.h (ENCODE_SEGMENT_INFO): Must be a VAR_DECL.
* out-m88k.c, tm-m88k.h, Implement a global pool approach
to short addressing.
* (extendsfdf2, truncdfsf2): Use fsub rather than fadd.
This conforms to IEEE 754 in all rounding modes except round to
negative infinity whereas fadd conforms only in that mode.
Thu Jul 18 01:01:37 1991 Eric Youngdale (youngdale at
* Add command line to compile reg-stack.c, and add
reg-stack.obj to the list of files passed to the VMS linker.
Thu Jul 18 00:11:00 1991 Richard Stallman (rms at
* (enquire.o): Need not depend on gnulib.
(gnulib2): Renamed from gnulib2.portable.
Don't do ranlib.
(gnulib2.portable): Just refers to gnulib2.
(gnulib1.portable): Don't do ranlib.
Wed Jul 17 11:19:09 1991 Michael Meissner (meissner at
* (gcc): Do a -dumpspecs after building gcc so that -B./
will override any installed specs in /usr/local/lib.
(mostlyclean): Delete *.cpp files which are left if you use
Wed Jul 17 06:08:33 1991 Richard Kenner (kenner at
* combine.c (try_combine): When putting I2 and/or I1 into NEWPAT,
check for a PARALLEL; if so, just put in the relevant SET instead
of making a PARALLEL containing a PARALLEL.
Tue Jul 16 18:58:51 1991 Richard Kenner (kenner at
* combine.c (record_value_for_reg): Show we haven't seen the death
of a register once we have seen it modified.
* reload1.c (reload): If we decide to put a pseudo which used to have
a MEM equiv onto the stack, set SOMETHING_CHANGED and reprocess all
eliminations and pseudos without scanning the insns.
Tue Jul 16 13:17:14 1991 Michael Meissner (meissner at
* cplus-decl.c (sigsegv): Make signal handler void for full
prototyping systems.
Tue Jul 16 12:25:18 1991 Richard Stallman (rms at
* dbxout.c (dbxout_symbol): Ignore types with no names of any kind.
Tue Jul 16 07:12:52 1991 Richard Kenner (kenner at
* stmt.c (pushcase, pushcase_range): Return label in *DUPLICATE,
not integer value.
* rtlanal.c (reg_referenced_p, reg_overlap_mentioned_p): Allow X to
be (cc0) or (pc).
* combine.c (subst, case SET): Delete code to remove "unnecessary"
SUBREG; code was incorrect and this is done (corrected below) in
(simplify_comparison): Can only remove SUBREG for equality comparisons.
* expr.c (expand_expr, case COND_EXPR): If condition has side effects,
ensure we evaluate it before evaluating an arm of the COND_EXPR.
Mon Jul 15 21:59:36 1991 James Van Artsdalen (james at
* rtl.h (FUNCTION_FLAGS_RETURNS_STRUCT): Fix typo in value.
Mon Jul 15 22:18:40 1991 Richard Stallman (rms at
* cccp.c (main): Ignore CPATH if -nostdinc.
Mon Jul 15 22:00:02 1991 Michael Meissner (meissner at
* reload.c (find_reloads): Fix typo (reg_sets_p instead of
Mon Jul 15 21:49:09 1991 Richard Stallman (rms at
* c-parse.y (stmt): Emit the nop for the start of a loop
only after the line number.
Mon Jul 15 16:50:51 1991 Richard Kenner (kenner at vlsi1.ultra.nyu.edn)
* rtlanal.c (reg_set_p): If we are passed an insn, only pass the
pattern to note_stores.
* local-alloc.c (validate_equiv_mem): A CALL_INSN invalidates all
Sun Jul 14 06:34:47 1991 Richard Kenner (kenner at
* cse.c (last_jump_equiv_class): New variable.
(record_jump_equiv): Set it.
(cse_insn): Clear it.
(cse_around_loop): Invalidate all entries in last_jump_equiv_class.
(cse_set_around_loop): Ensure our replacement is cheaper.
Sat Jul 13 17:15:30 1991 James Van Artsdalen (james at
* cplus-decl.c (finish_enum): Fix typo in arguments for finish_decl.
* cplus-class.c (finish_struct): Likewise.
Fri Jul 12 16:45:02 1991 Richard Stallman (rms at
* dbxout.c (dbxout_symbol): Don't crash when DECL_NAME is 0.
Fri Jul 12 15:38:24 1991 Richard Kenner (kenner at
* expr.c (do_tablejump): Don't write BARRIER between jump and table
if they must remain adjacent.
* varasm.c (make_decl_rtl): Set REG_USERVAR_P when register name
is specified.
* integrate.c (subst_constants): Don't substitute for a user
variable assigned to a hard register.
* reload.c (find_reloads): Add new vars no_{input,output}_reloads to
indicate when the corresponding reload type is not permitted; reject
an alternative that would try such a reload.
* (decrement-and-branch): No longer need kludges to
avoid output reloads.
Use '0' instead of 'c' for input 1 in alternative 0.
Allow operand 0 to be in non-general register.
Fri Jul 12 10:54:39 1991 James Van Artsdalen (james at
* c-decl.c (finish_struct, finish_enum): Fix typo in arguments for
* (bit test patterns): Delete bit tests using implicitly
masked bit number operand: the hardware doesn't work like that.
Fri Jul 12 09:50:43 1991 Michael Meissner (meissner at
* tm-hp9k2bsd.h (toplevel): Remove RCS HISTORY log.
Thu Jul 11 00:46:48 1991 Richard Stallman (rms at
* c-parse.y (yylex): Do try signed int for ANSI nondecimal constants.
* c-typeck.c (record_format_info): The first time, use xmalloc.
Wed Jul 10 18:54:26 1991 Richard Kenner (kenner at
* jump.c (jump_optimize): Fix typo in "if (...) x = a; else x = b;"
case: had temp3 instead of temp4.
* cplus-lex.c (lineno, end_of_file): Move definition to before
first use.
(reinit_parse_for_block): Variable `c' must be int to ensure EOF fits.
* cplus-input.c (getch): Remove extraneous declaration of end_of_file.
* reload1.c: Include insn-flags.h.
(emit_reload_insns): Handle the case where we reload an entire
address; use "reload_load_address" pattern, if it exists.
Remove explicit SImode reference; should have been Pmode, but
IN can be used instead of rebuilding it.
* (reload1.o): Includes insn-flags.h.
* reload.c (find_reloads): If replacing an output REG with a MEM,
write a CLOBBER for the REG after the insn.
* reload1.c (eliminate_regs): Add new arg INSN; if nonzero, add a
CLOBBER when replacing a REG in SET_DEST with a MEM.
(reload, eliminate_regs_in_insn): Add new arg to eliminate_regs.
* dwarfout.c (output_bound_representation, location_attribute):
* reload1.c (reload): If a reg_equiv_memory_loc isn't strictly valid
and isn't sufficiently simple, use a stack slot instead.
(alter_regs): Don't delete reg_equiv_init insns here.
(reload_as_needed): Do it here.
* stor-layout.c (get_best_mode): Correct test for alignment.
* loop.c (move_movables): Don't get confused by NOTE insns in gnulib
call sequence.
Wed Jul 10 18:40:32 1991 Matthew Self (mself at
* cccp.c (enum node_type): Added T_WARNING.
* cccp.c (directive_table): Added #warning.
* cccp.c (do_warning): Print warning message and continue.
Wed Jul 10 18:38:28 1991 Matthew Self (mself at
* c-parse.y, objc-parse.y (attrib): Pass "format" attribute
through. Takes one identifier and two constants as args.
identifier must be either printf or scanf.
* c-common.c (decl_attributes): Process "format" attributes.
Call new routine record_format_info().
* c-typeck.c (struct function_info): Changed function_ident field;
store identifier node rather than char * to speed lookup.
Renamed arg_num field to format_num. Replaced is_varargs field
with new first_arg_num field.
* c-typeck.c (check_format): Modified to use new arg_num and
first_arg_num fields.
* c-typeck.c (record_format_info): New routine. Replaces static
table of functions to check.
* cplus-typeck.c (record_format_info): New stub routine so c++
will link. Someone should implement format checking for c++.
* c-typeck.c (init_format_info_table): New routine to add
entries for ANSI functions to table.
* c-decl.c (init_decl_processing): Call init_format_info_table().
* c-typeck.c (build_function_call): Modified to use dynamic table
rather than static one. Compare identifier nodes rather than
using strcmp().
* gcc.texinfo (): Document "format" attribute.
* c-typeck.c (check_format): Call warning() directly rather than
returning the warning string. This way we can give multiple warnings
by continuing. Several changes to make continuing safe.
* c-typeck.c (build_function_call): Incorporated changed return
value of check_format().
* c-typeck.c (check_format): Check for NULL format string.
Wed Jul 10 16:40:54 1991 Tom Wood (wood at
* sdbout.c (sdbout_tags): Delete this and use the TYPE_DECL
representation of tagged types. Types are now output in their
original lexical order.
(sdbout_symbol): Return early (only using sdbout_one_type) when a
tagged type is encountered.
(sdbout_block, sdbout_symbol): Don't use sdbout_tags.
* toplev.c (compile_file): Don't use sdbout_tags.
* varasm.c (assemble_function): Don't use sdbout_tags.
Wed Jul 10 15:13:33 1991 Richard Stallman (rms at
* dbxout.c (dbxout_tags): Function deleted. Calls deleted too.
(dbxout_tagged_type): New function.
(dbxout_symbol): Call that.
* toplev.c (compile_file): Call to dbxout_tags deleted.
* c-parse.y (yylex): Simplify choice of type for integers.
When traditional, all integers are signed unless explicitly unsigned.
Wed Jul 10 13:35:27 1991 Tom Wood (wood at
* configure (m88k-svr4): Needs make-m88ksvr4.
* make-m88ksvr4: New file.
Wed Jul 10 13:18:03 1991 Richard Stallman (rms at
* c-decl.c (duplicate_decls): Warn if `inline' is not consistent.
* cccp.c (hack_vms_include_specification): Fix typos.
Tue Jul 9 22:21:22 1991 Richard Kenner (kenner at
* loop.c (find_and_verify_loops): RETURN insns aren't listed in
loop_number_exit_labels, so don't try to remove JUMP_LABEL of a
RETURN from that list.
* rtlanal.c (reg_referenced_between_p): New function.
* jump.c (jump_optimize): Use it instead of reg_used_between_p when
checking for "if (...) x = a; else x = b;" case.
Tue Jul 9 13:03:53 1991 Richard Stallman (rms at
* expr.c (move_block_to_reg): Don't force_const_mem on non-constant.
Tue Jul 9 09:13:32 1991 Tom Wood (wood at
* c-decl.c (finish_struct): Record tagged types as a TYPE_DECL
(finish_enum): Ditto.
* cplus-decl.c (finish_enum): Ditto.
* cplus-class.c (finish_struct): Ditto.
* dbxout.c (dbxout_symbol): Ignore TYPE_DECLs for tagged types.
* cplus-dbxout.c (dbxout_symbol): Ditto.
* sdbout.c (sdbout_symbol): Ditto.
* toplev.c (compile_file): DECL_NAME may be null.
* dwarfout.c (output_symbol): Use output_dies_for_tagged_type for
TYPE_DECLs of tagged types.
(dwarfout_output_tagged_type): Deleted.
(output_dies_for_tagged_type): Mark TREE_ASM_WRITTEN early.
Mon Jul 8 19:36:44 1991 Tom Wood (wood at
* jump.c (jump_optimize): Check for extra labels when detecting
"if (...) x = a; else x = b;". Include the insn for "x = a;" when
testing for data conflict.
Mon Jul 8 19:34:14 1991 Richard Kenner (kenner at
* integrate.c (copy_for_inline, case MEM): Must copy a MEM even if
it has a constant address if that address involves a LABEL_REF.
* rtlanal.c (reg_set_p): Only check for REG_INC notes and a CALL_INSN
if we are passed an insn.
* local-alloc.c (optimize_reg_copy): Remove tests now done in
Mon Jul 8 16:38:49 1991 Richard Stallman (rms at
* c-parse.y (yylex): Pedantic warning here for `asm'.
No warning for `__asm__'.
(maybe_type_qual, maybeasm, extdef): No warning here.
* objc-actions.c: Rename OBJC_SELS_R_INTS to OBJC_INT_SELECTORS.
Mon Jul 8 06:37:00 1991 Richard Kenner (kenner at
* rtlanal.c (reg_{used,set}_between_p): Allow FROM_INSN == TO_INSN;
return 0 in that case.
* jump.c (mark_jump_label): Fix typo in use of GET_RTX_LENGTH.
* reload.c (reload_strict_low): Change comment to say that this is
always zero; we don't use it any more.
Sun Jul 7 22:14:13 1991 Michael Meissner (
* tm-mips.h (FRAME_POINTER_REQUIRED): Fix typo that required a frame
if alloca was not called, instead of the reverse.
Sun Jul 7 17:14:17 1991 Richard Stallman (rms at
* cccp.c (struct file_buf): New field system_header_p.
Everything that pushes on instack now initializes this field.
(finclude): New arg to set that field. Callers changed.
(do_include): Pass that arg as 1 for <...>, else 0.
* cccp.c (do_include): Warn for first use of #import
except in system header files.
(handle_directive): Support #import if compiling for Next.
* cccp.c (do_pragma): For #pragma once, warn it is obsolete.
Sun Jul 7 14:29:04 1991 James Van Artsdalen (james at
* tm-att386.h (NO_DOLLAR_IN_LABEL): Define this here,
* tm-i386sco.h (NO_DOLLAR_IN_LABEL): not here.
Sun Jul 7 06:20:03 1991 Richard Kenner (kenner at
* rtlanal.c (reg_set_p): Return 1 if REG is found in a REG_INC
note or if INSN is a CALL_INSN and REG is a hard reg.
(reg_set_last): Only return a register or constant; if returning a
register, ensure it isn't modified between the SET we found and INSN.
* jump.c (jump_optimize): If SMALL_REGISTER_CLASSES, don't make a
store-flag insn if any register involved is a hard reg.
Sat Jul 6 14:51:15 1991 Richard Stallman (rms at
* expr.c (expand_assignment): Don't abort for volatile structure field
even if the structure is in a register.
NOTE: This leaves the problem of implementing whatever meaning
a volatile field should actually have.
* fold-const.c (div_and_round_double): Make lnum and lden unsigned.
Use the small-denominator algorithm only for denom < 2**24.
Fix backward conditionals in ?: operators in general case.
Change i + j to i - 1 + j when indexing num.
Fri Jul 5 21:36:57 1991 Ken Raeburn (raeburn at
* genpeep.c (match_rtx, case MATCH_OP_DUP): Output semicolon after
"goto" statement.
Fri Jul 5 09:45:56 1991 Richard Kenner (kenner at
* (andsi3): Bias alternatives so we always prefer constants.
(define_splits of DImode, SFmode, and DFmode): Don't split
unless after reload.
(ashldi3, lshrdi3): Fix bugs in instruction order; use & in
output constraint so can't conflict with operand 2; use '0'
constraint to allow operands 0 and 1 to be the same register.
* regclass.c (reg_n_sets): Move definition before use.
* reorg.c (fill_simple_delay_slots): Candidate for delay slot cannot
set anything set between it and the delay insn.
* jump.c (jump_optimize): In "if (...) x = a; else x = b;", correctly
specify range to check if X is used or set.
Use rtx_equal_p to check for matching X.
Thu Jul 4 15:55:45 1991 Tom Wood (wood at
* cccp.c (default_include): Add /usr/mach/include for MACH systems.
* configure (m88k-luna): Needs make-m88kluna.
* make-m88kluna: New file.
* dwarf.h: New file derived from the UNIX International
Programming Languages Special Interest Group DWARF specification.
* dwarfout.c (includes): Include "dwarf.h".
(subscript_data_attribute): Use FMT_CODE to encode array subscripts.
(languagribute): LANG type no longer provided by dwarf.h.
(output_source_file_die): Determine proper language attribute.
Thu Jul 4 12:14:16 1991 James Van Artsdalen (james at
* cplus-xref.c: define rindex if USG
Thu Jul 4 12:36:55 1991 Richard Stallman (rms at
* gcc.c (process_command): Correctly split -L from its arg.
* SWITCHES_NEED_SPACES: New host machine option.
This really ought to be defined now for certain hosts,
but I don't know which ones they are.
Wed Jul 3 23:31:00 1991 Richard Stallman (rms at
* tm-m68k.h (ASM_OUTPUT_FLOAT): Check CROSS_COMPILE (there was a typo).
Wed Jul 3 22:05:55 1991 Richard Kenner (kenner at
* cse.c (simplify_binary_operation, case MINUS): Fix typo in op number.
* cse.c (cse_basic_block): Correctly handle the case where TO
was a label with zero uses at the end of the function.
* combine.c (significant_valid): New variable.
(combine_instructions): Turn significant_valid off until after
we finished computing reg_significant.
(significant_bits): Ignore reg_significant when significant_valid
is zero.
* rtlanal.c (reg_set_last): Go past CALL_INSN as long as we are not
looking for a hard register.
Wed Jul 3 21:07:18 1991 Jim Wilson (wilson at
* sched.c (schedule_block): When computing what registers are dead
at the end of the current block, correctly handle REG_DEAD notes
that refer to multi-word hard registers.
* loop.c (mark_loop_jump): When invalidating loops with multiple
entries, must invalidate every nested loop containing the target
of a loop entry jump, except for those that also contain the jump
* loop.c (record_giv): When computing whether a giv is
replaceable, check whether the biv update has a valid luid, and
mark it as not replaceable if not.
* combine.c (gen_rtx_combine): Call rtx_alloc instead of gen_rtx,
because it is much faster, especially on some RISC machines.
* fixincludes: Add optional argument which indicates where to put
the fixed include files. Echo the directory name where the
include files will be put.
* cccp.c (struct default_include): Don't examine
STANDARD_INCLUDE_DIR or /usr/local/include when
NO_STANDARD_INCLUDE_DIR is defined. This is useful when building
cross compilers.
(main): Only send SIGPIPE signal if the SIGPIPE signal exists on
the host.
(rescan, handle_directive, skip_if_group, validate_else,
skip_to_end_of_comment, macarg1, discard_comments): Accept '//' as
a comment in Objective-C as well as C++. The Objective C language
specifies that '//' starts a comment.
* .gdbinit (ptn): Define new macro to print out the name of a type
* stab.def: Correct errors in table for values of DSLINE and
BSLINE. Document the conflict between BROWS and BSLINE. Document
the value of the BROWS field.
Tue Jul 2 23:26:20 1991 Michael Meissner (meissner at
* mips-tfile.c (toplevel): Add a comment explaining the MIPS ECOFF
file format at the start of the file.
Tue Jul 2 14:00:39 1991 Richard Stallman (rms at
* c-typeck.c (build_array_ref): Report error here if the "array"
is not an array or pointer. Don't leave this for the PLUS_EXPR.
* cccp.c: Inlcude containing file names/lines in error messages.
(print_containing_files): New function.
(error*, warning): Call it.
(finclude): Increment input_file_stack_tick when file changes.
* cccp.c: Include descrip.h.
Tue Jul 2 07:44:19 1991 Tom Wood (wood at
* tm-m88k.h (ASM_OUTPUT_SOURCE_LINE): Define only for SDB.
* tm-m88kdgux.h (AS_BUG_*): Support these for now.
* c-decl.c (finish_struct): Invoke dwarfout_output_tagged_type
only when producing DWARF debugging info.
* cplus-class.c (finish_struct): Ditto.
Mon Jul 1 23:03:34 1991 Richard Stallman (rms at
* toplev.c (compile_file): Close stack_reg_dump_file iff STACK_REGS.
Mon Jul 1 15:17:57 1991 Richard Kenner (kenner at
* combine.c (set_significant): Ignore CLOBBERs.
(simplify_and_const_int, case SUBREG): Only ignore paradoxical SUBREGs
(record_value_for_reg): Fix typo; had I for REGNO.
Mon Jul 1 08:28:09 1991 Tom Wood (wood at
* final.c (output_source_line): Output DWARF line numbers.
* dwarfout.c (dwarfout_output_tagged_type): New function.
* c-decl.c (finish_struct): Call it.
* cplus-class.c (finish_struct): Call it.
* dwarfout.c (includes): Need insn-config.h and reload.h.
(location_attribute): Use eliminate_regs for correct expression.
(output_bound_representation): Use SAVE_EXPR_RTL to get rtl and
then use eliminate_regs.
* reload1.c (reload): When finished, indicate reg_equiv_constant
and reg_equiv_memory_loc are no longer valid.
(eliminate_regs): Don't attempt use of reg_equiv_constant or
reg_equiv_memory_loc if they aren't valid. No longer static.
* reload.h: Declare eliminate_regs.
* toplev.c (compile_file): Only call dwarfout_file_scope_symbol
for VAR_DECLs.
Sun Jun 30 15:49:39 1991 Ken Raeburn (raeburn at
* expr.c (expand_builtin, case BUILT_IN_MEMCPY): If alignment test
fails, and function was really BUILT_IN_STRCPY, zero out length
parameter before expanding call.
Sun Jun 30 18:27:14 1991 Richard Kenner (kenner at vlsi1.ultra.nyu)
* jump.c (jump_optimize): In "if (...) x = a; else x = b;", don't
move the "x = b;" if the test modifies X or if X is a hard register
Turn "if (...) x = 1; else {...} if (x) ..." code on when we have cc0.
Sun Jun 30 13:49:03 1991 Richard Stallman (rms at
* gnulib2.c (__builtin_saveregs):
For i860, make data structure fit in with va-i860.h.
* tree.c (gcc_obstack_init):
* calls.c (prepare_call_address): 3rd arg now address of chain var.
(expand_call): Call changed.
* expr.c (emit_library_call): Call changed.
* function.c (fix_lexical_addr): In recursive call, pass slot address.
* (cse.o): Added deps.
* (GNULIB2_CFLAGS): Use -O2.
* gnulib1.c, gnulib2.c (abort): Undefine only if defined.
* genattr.c (main): Fix typo in comment end.
Sat Jun 29 21:57:28 1991 Torbjorn Granlund (tege at
* longlong.h (__sparc8__ umul_ppmm): Insert 3 nop:s for wr delay.
* longlong.h (___IBMR2__): Define umul_ppmm, add_ssaaaa, sub_ddmmss..
* longlong.h (__sparc__): Don't call .umul; expand asm instead.
Don't define __umulsidi3 (i.e. use default definition).
Sat Jun 29 06:25:19 1991 Richard Stallman (rms at
* tm-vax.h (CPP_SPEC): New macro.
(LIB_SPEC): Handle -mg.
* cccp.c (install_builtins): Fix backward test of objc.
* fold-const.c (size_int): No need to test sign of NUMBER.
* gcc.c (process_command): Split -L from its arg.
* gcc.c (S_ISREG): Define if not defined.
(delete_temp_files): Use it.
* limits.h (UCHAR_MAX, CHAR_MAX, USHRT_MAX): Delete `U'.
Fri Jun 28 22:22:58 1991 Richard Stallman (rms at
* Makefile (realclean): Delete stage1, stage2, stage3.
* gcc.c (fatal) [HAVE_VFPRINTF]: Do print program name.
Fri Jun 28 15:34:08 1991 Jim Wilson (wilson at
* out-sparc.c (output_block_move): Correctly handle the case where
the size is not a CONST_INT, and has a value of 0.
* flags.h (flag_no_inline): Modify comment to match the one in
* integrate.c (copy_rtx_and_substitute): When creating new rtx,
make sure all of the new bitfields are copied, e.g.
* loop.c (loop_optimize): Call reg_scan after
find_and_verify_loops, because it may change register lifetimes.
(find_and_verify_loops): After moving a block of code outside the
loop, must readjust the loop_number_exit_label and
LABEL_OUTSIDE_LOOP_P data of the modified jump and the moved jump.
toplev.c (rest_of_compilation): Delete reg_scan call before
Fri Jun 28 13:16:37 1991 Michael Meissner (meissner at
* tm-mips.h (toplevel): Add target_flags to externals declared.
(toplevel): Add dslots_number_nops, mips_load_reg{,2},
mips_fill_delay_slot external declarations for delay slot reorg.
(CC1PLUS_SPEC): By default, pass -fno-gnu-binutils to cc1plus.
(TARGET_FLAGS): Add -mwc8, -mwc16, -mwc32 to set size of wchar_t,
though the switches are not used right now.
(TARGET_FLAGS): Add -msoft-float code from to compile
on systems w/o floating point.
(TARGET_FLAGS): -mdebugf suppresses filling load delay slots.
(HARD_REGNO_OK): Relax constraints, allow anything in GP
registers, anything in even FP registers, int's only in multiply
and divide registers, int/CC in the FPSW register.
(FRAME_POINTER_REQUIRED): Require frame if alloca is called for
(REG_CLASS_FROM_LETTER): Index from an array (mips_char_to_class)
instead of having lots of ?:'s. Also, allow 'd' to signify GP
(ENCODE_SEGMENT_INFO): Only record things being in small data/bss
if -mgpOPT (-O sets by default), -O, and -G xx where xx > 0.
(FINAL_PRESCAN_INSN): Rework to automatically not fill the
previous instruction's load delay slots with nop's if it is safe.
(ASM_OUTPUT_LABEL): If compiling collect, don't use assemble_name.
(ASM_GLOBALIZE_LABEL): If compiling collect, don't use
(ASM_OUTPUT_LABELREF_AS_INT): Define this for collect.
(ASM_OUTPUT_INT): If collect, don't use output_addr_const.
* (all floating point): If -msoft-float, don't allow any
floating point builtin operations.
(all patterns): Use 'd' constraint to limit things to GP
registers, rather than 'r'. This allows unions of
float/int/double to occupy any registers.
(*extend*): Call mips_move_1word to handle loads, which in turn
sees if we can omit the load nop.
(fix_trunc*): Redo, since register allocator can handle moving to
the appropriate register set.
(movdf_xfer*): Use explicit return's instead of falling through
and having the appropriate value in a register from the previous
(movsf_xfer*): New patterns to accomidate unions of floats and
(movsi_unaligned): New define_expand to call either movsi_ulw or
movsi_usw. Also, if not a memory operation, use movsi.
(movsi_ulw): Set up to omit load delay nop if we can.
(movsi_usw): Use memory_operand instead of simple_memory_operand.
Also, allow storing 0 to an unaligned location.
(various move patterns): mips_move_1word now takes a third
argument to specify whether a load should sign or zero extend.
(call_value): Use register_operand on return value.
(probe): Turn into define_expand, and set a register to the
contents of memory pointed to by the stack pointer with volatil
* out-mips.c (toplevel): Add new global variables:
dslots_number_nops, mips_load_reg{,2}, mips_regno_to_class,
(simple_memory_operand): If not optimizing, no global memory
reference is assumed to be in the GP area.
(mips_fill_delay_slot): New function to tell FINAL_PRESCAN_INSN
the current insn is a load and may need a nop.
(mips_move_1word): Take a third argument to say whether load byte
and load half-word sign extend or zero extend. Change all
callers. If this is a load, call mips_fill_delay_slots to
schedule the nops. Change all return's to setting a variable, and
falling through to the end.
(mips_move_2words): If this is a load, call mips_fill_delay_slots
to schedule the nops. Change all return's to setting a variable,
and falling through to the end.
(function_arg): if -msoft-float, floating point is passed in GP
(override_options): Initialize mips_char_to_class.
(print_operand): %( and %) no longer do .set nomacro.
(print_operand): %# prints #nop if gas or -mstats.
(print_operand): Check for too many %), %], and %>'s.
(compute_frame_size): Allocate space in stack to hold FP, just in
case we later need a FP and previously thought we could eliminate
(save_restore): Take a string to indicate the 2word load/store to
use, but don't use it at present. Change all callers. Home
varargs registers with sd if we can.
(function_epilogue): Deal with one or more outstanding nop's from
(function_epilogue): Revamp -mstats output format.
(function_epilogue): Zero new global variables.
* make-decrose (toplevel): Sort make variables.
(CLIB): Add -lld library.
(LANGUAGES): Add build of collect-osf and g++.
(ULTRIX_DIR): Change internal work directory location.
(cplus-lex.o): Don't optimize to avoid problem with 1.39 compiler.
(collect-osf): Add rules to build OSF/rose version of collect.
* make-mips (LANGUAGES): Add build of g++.
* tm-decrose.h (SIZE_TYPE): Specify to be long unsigned int.
(PTRDIFF_TYPE): Specify to be long int.
(WCHAR_TYPE): Specify to be long unsigned int.
* sdbout.c (plain_type_1): Add support for unknown tags if
needs this, but standard COFF typically doesn't allow unknown
* gcc.texinfo (Debugging Info): Document
* collect-osf.c (whole file): New file to provide collect support
on OSF/rose.
Fri Jun 28 09:20:18 1991 Tom Wood (wood at
* configure (m88k-luna): New target.
* tm-m88kluna.h: New file for the Omron Luna/88k.
* xm-m88k.h: Don't use USG for the luna88k.
* tm-m88kdgux.h: DG/UX implements coff and elf. Currently elf is
a strange variant of coff that's non-standard (it uses SDB
debugging info for example). Soon, the DG/UX elf will support
DWARF. These changes provide transitional support for all three.
(VERSION_0300_SYNTAX): True when -msvr4 and -mversion-03.00.
* tm-m88ksvr4.h (ASM_FILE_END, ASM_OUTPUT_DWARF_LINE): Move these
to tm-m88k.h. They are dwarf specific.
* tm-m88k.h (TARGET_SWITCHES): Add -mversion-03.00 and -mdwarf.
(OVERRIDE_OPTIONS): If using version 03.00 syntax, assume DWARF_DEBUG.
* tm-m88k.h (REG_ALLOC_ORDER): Adapt slightly for using r26-r29.
* out-m88k.c (m88k_debugger_offset): Don't complain if the base
register is optimized away.
Thu Jun 27 21:43:36 1991 Richard Kenner (kenner at
* local-alloc.c (memref_referenced_p, memref_used_between_p):
New functions.
(update_equiv_regs): Call memref_used_between_p.
Thu Jun 27 19:59:36 1991 Ken Raeburn (raeburn at
* print-tree.c (print_node): Changed the various "lang_#" strings to
indicate which of several possible fields are being examined; new
strings are "tree_#", "decl_#", "type_#".
Thu Jun 27 15:05:43 1991 Michael Meissner (meissner at
* xm-mips.h (ONLY_INT_FIELDS): Define if not compiling with GCC
since the MIPS compiler treats enum bitfields as signed.
Wed Jun 26 19:48:16 1991 Jim Wilson (wilson at
* sched.c (memrefs_conflict_p): Explicitly handle case where both
X and Y are CONST.
(sched_analyze_2): Do create dependencies for insns with REG_EQUIV
(sched_note_set): Correctly handle the case where the destination
register is a multi-word hard register.
(attach_deaths): Don't add a REG_DEAD note to an insn with a
REG_UNUSED note that mentions the same register. Correctly handle
the case where the destination register is a multi-word hard
(schedule_block): Also call sched_note_set for CLOBBERs when
computing which registers are dead at the end of the basic block.
Also call sched_note_set for USEs when computing what registers
are still live after a just scheduled insn.
(regno_use_in): New function, subroutine of split_hard_reg_notes.
Searches an rtx for any reference to the given register, and
returns the register rtx used if any.
(split_hard_reg_notes): New function. Handles the case where a
multi-word hard register with a REG_DEAD note gets split. Creates
a new REG_DEAD note for each part of the original hard register
used by the split insns.
(new_insn_dead_notes): Don't add a REG_DEAD note to an insn with a
REG_UNUSED note which mentions the same register.
(update_links): Add call to new function split_hard_reg_notes.
Correctly handle the case when the dest of the original insn was a
multi-word register which was split in the split insns. In this
case, the dest is no longer killed here, so must remove the
REG_DEAD on the last previous insn in this basic block which used
dest, if any such exists.
* unroll.c (reg_dead_after_loop): Check that a CODE_LABEL which is
the target of a JUMP_INSN has a non-zero PREV_INSN field before
trying to derefence it. Fail if there is no previous insn.
* loop.c (scan_loop): Fix typo.
* local-alloc.c (optimize_reg_copy): Likewise.
* global-alloc (hard_reg_copy_preferences): Likewise.
* gcc.texinfo (REG_LOOP_TEST_P): Likewise.
* optabs.c (expand_float): Likewise.
* tm-vaxv.h (ASM_OUTPUT_ASCII): Likewise.
* out-sparc.c (output_move_double): Sign extend CONST_INTs that
feed DImode targets.
* tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): Don't accept a LABEL_REF
as a legal address. Also, delete obsolete parts of preceeding
* reload1.c (alter_reg): Only try to delete the reg_equiv_init
insn if it hasn't already been deleted by a previous call to
* toplev.c (main): Handle -gdbx in addition to -gsdb for
* gcc.texinfo: Document -gdbx.
Tue Jun 25 09:57:08 1991 Tom Wood (wood at
* (casesi): Don't emit a barrier; the dispatch code must
adjoin the table.
* tm-m88k.h (DONT_REDUCE_ADDR): Don't use this.
(CONDITIONAL_REGISTER_USAGE): The PIC register is also call-used.
* out-m88k.c (m88k_layout_frame): Save the PIC register.
Tue Jun 25 07:40:43 1991 Richard Kenner (kenner at
* function.c (expand_function_end): FNDECL should
* combine.c (find_split_point): If we see an AND operation as the
first operand of some non-AND operation, use it as a split point.
(subst): Add counter to limit restarts, go to restart more often.
(subst, case AND): If we get (ior (and (X C1) C2)) and can't
restart more than once, rewrite with C1 as small as possible and exit.
* cse.c (cse_end_of_basic_block): Don't put branch in our path more
than once.
(cse_main): Clear PATH_SIZE when skipping a block.
(cse_basic_block): Use GET_RTX_CLASS.
Tue Jun 25 07:39:29 1991 Matthew Self (mself at
* varasm.c (const_hash, compare_constant_1, record_constant_1):
For ADDR_EXPR's, don't hash address of SYMBOL_REF. Only use
offset and name of symbol. This allows constructors which
contain pointers to identical string literals to be uniqued.
* loop.c (loop_optimize, init_loop): Moved call to
gcc_obstack_init() from loop_optimize() to init_loop().
* reload1.c (reload, init_reload): Moved call to
gcc_obstack_init() from reload() to new function init_reload().
* toplev.c (compile_file): Call new function init_reload().
Mon Jun 24 16:05:57 1991 Jim Wilson (wilson at
* stmt.c (expand_end_stmt_expr): Fix typo in comment.
* reload1.c (modes_equiv_for_class_p): Only fail if registers in
CLASS that can hold ALLOCATE_MODE can't also hold OTHER_MODE. Do
not fail for the reverse test. ALLOCATE_MODE is always a larger
or same size mode as OTHER_MODE, and will be the mode that reload
uses when allocating spill registers. Rewrite comments to explain
new behaviour.
(reload): Change call to modes_equiv_for_class_p to match new
* combine.c (simplify_shift_const): When simplifying (ashiftrt
(ashift inner_const_int) const_int), was checking the wrong number of
high order bits of inner_const_int. Also correct typos in comments.
* c-convert.c (convert_to_integer): Must also check ARG1 for
unsignedness, because ARG0 could be a constant when EXPR is a
* combine.c (try_combine): When splitting, it is not safe to use
I2DEST if it is referenced by NEWPAT.
* combine.c (distribute_notes): After converting REG_DEAD notes to
REG_UNUSED notes, clear PLACE if it already has a REG_UNUSED note,
to prevent adding a duplicate REG_UNUSED note.
* gcc.texinfo (SIGNED_CHAR_SPEC): Document.
Mon Jun 24 10:02:32 1991 Richard Kenner (kenner at
* cse.c (cse_set_around_loop): Ensure the insn we find in front
of the loop does the set in the proper mode.
* optabs.c (expand_float): Always do conversions to FMODE in the
signedness of the input.
* reload.c (find_reloads, find_reloads_toplev): If reg_equiv_address
is not a constant address, copy it in case it is shared.
* reload1.c (eliminate_regs): Copy reg_equiv_memory_loc in case
it is shared and we make a reload inside it.
* stupid.c (stupid_mark_refs): Registers that aren't used must die
in the insn after their birth so they conflict with other outputs.
* Replace patterns to convert (and (ashiftxx))
into (and (rotatexx)) with the patterns that are actually made
by combine.
We can allow offsettable addresses for operand 0 and it is not
* out-rs6000.c (secondary_reload_class): Correctly interpret result of
* out-rs6000.c (output_toc): Write FP constants in TOC.
* tm-r6000.h (TARGET_FP_IN_TOC): New flag.
(TARGET_SWITCHES): Add -mfp-in-toc and -mno-fp-in-toc.
(TARGET_DEFAULT): -mfp-in-toc is the default.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): FP constants may be put in the TOC.
Mon Jun 24 00:52:44 1991 James Van Artsdalen (james at
* out-i386.c (output_fix_trunc): If the dest operand mentions the
stack pointer, then we must adjust it to account for the temporary
space we allocate on the stack here.
Sat Jun 22 07:24:33 1991 Richard Kenner (kenner at
* cse.c (cse_set_around_loop): Fix typo in call to note_mem_written.
* emit-rtl.c (reorder_insns): Correctly handle case when AFTER is last
* expr.c (expand_expr, case COND_EXPR): Correctly handle X ? A : X + 1.
Previous change called invert_truthvalue which can modify EXP; we now
call it a second time to undo its action if do_store_flag fails.
Sat Jun 22 02:37:59 1991 James Van Artsdalen (james at
* cse.c (cse_set_around_loop): Don't try to initialize an
automatic structure.
* reg-stack.c (compare_for_stack_reg): If both operands to a
compare are the same stack reg, don't process death on the second.
* (all float patterns): Don't allow constants in the
operand predicates.
(all patterns using convert_387_op): Split patterns into one using
FLOAT and another using FLOAT_EXTEND.
Fri Jun 21 20:37:03 1991 Tom Wood (wood at
* sched.c (line_note, line_note_head): New vectors for use when
dealing with line-number notes.
(unlink_notes): Put line-number notes in LINE_NOTE for reuse.
(schedule_block): Just before reordering the insns, walk the insns
and record the line-number note in effect for each one. When
reordering is complete, restore the line-number notes as needed.
(schedule_insns): When debugging information is present, allocate
and initialize line_note and line_note_head. After scheduling,
walk the insns to delete redundant line-number notes.
Fri Jun 21 19:54:29 1991 Jim Wilson (wilson at
* old-sparc.c, out-old-sparc.c, tm-old-sparc.h: Delete obsolete
* loop.c (loop_number_exit_labels): Expand comment. Mention that
returns are not included because all bivs and givs are pseudos and
hence must be dead after a return.
Fri Jun 21 07:10:56 1991 Richard Kenner (kenner at
* combine.c (subst, case PLUS, MINUS): Remove cases for things like
(x-y)+y; now done in simplify_binary_operation.
* cse.c (simplify_unary_operation): Handle (sign_extend (truncate ..))
as used in casesi patterns.
(simplify_binary_operation, case PLUS, MINUS): Don't do most
simplifications if IEEE floating-point.
Add cases for things like (x-y)+y.
(fold_rtx): Replace PC with LABEL_REF if we are immediately in
front of a jump table.
Move code to apply associative law to after we have folded the
(fold_rtx, case MEM): Fix errors in checking for index of jump
table being out of range.
For ADDR_DIFF_VEC, return a MINUS or (truncate (minus L1 L2)).
(fold_rtx, case PLUS): If we have (plus X (label_ref L)), see
if X is equivalent to (minus L1 L2).
(cse_insn): Put (minus L1 L2) in `src_const' so it gets in a
REG_EQUAL note and gets put in the hash table.
If we are branching to a jump table, we are really branching to
immediately after the jump table
Remove special-case kludge for ADDR_DIFF_VEC; now handled properly.
* (casesi): Make pattern agree with machine instruction;
specifically, index is multiplied by two and the comparison is LEU,
not LE.
* cse.c (equiv_constant): If X is a one-word SUBREG of a larger
quantity, use `lookup_as_function' to see if it is equivalent
* jump.c (squeeze_notes): No longer static.
* loop.c (find_and_verify_loops): Need to call squeeze_notes when
moving block of code (see last change).
* reload.c (find_reloads): When forcing constant to memory,
set recog_operand to the result of find_reloads_toplev.
* combine.c (subst, case PLUS): Add (c1 - a) + c2 -> (c1+c2) - a.
(subst, case MINUS): Use simplify_binary_operation rather than
making CONST_INT from subtraction of two INTVAL's to ensure it
gets truncated as appropriate for its mode.
Add (c1 - (c2 - a)) -> (c1-c2) + a.
* (negdf2): Use operand_subword_force, not operand_subword.
(movsf): Use operand_subword, not gen_lowpart.
* out-rs6000.c (u_short_cint_operand): New function.
(print_operand): Support auto-decrement.
* tm-rs6000.h (OVERRIDE_OPTIONS): Force profiling off.
(HAVE_PRE_DECREMENT): Define this.
Support PRE_DEC.
* (zero_extendxx): Use rlinm, not andil so we avoid
clobbering cr0.
(arith-and-record patterns): Correct some bad operand numbers.
Put SImode output as operand 0 to improve register tying.
(andsi): Prefer rlinm over andil and andiu.
(load/store-with-update): Add patterns for these instructions.
(allocate_stack): New, replaces stack probe.
(add-and-compare): New patterns, with define_split.
(subtract-one-and-jump): Allow outputs anywhere; handle with
match_scratch and define_split.
* stmt.c (expand_end_stmt_expr): If `last_expr_value' is 0, set it
to const0_rtx.
* regclass.c (reg_n_sets): Move definition to before use.
* jump.c (find_cross_jump): Don't try to substitute REG_EQUAL
values unless they are constants.
Fri Jun 21 02:37:59 1991 James Van Artsdalen (james at
* reload1.c (reload): Don't clear after_call for each insn.
Sun Jun 16 17:28:43 1991 James Van Artsdalen (james at
* reload1.c (reload, reload_as_needed, choose_reload_regs): Enable
code to avoid return register when SMALL_REGISTER_CLASSES defined.
* final.c (final_scan_insn): Don't look for no-op moves if
processor has STACK_REGS.
* hard-reg-set.h (GO_IF_HARD_REG_EQUAL): New macro.
* jump.c (cross_jump_death_matters): New variable.
(find_cross_jump): If processor has STACK_REGS, compare death
notes if they matter.
* toplev.c (compile_file, rest_of_compilation): Support new
stack-regs conversion pass.
(main, compile_file, rest_of_compilation): Add support for -dk to
dump after stack-regs conversion.
* reg-stack.c: New file. Implements stack-regs conversion pass.
* (reg-stack.o): New file.
* tm-i386.h (STACK_REGS): New macro.
(all register macros): Define all eight float point registers.
(HARD_REGNO_NREGS): Only one float reg is needed for any mode.
(HARD_REGNO_MODE_OK): Move code here from out-i386.c.
(ARG_POINTER_REGNUM): Move to reg 16.
(FP_REGNO_P): Recognize all float regs.
(QI_REG_P): New macro.
(CONST_OK_FOR_LETTER_P): Recognize constant mask for byte or word.
Recognize constant 0..3 for `lea' shifts.
QImode must go in class Q_REGS. Float regs can't hold MODE_INT.
(MOVE_RATIO): New macro.
(SHIFT_COUNT_TRUNCATED): Delete. Bit opcodes don't truncate.
(RTX_COSTS): New macro.
(CONST_COSTS): Make constants cheaper.
* out-i386.c (fp_pop_level): Delete.
(fp_call_internal, output_asm_insn_double_reg_op, via_memory,
top_dead_p,call_top_dead_p,fp_top_dead_p1,mentioned_fp_top): Delete.
(hard_regno_mode_ok): Moved to tm-i386.h.
(qi_high_reg_name): New variable.
(output_op_from_reg, output_to_reg): New function.
(singlemove_string,output_move_const_single): No longer static.
(singlemove_string): Use correct operand number in `push' string.
(standard_80387_constant_p): Use recommended method to extract
float from CONST_DOUBLE.
(PRINT_REG): Add 'h' for "high" register names, 'y' for "st(0)".
(print_operand): Code 'z' prints no size suffix for stack regs.
Print DImode suffix as "ll", not just "l".
(output_fix_trunc): New argument `insn'. Generalize to output to
MEM or REG. Return "char *" like other output routines.
Generalize for SImode or DImode output.
(binary_387_op,convert_387_op,float_op,fix_op,shift_op): New
match_operator predicates.
(output_387_binary_op,output_float_compare): New functions.
* (all MODE_FLOAT patterns): Replace with new code to use
all FPU registers.
(all patterns): Use AS2 and AS1 macros where possible, for
eventual support of Intel syntax output.
(tstM): Don't initialize operands unless we need to.
(cmpM): Choose operange order in output for speed on i386.
(logical test patterns): The operands commute. If possible,
SImode tests should use just QImode.
(movstrictM): New patterns.
(movqi): Don't allow a constant of unknown value into Q_REGS.
(`lea' pattern): Move after addsi3.
(addsi3): Do three operand adds with `lea'.
(divsi3,divhi3,udivsi3,udivhi3): Delete in favor of u?divmodM4.
(divqi3,udivqi3): Remove earlyclobber for operand 0.
(andM3): Define three operand ANDs for 255 and 65535 using zero
extend opcode. Also directly do an AND in the second byte of a
(iorM3,xorM3): Do byte ior instead of word where possible.
(xorqi3): Allow operands[2] from MEM.
(ashlsi3): Allow three-operand shift of 0..3 with `lea' opcode.
(lshlM3): Redundant, delete.
(shift & rotate patterns): Print %0 as destination operand.
(bit recognizers): New patterns to set, clear and compliment.
(call insns): Use "%P" code for targets to support Intel syntax.
(movstrsi): Express changes to the operands instead of just
clobbering them. Don't accept non-constant move count, as our
code isn't as efficient as a library call.
Thu Jun 20 13:51:02 1991 Richard Kenner (kenner at
* cse.c (cse_insn): If we fold a conditional or computed branch to an
unconditional branch, it is now not in the normal format for an
unconditional branch, and it only has one set, delete it and
re-emit it.
Whenever we make an unconditional branch, set `cse_skip_to_next_block'
and do nothing else.
(cse_basic_block): Increment LABEL_NUSES on TO if it is a label
so it won't go away while we are using it as a stopping point.
If we are done with this block (`cse_skip_to_next_block' nonzero),
pretend we just did the insn before TO.
Decrement LABEL_NUSES of TO if it is a label; if it became zero,
delete it and try to extend the basic block.
* reload.c (find_reloads): Fix typo in check for no alternatives
* combine.c (reg_significant, significant_mode): New vars.
(combine_instructions): Allocate and initialize reg_significant.
(set_significant): New function.
(significant_bits, case REG): Use reg_significant, if non-zero
as the significant bits of a register.
* loop.c (n_times_set): Define -2 to mean that a register is
an candidate to be moved and is a constant.
(scan_loop): Set n_times_set to -1 or -2 as appropriate.
(regs_match_p): No need to check REG_FUNCTION_VALUE_P.
A register and a constant can be equal if the register is known
equivalent to the constant.
(invariant_p): Check n_times_set < 0, not == -1.
* rtl.h (REG_LOOP_TEST_P): New macro.
* jump.c (duplicate_loop_exit_test): Mark registers used only in
loop exit test.
* cse.c (cse_around_loop, cse_check_loop_start, cse_set_around_loop):
New functions.
(cse_end_of_basic_block): Add new arg to say if we are being called
after loop.c has run; if we are being called after loop.c, we can
(cse_main): Accept new AFTER_LOOP arg; pass to cse_end_of_basic_block.
If we are called before loop.c, see if we can cse around to the
start of a loop.
* toplev.c (rest_of_compilation): Tell cse_main if it is being called
before or after loop.c.
* rtl.h (LABEL_OUTSIDE_LOOP_P): New macro.
* loop.h (uid_loop_num): Renamed from luid_loop_num and now
maps INSN_UID to loop number instead of INSN_LUID.
* loop.c (loop_optimize): Modifications for the above.
(find_and_verify_loop): Change luid_loop_num to uid_loop_num.
Look for blocks of code ending in an unconditional branch out
of the loop surrounded by a conditional branch and try to move
such a block out of the loop.
(mark_loop_jump): Change luid_loop_num to uid_loop_num.
Mark all LABEL_REFs that are outside the current loop, for
branch prediction.
(strength_reduce, check_dbra_loop): Change luid_loop_num to
* unroll.c (unroll_loop, find_splittable_{regs,givs}): Likewise.
(reg_dead_after_loop, final_{biv,giv}_value): Likewise.
* flow.c (reg_n_sets): Don't define this here.
* regclass.c (reg_n_sets): Define it here.
(reg_scan): Allocate and initialize reg_n_sets.
(reg_scan_mark_refs): Count sets of a register in reg_n_sets.
* sched.c (reg_known_value_size): New variable.
(canon_rtx): Don't look in reg_known_value outside its allocated space.
(init_alias_analysis): Initialize reg_known_value_size.
* loop.c ({unknown,fixed}_aggregate_altered): Deleted.
(loop_store_mems): Replaces loop_store_addrs and loop_store_widths.
(loop_optimize): Call init_alias_analysis.
(prescan_loop, note_addr_stored): Save all MEMs stored into, rather
than just those that appear fixed; save MEMs rather than addresses
and widths.
(invariant_p): Use true_dependence to see if a MEM is invariant;
compare it with all MEMs stored during the loop.
* sched.c (memrefs_conflict_p): If XSIZE or YSIZE is zero
the object conflict if they have the same base, irregardless
of the offsets.
* reorg.c (dbr_schedule): Reallocate unfilled_firstobj after
freeing memory from the obstack.
* reload.c (push_reload): Always reload object inside SUBREG if
STRICT_LOW_PART is present.
Always set RELOAD_STRICT_LOW to zero; maybe we should get rid of it.
* reload.c (make_memloc): Copy the address if it varies to avoid
potential sharing problems.
* global-alloc.c (hard_reg_copy_preferences): New var.
(global_alloc): Allocate and initialze it.
(prune_preferences): Prune it.
(find_reg): Try preferences in hards_reg_copy_preferences first,
then hard_reg_preferences.
(set_preference): Set bit in hard_reg_copy_references, if appropriate.
* emit-rtl.c (try_split): If we are splitting a JUMP_INSN, copy
JUMP_LABEL from the old to new insn update the count of that label.
* cse.c (lookup): Always call exp_equiv_p unless we have a REG.
* cse.c (insert): If we are making a register equivalent to a
constant that was already equivalent to a constant, update
(cse_insn): Don't do it here.
* cse.c (fold_rtx): Always call simplify_unary_operation.
* cse.c (record_jump_equiv): Don't get primary elements for OP0 and
OP1 since they might not be valid.
* loop.c (get_condition): Accept new arg, EARLIEST that is a pointer
to where we place the earliest insn used to form the condition.
Check for comparison with CC0 in main loop, not earlier.
Never return condition involving CC0.
(get_condition_for_loop): Call get_condition with new arg.
* jump.c (jump_optimize): When we make store-flag insn, put new
insns before earliest insn used to form condition and use new
psuedo as target, which we copy into VAR immediately after the insn
that currently sets VAR.
Turn off "if (...) x = 1; else {...} if (x) ..." code; it is not
correct and can't be easily fixed.
(get_label_{before_after}): Use {prev,next}_nonnote_insn.
* jump.c (jump_optimize): Don't interpret NOOP_MOVES as meaning
"after_reload"; check reload_completed instead. Don't pass NOOP_MOVES
to functions that aren't actually trying to noop moves.
(follow_jumps, tension_vector_labels): Don't accept AFTER_RELOAD arg;
check reload_completed instead.
* combine.c (try_combine): Don't check that we don't have a
single_set when trying to replace a SET_DEST in a PARALLEL in I2.
(simplify_and_const_int): Always do the AND in the mode passed.
(significant_bits, case DIV and UDIV): Nothing special known
about low-order bits here.
(simplify_shift_const, shift cases): Don't go into infinite loop if
we combine two shifts in the same direction.
* c-parse.y, cplus-parse.y, objc-parse.y (set_yydebug): Move to
end of file so we don't have a reference to yydebug after its
definition; also delete duplicate declaration.
Thu Jun 20 09:08:21 1991 Tom Wood (wood at
* local-alloc.c (block_alloc): Fixed typo in last edit.
Wed Jun 19 17:05:52 1991 Jim Wilson (wilson at
* reload.c (push_reload): Verify reload_in[i] exists before using
GET_CODE on it.
* USE insns must be immediately before CALL_INSNs to work
properly, otherwise sched.c and reorg.c will not associate them will
the CALL.
* unroll.c (calculate_giv_inc): Accept constant increments
represented as a LO_SUM.
* flow.c (mark_used_regs): Don't put a REG_DEAD note on insns that
already have a REG_UNUSED note. This makes it consistent with
* combine.c (distribute_notes): If a REG_UNUSED reg is no longer
set by an insn, but is still used by the insn, then must convert
the REG_UNUSED note to a REG_DEAD note.
* gcc.c (SIGNED_CHAR_SPEC): Put ifndefs around it, so that it can
be overriden by a definition in the tm.h file.
* cse.c (cse_insn): Add missing third parameter to find_reg_note calls.
* tm-arm.h (INIT_CUMULATIVE_ARGS): Take LIBNAME as third argument.
* combine.c (can_combine_p): Remove extra argument in call to
* rtlanal.c (find_regno_note): Verify that the note contains a
REG before checking its REGNO.
* cse.c (canon_reg): Fix spacing/punctuation error.
* recog.c (constrain_operands): Likewise.
* tree.h: Likewise.
* varasm.c (Assemble function): Likewise.
Wed Jun 19 13:14:22 1991 Tom Wood (wood at
* local-alloc.c (block_alloc): When counting instructions, abort if
a loop is detected. Improperly threaded insns are easy to produce
when working on the scheduler.
Sat Jun 15 06:13:11 1991 Richard Kenner (kenner at
* combine.c (simplify_and_const_int, case ASHIFTRT): Avoid infinite
loop if simplify_shift_const doesn't do anything.
Thu Jun 13 09:05:12 1991 Tom Wood (wood at
* (decrement_and_branch_until_zero): Add this insn.
Thu Jun 13 07:32:37 1991 Richard Kenner (kenner at
* explow.c (plus_constant): Fix error in last change; CONST case
wasn't handled correctly.
* tm-m68k.h (CONST_CONSTS): Constants between -7 and -1 are cheap
because of subq.
* (dbra): Operand 0 should have '+' constraint, not '='.
* expmed.c (store_fixed_bit_field): Clean up some confusion between
targets and results in expand_binop calls.
* local-alloc.c (optimize_reg_copy): Fix several typos relating to
status updating.
Correctly handle the case where DEST dies before SRC.
Fix some comments that had SRC and DEST backwards.
* combine.c (can_combine_p): Swap order of args of && to avoid
unnecessary calls to use_crosses_set_p.
(simplify_and_const_int, case SUBREG): Make code agree with comment.
* emit-rtl.c (operand_subword): Avoid compilation warning.
* expmed.c (store_fixed_bit_field): Don't use OP0 as SUBTARGET
if it is a MEM and -fforce_mem was specified.
* expmed.c (emit_store_flag): After scc insns, convert to wider
mode using unsigned conversion if STORE_FLAG_VALUE is positive.
* expmed.c (init_expmed): Use mode of size BITS_PER_WORD instead
of SImode.
(store_bit_field, extract_bit_field): Replace references to SImode
(store_fixed_bit_field, extract_fixed_bit_field): Don't use explicit
modes; use get_best_mode instead.
(store_split_bit_field, extract_split_bit_field): Use operand_subword
and mode_for_size instead of making SUBREGs and using SImode.
* stor-layout.c (get_best_mode): Allow LARGEST_MODE to be VOIDmode,
in which case we can use any appropriate mode.
Wed Jun 12 16:32:37 1991 Michael Tiemann (tiemann at
* cplus-decl.c (init_decl_processing): Compensate for tm-sparc.h
change to WCHAR_TYPE handling.
Wed Jun 12 10:19:13 1991 Richard Kenner (kenner at
* tm-sparc.h (WCHAR_TYPE): Must be "short unsigned int".
* combine.c (subst, make_extraction, simplify_shift_const): Don't
change mode of volatile MEM; replaces similar change of June 1st.
* function.c (fixup_var_refs_1, optimize_bit_field): Likewise.
* recog.c (validate_replace_rtx_1): Likewise.
Tue Jun 11 22:09:28 1991 Michael Tiemann (tiemann at
* expr.c (expand_expr, case COND_EXPR): Expressions of both the form
X ? A + 1 : A and X ? A : A + 1 were being done, but only the former
was being handled correctly.
Tue Jun 11 12:13:53 1991 Richard Kenner (kenner at
* recog.c (validate_replace_rtx_1): If putting a CONST_INT in a
ZERO_EXTEND or SIGN_EXTEND, try to simplify the operation or fail;
the semantics of the operation require a non-VOIDmode argument.
* cse.c (delete_dead_from_cse): Don't delete last insn in a libcall.
* explow.c (allocate_dynamic_stack_space): Don't clobber SIZE when
rounding it.
* fold-const.c (fold, case COND_EXPR): Ensure we always return an
expression in the correct type.
* expr.c (emit_push_insn): Don't need to put X in register if it
is constant; operand_subword_force can do so if needed.
* reload.c (find_reloads): Simplify nested `if' statements.
* recog.c (constrain_operands): Likewise.
* jump.c (mark_jump_label): Fix typo (extra paren) in last change.
Tue Jun 11 10:03:08 1991 Micheal Tiemann (tiemann at
* collect2.c: New file.
* sched.c (memrefs_conflict_p): Finish removing ASHIFT case.
* emit-rtl.c (operand_subword): Change test of BITS_PER_WORD <
HOST_BITS_PER_WORD from compile-time to run-time.
* expr.c (emit_push_insn): Ditto.
* recog.c (constrain_operands): Ditto.
* reload.c (find_reloads): Ditto.
* jump.c (jump_optimize): Add `continue' after deleting INSN in case
where further attempts to optimize the insn are invalid.
(mark_jump_label): Don't crash if NEXT == 0.
Tue Jun 11 09:14:05 1991 Tom Wood (wood at
* out-m88k.c (legitimize_operand): New function to convert
CONST_DOUBLE to SFmode when possible.
* (cmpdf, adddf3, subdf3, muldf3, divdf3): Use it.
* tm-m88k.h: Declare it.
* xm-m88k.h (OBSTACK_CHUNK_SIZE): For DG/UX at least, the default
value results in a perfect checkerboard.
Tue Jun 11 07:23:45 1991 Richard Kenner (kenner at
* expr.c (expand_expr, case FLOAT_EXPR, FIX_EXPR): Don't try to
do any partial conversions here; expand_fix and expand_float now
handle all modes.
* optabs.c (fixtab, fixtrunctab, floattab): Table now contains
all modes.
(can_fix_p, can_float_p): Use mode as index in tables.
(init_fixtab, init_floattab): Likewise.
Add support for QImode and HImode operations.
(expand_float): Rework to remove dependendence on specific modes.
Can only use REAL_VALUE_LDEXP in certain configurations.
(expand_fix): Likewise.
If can't do operation unsigned, or signed into wider mode, emit a
sequence that compares operand with 2**(N-1) and, if larger,
subtracts 2**(N-1), converts, and adds it back.
Protect from queue and force not memory at start.
* (fixuns_truncdfsi2, fixuns_truncsfsi2): Deleted; now done
in expand_fix in optabs.c.
* combine.c (expand_field_assignment): Convert SET_SRC to mode of
(simplify_shift_const, case ASHIFTRT): Don't use undefined initial
value of MASK.
* explow.c: Include insn-config.h, recog.h, and insn-codes.h.
(allocate_dynamic_stack_space): Rework to be more precise in required
alignment. Must maintain alignment of stack to STACK_BOUNDARY at
all times (it must not be momentarily misaligned) and must align
returned address to BIGGEST_ALIGNMENT.
* (explow.o): Show new includes.
Tue Jun 11 07:22:54 1991 Matthew Self (mself at
* Change incorrect reference to -m68040-fp to -m68040-only.
Fix several spelling errors.
* (fix_trunc*f*i2): New insn's to replace fintrz on the
'040. These emit a sequence of insn's to change the rounding mode
to round-to-zero, perform the truncation, and restore the rounding
Mon Jun 10 09:57:31 1991 Michael Tiemann (tiemann at
* c-lang.c (GNU_xref_{begin,end}): Add stub functions for xref info.
* cplus-decl.c (record_builtin_type): Add support for handling
builtin types' nicknames (e.g. "unsigned long" for "long unsigned
* expmed.c (struct algorithm): Change array size from BITS_PER_WORD
gcc.texinfo: Document MAX_BITS_PER_WORD.
Mon Jun 10 07:45:17 1991 Richard Kenner (kenner at
* combine.c (try_combine): When making an I1 from an I2 that is
a PARALLEL, give the new I1 the same INSN_UID as I2.
* recog.c (constrain_operands, case 'p'): Pass operand mode
(from match_operand) to strict_memory_address_p.
* (andsi3): bclr does not set the condition codes in the
standard way.
Sun Jun 9 11:16:24 1991 Richard Kenner (kenner at
* reload.c (find_reloads): Swap preferred_class and pref_or_nothing
when we swap commutative operands.
* combine.c (subst, simplify_shift_const): Treat UDIV and MULT
with a second operand of a constant that is a power of two as the
appropriate shift if it feeds or is fed by a shift.
* expmed.c (expand_divmod): When searching for the best mode to
perform the computation, take into account the fact that we sometimes
do a shift, not a divide.
* expmed.c (emit_store_flag): Correctly handle "a = b < 0;" if A
is narrower than B.
Don't check for STORE_FLAG_VALUE equal to just the sign bit of
OP0 if the width of its mode is larger than HOST_BITS_PER_INT.
Use switch rather than if/elseif/elseif.
* combine.c (simplify_shift_const, shift cases): We were not forming
the mask correctly when VAROP is a LSHIFTRT and narrower than X;
simplify the mask formation by using significant_bits and
* reload.c (make_memloc): Copy RTX_UNCHANGING_P from REG to MEM.
(find_reloads_address, find_reloads_address_1): Don't shortcut
reloading the address in reg_equiv_address; always call
find_reloads_address on it.
* recog.c (constrain_operands, case 'p'): Validate address if
testing strictly.
* out-alliant.c, (output_move_double): Extraction of
parts of CONST_INT was backwards; these machines are words-big-endian.
Sat Jun 8 12:19:26 1991 Michael Tiemann (tiemann at
* Remove special-case shift insns which load and shift
memory-based operands. Combine now does this for us. Also change
abs patterns so that they consistently print the negation followed
by the mov on a single line.
* reload1.c (choose_reload_regs): Cast `enum reg_class' values to
`int' when using them as array indicies.
* gnulib2.c (LONG_TYPE_SIZE): Don't inherit the definition of
LONG_TYPE_SIZE from tm.h, since that may be target_flag-specific.
Instead synthesize the value from `sizeof (long)'.
* cplus-gc.c (build_m_desc): Figure out whether the i_desc should
constitute a defn of its type or not. Analogous to May 26 change
for instance variables.
Sat Jun 8 07:11:26 1991 Richard Kenner (kenner at
* combine.c (simplify_and_const_int): Detect and remove redundant
alignment operation.
(significant_bits, case REG): Realize that the stack pointer might
be aligned.
(significant_bits, case PLUS, MUNUS, MULT, DIV, UDIV): Track low-order
bits of zero as well as high-order zero bits (so we detect alignment
(record_value_for_reg): If updating a register, try to substitute its
old value into the expression for better tracking of values.
* (fmac/dmac): Delete incorrect patterns.
Thu Jun 6 19:08:29 1991 Sean Fagan (sef at
* final.c (output_source_line): Say we are on line number 1 if
sdb_begin_function_line is -1, not 0.
Thu Jun 6 08:01:05 1991 Richard Kenner (kenner at
* stor-layout.c (get_best_mode): Don't assume GET_MODE_SIZE (SImode)
is UNITS_PER_WORD; if SLOW_BYTE_ACCESS defined, try to return the
mode whose size is UNITS_PER_WORD.
* (floatsisf2, floatsidf2): Add missing mode for
operand 1; use const_int_operand as predicate.
* cse.c (canon_reg): Add arg INSN; if replacing a pseudo with a hard
register or vice versa, use validate_change to ensure the insn
remains valid.
All callers changed; most pass zero since they validate replacement.
(cse_insn): Use validate_change on result of canon_reg when
* c-common.c (combine_strings): Use WCHAR_BYTES instead of
UNIT_PER_WORD for the size of a wide char.
* emit-rtl.c (gen_lowpart_common): Always extract integral modes
from integer CONST_INTs and CONST_DOUBLEs.
* integrate.c (copy_for_inline, copy_rtx_and_substitute): Don't
try to extract a float from a fixed-mode CONST_DOUBLE.
(copy_for_inline, copy_rtx_and_substitute, restore_constants):
* local-alloc.c (update_equiv_regs): Fix typo in testing
Wed Jun 5 09:15:09 1991 Ken Raeburn (raeburn at
* Eliminate unneeded binding levels when overloading template class
* cplus-pt.c (overload_template_name): Accept second argument
classlevel, indicating that new decl should be pushed into current
class binding level; otherwise, assume current level is okay to use.
Callers changed.
(undo_template_name_overload): New second argument classlevel
indicates where binding for variable was made. Callers changed.
* cplus-parse.y (structsp): Call undo_template_name_overload in all
appropriate cases.
* Get interface/implementation flags set properly on methods in
class templates, and use it:
* cplus-lex.c (store_pending_inline): If inside a class, walk up
through nested classes to top level looking for template parameters.
For class methods, use current interface flag settings rather than
flags for class.
(extract_interface_info): No longer static.
(do_pending_inlines, process_next_inline): Call
extract_interface_info to get interface flags set properly after
changing file names.
* cplus-pt.c (instantiate_class_template): Ditto.
(end_template_instantiation): Ditto.
(do_pending_expansions): If interface/implementation flags of
containing class are set, use them.
* cplus-tree.h (interface_unknown): Added declaration.
Wed Jun 5 07:36:44 1991 Richard Kenner (kenner at
* reload.c (find_reloads_address): Unshare a MEM if its address is
the address of a constant pool location.
* optabs.c (expand_binop): Fix typos in multi-word addition; had
* reload1.c (alter_reg): Correctly delete insn that makes a REG
equivalent to a MEM in the case where the MEM is the SET_DEST.
* (negdf2): Add missing alternative in operands 2.
(movdi): Change "i" constraint to "n".
Split for constant integer as input; split cannot fail.
Correct typo in DEFINE_SPLIT (DFmode for DImode).
* out-a29k.c (gen_reg_or_integer_constant_operand): New function.
* configure: Fix typo in reference to tm-sun3-nfp.h.
Wed Jun 5 06:56:10 1991 Matthew Self (mself at
* c-parse.y, objc-parse.y (attrib): Always pass aligned attribute
through. Return $1 on failure rather than NULL_TREE for consistency.
* c-common.c (decl_attributes): Warn if requested alignment is not
a power of two. Also warn if decl is not a VAR_DECL or a FIELD_DECL,
since specifying alignment makes no sense for a TYPE_DECL, and is
not implemented for a FUNCTION_DECL.
* c-parse.y, objc-parse.y (initdcl, notype_initdcl): Call
decl_attributes before finish_decl in order for alignment attribute
to take effect.
* varasm.c (assemble_variable): Warn if DECL_ALIGN is greater than
MAX_OFILE_ALIGNMENT, if defined. This allows errors to be
detected with formats like a.out which support a maximum alignment
of 4.
* c-parse.y, objc-parse.y (component_declarator): Call decl_attributes
with correct args.
* stor-layout.c (layout_record, layout_union): Do not clamp struct
alignment at BIGGEST_ALIGNMENT, since individual fields may have
requested greater alignment than this. This check shouldn't have
done anything anyway.
* c-parse.y (unary_expr): When alignof is applied to an expression,
call c_alignof_expr so that we can check DECL_ALIGN instead of calling
c_alignof (TYPE_ALIGN (TREE_TYPE (expr))).
* c-typeck.c (c_alignof_expr): New function to compute alignof for
expr's. Returns DECL_ALIGN for VAR_DECL's and FIELD_DECL's. Also
return 1 after reporting error about applying alignof to bitfields.
* c-tree.h (c_alignof_expr): Add declaration.
* varasm.c (assemble_variable): MAX_OFILE_ALIGNMENT defaults to
BIGGEST_ALIGNMENT if not defined in config.h.
Wed Jun 5 06:55:12 1991 Tom Wood (wood at
* (mov*): Change the interface to emit_move_sequence.
* out-m88k.c (emit_move_sequence): Similar to the sparc version.
* tm-m88k.h (SIZE_TYPE): Specify as unsigned int.
* xm-m88k.h (HOST_BITS_PER_LONGLONG): Define.
Wed Jun 5 01:45:07 1991 Sean Fagan (sef at
* sdbout.c (sdbout_symbol): don't output definition information for
a nested function inside the parent function; this makes COFF
assemblers upset.
Tue Jun 4 17:35:13 1991 Sean Fagan (sef at
* function.c (trampoline_address): make the RTL_EXPR node temporary,
not momentary, so that the trampoline_list doesn't become garbage.
Fix made by jim wilson (
Tue Jun 4 09:40:59 1991 Richard Kenner (kenner at
* expr.c (move_block_to_reg): Fix typo in last change.
* local-alloc.c (update_equiv_regs): Check for reg_n_refs == 2,
not loop_depth * 2.
* reorg.c (fill_simple_delay_slots): Clear INSN_DELETED_P on insns
placed in current_function_epilogue_delay_list.
* make-rs6000 (ALLOCA_FLAGS, ALLOCA_FINISH): Add override to
compensate for the fact that the RS/6000 C compiler has no -S.
* out-rs6000.c (easy_fp_constant): Use operand_subword.
(print_operand): Use INT_P and INT_LOWPART to allow accepting both
CONST_INT and CONST_DOUBLE for integers.
* (floatsidf2, floatunssidf2): Rework these to emit only
two insns, each of which has DImode or DFmode operands. Then
split the funny DImode insn to generate it.
(fix_truncdfsi2, fixuns_truncdfsi2): Surround our call with
Use operand_subword.
(movsf, movdf): Correctly handle a pseudo passed during reload.
Use operand_subword.
Split moves involving "easy" FP constants.
(subtract-and-branch): Disable for now, to avoid output reload in jump.
* tm-rs6000.h (WCHAR_TYPE): Add definition.
(INT_REGNO_P): Fix typo; register 31 is a normal register.
(LEGITIMATE_CONSTANT_P): The only FP constants that are valid are
the "easy" ones.
* (negdf2): Use XOR when not involving accumulator.
Add SCRATCH so we dont use gr122.
Handle case where input and output are same register.
(negsf2): Use SCRATCH.
(DImode operations): Use operand_subword, not gen_{low,high}_part.
(movsf, movdf, movdi): Always split if we can look inside CONST_DOUBLE.
Use operand_subword.
Don't split into separate words in DEFINE_EXPAND.
* out-a29k.c (in_operand): Account for fact that integer CONST_DOUBLE
is VOIDmode.
(extract_subword): Deleted.
(print_operand): Add macros INT_P and INT_LOWPART so we can accept
* (movdi, movdf, negsf2, negdf2): Use operand_subword and
operand_subword_force, instead of gen_{high,low}part.
Use force_const_mem instead of force_const_double_mem.
* (movdi): Remove 'F' constraint; 'n' now includes integer
(anddi3, iordi3, xordi3): Likewise.
Use operand_subword to extract individual words.
* out-m88k.c (output_load_const_{float,double,dimode}): Use
* (emit-rtl.o): Now includes expr.h.
* calls.c (expand_call): Pass mode to move_block_to_reg.
* combine.c (subst, case SUBREG): Simplify SUBREG of hard register
and some SUBREGs of constants.
(gen_lowpart_for_combine): If object is desired mode, always return it.
Use gen_lowpart_common for most cases; just support MEM and
surrounding with a SUBREG here.
* cse.c (insert): CONSTANT_P includes CONST_DOUBLE.
(fold_rtx): Use MODE for GET_MODE (X).
(fold_rtx, case SUBREG): Handle simple cases of folding SUBREGs.
(fold_rtx, case MEM): Use operand_subword and gen_lowpart_if_possible
to get parts of constant instead of gen_lowpart and gen_highpart.
(gen_lowpart_if_possible): Use gen_lowpart_common for most cases.
* expr.c: Include expr.h.
(gen_lowpart_common): New function, from gen_lowpart.
(gen_lowpart): Use gen_lowpart_common for most cases; just handle MEM.
(gen_highpart): Deleted.
(subreg_lowpart_p): Test WORDS_BIG_ENDIAN in `if', not `#if'.
(operand_subword, operand_subword_force): New functions.
* explow.c (plus_constant): Handle adding CONST_INT to CONST_DOUBLE.
Rework to use switch statement.
Remove obsolete OLD_INDEXING code.
(plus_constant_for_output): Use plus_constant for most cases.
(break_out_memory_refs): Refine which constants get broken out.
* expmed.c (store_bit_field, extract_bit_field): Don't use
gen_highpart for multi-word fields; instead, loop and use
operand_subword. We now support fields more than two words long.
(mask_rtx, lshift_value): Just pass high and low words to
immed_double_const; it will mask and choose CONST_INT vs. CONST_DOUBLE.
* expr.c (convert_move): Use operand_subword instead of gen_highpart.
Don't assume GET_MODE_SIZE (DImode) > UNITS_PER_WORD.
(move_block_to_reg): Add MODE arg.
Use operand_subword_force.
(move_block_from_reg): Use operand_subword.
(move_block_from_reg, move_block_to_reg, use_rgs):
Don't assume GET_MODE_SIZE (SImode) == UNITS_PER_WORD.
(emit_move_insn, emit_push_insn): Likewise.
Use operand_subword and operand_subword_force.
(expand_expr, case INTEGER_CST): Just call immed_double_const.
(expand_expr, cases FIX_TRUNC_EXPR, FLOAT_EXPR): Don't assume
(expand_builtin): Likewise.
(do_jump_by_parts_{greater,equality): Likewise.
Use operand_subword_force.
* expr.h (operand_subword): Remove declaration from here.
(validize_mem): Add missing declaration.
* final.c (final_scan_insn): If assembler code string is "#",
try to split insn.
Ignore insns with INSN_DELETED_P set.
(alter_subreg): Remove erroneous code for CONST_DOUBLE.
(output_addr_const): Integer CONST_DOUBLEs are now VOIDmode.
* fold-const.c (add_double): No longer static.
* integrate.c (copy_for_inline, copy_rtx_and_substitute):
Use validize_mem to validate force_const_mem's result.
(subst_constants, case SUBREG): Use operand_subword and
gen_lowpart_common instead of gen_lowpart and gen_highpart.
(restore_constants): Don't assume all CONST_DOUBLEs are floating.
Use validize_mem to validate force_const_mem's result.
* optabs.c (expand_binop,, expand_unop): Don't assume
Use operand_subword_force.
(operand_subword): Deleted from here. New version in emit-rtl.c.
* recog.c (validate_replace_rtx_1): Check for any constant,
not just CONST_INT.
(constrain_operands, case 'm', 'o'): Any constant OK if strict < 0.
(constrain_operands, case 'E'): Must have host and target word sizes
the same.
(constrain_operands, case 's', 'n'): CONST_DOUBLE can be integer.
* reload.c (find_reloads, case 'm', 'o', 'E', 's', 'n'): Likewise.
Don't call force_const_double_mem; use force_const_mem instead.
(find_reloads_toplev): Likewise.
Use gen_lowpart_common to get low part of constant.
* rtl.h (gen_highpart, force_const_double_mem): Deleted.
(gen_lowpart_common, operand_subword, operand_subword_force):
New declarations.
* varasm.c (const_double_chain): Renamed from real_constant_chain.
(immed_double_const): For integer constants, perform any needed
masking and make either CONST_INT or CONST_DOUBLE.
(force_const_double_mem): Deleted; would need a mode arg added
which would make it almost identical to force_const_mem.
* out-vax.c (split_quadword_operands): Use operand_subword instead
of gen_lowpart and gen_highpart.
* function.c (find_replacement): New function.
(fixup_var_refs_insns): Pass pointer to listhead of (new)
fixup_replacement structures; if any entries were pseudos, copy from
memory to the pseudo.
(fixup_var_refs_1): New arg REPLACEMENTS; provide that arg in
recursive calls.
Use find_replacements to ensure we don't break any MATCH_DUPs.
Tue Jun 4 05:07:53 1991 Michael Tiemann (tiemann at
* stmt.c (pushcase, pushcase_range): Take new parameter DUPLICATE.
Use this to store existing LABEL_DECL if LABEL is a duplicate.
* c-parse.y, cplus-parse.y, objc-parse.y, stmt.c: All callers
Mon Jun 3 17:19:40 1991 Michael Tiemann (tiemann at
* cplus-expr.c (decl_in_memory_p): New function.
* cplus-typeck.c (mark_addressable): Test `decl_in_memory_p' instead
of testing memory_operand, since the DECL_RTL of a decl may be a
(MEM ...) by not a valid memory address.
* cplus-typeck.c (mark_addressable): When we decide that a static
const variable must go to memory, make sure that its rtl is
allocated from the correct obstack.
* cplus-decl.c (grokdeclarator): Replace undocumented BREAK_C_TAGS
#define control with comments explaining why or how it is correct
for GNU C++ to break C's notions of what a tag is.
* cplus-call.c (convert_harshness): Replace undocumented #if
AMBIGUOUS_WORKING control with a comment explaining the actions
where this control used to be.
Mon Jun 3 15:07:47 1991 Sean Eric Fagan (sef at kithrup)
* tm-i386.h (TRAMPOLINE_TEMPLATE): Changed a 040 to 0xe0;
this is the proper code for a jmp [%eax] instruction.
Mon Jun 3 08:07:42 1991 Richard Kenner (kenner at
* cccp.c (initialize_builtins): Install __SIZE__TYPE__,
__PTRDIFF_TYPE__, and __WCHAR__TYPE__ as builtins.
Sun Jun 2 18:18:19 1991 Richard Kenner (kenner at
* flow.c (mark_set_1): Don't set LAST_MEM_SET from a MEM that has any
side-effects (such as auto-inc), not just volatile MEMs.
* rtlanal.c (reg_referenced_p): New function.
* combine.c (try_combine): Correct test for added_sets_1 to account
for case where I1 and I2 both feed I3.
(distribute_notes): Don't interpret setting a reg as a use of the
reg; use new reg_referenced_p and simplify code.
* flow.c (propagate_block): Ensure that LOOP_DEPTH is correct at all
insns in a basic block, otherwise reg_n_refs will be set incorrectly.
* recog.c (validate_replace_rtx_1): Don't change mode of memory
reference that is mode-dependent.
Don't make a MEM with a larger mode than original.
* combine.c (try_combine): Disable code to check MODES_TIEABLE_P
added May 20th and 22nd; this should not be needed now that
LIMIT_RELOAD_CLASS has been added to reload.
* flow.c (mark_set_1): Allow for the fact that stack pushes don't have
REG_INC notes.
* local-alloc.c (optimize_reg_copy): Likewise.
Don't change lives of hard registers #ifdef SMALL_REGISTER_CLASSES.
A USE of a register must not be changed.
(validate_equiv_mem): Don't make an equivalence to volatile MEMs.
* reorg.c (mark_set_resources): #ifdef PUSH_ROUNDING, mark SP as always
set since the insn might have a (pre_dec sp).
Sun Jun 2 16:03:31 1991 Richard Stallman (rms at
* (libg_dir): Variable deleted.
(install-gnulib): Don't bother creating libg.a.
* cccp.c (size_type_string, etc.): Variables deleted.
(special_symbol): Use macros SIZE_TYPE, etc., directly.
Sat Jun 1 12:54:05 1991 Richard Stallman (rms at
* Let tm.h specify types for size_t, ptrdiff_t and wchar_t.
* cccp.c, c-decl.c: Provide default definitions of the new params.
* cccp.c (__SIZE_TYPE__, __PTRDIFF_TYPE__, __WCHAR_TYPE__): Builtins.
(special_symbol): Implement them based on new params.
* stddef.h (size_t, ptrdiff_t, wchar_t): Declare using those builtins.
* c-tree.h (ptrdiff_type_node): Declare variable.
* c-decl.c (init_decl_processing): Use *_TYPE params
to control setting of sizetype, wchar_type_node and ptrdiff_type_node.
* c-typeck.c (pointer_diff): Take result type from ptrdiff_type_node.
* configure (target1): Really change / to -.
Sat Jun 1 02:49:04 1991 Michael Tiemann (tiemann at
* cplus-lex.c (extract_interface_info): Now non-static. Called
whenever INPUT_FILENAME changes.
* cplus-pt.c (instantiate_class_template): Call
`extract_interface_info' when switching files.
* cplus-input.c (getch): Ditto.
* combine.c (subst): Don't change the mode of memory access for
volatile memory.
* tm-sparc.h (CONST_COSTS): Fix typo in computing cost of
CONST_DOUBLE for DImode integers.
Fri May 31 16:11:57 1991 Ken Raeburn (raeburn at
* cplus-lex.c (process_next_inline): Set line number and filename if
more inline data is to be processed.
(store_pending_inline): Treat FUNCTION_TYPE like METHOD_TYPE. Use
current_class_type instead of extracting it from method type; the
two should be the same, and the latter doesn't work for statics.
* cplus-decl.c (start_decl): When constructing templates, use
original name of function rather than "mangled" name. Look for
FUNCTION_DECL, not FUNCTION_TYPE, when deciding how to push the
new decl.
(start_method): Default inlining does not apply to template
* cplus-pt.c (pending_template_expansions): Moved declaration to
start of file.
(tsubst): For FUNCTION_DECL, use original name of source, not
mangled name.
(instantiate_template): Local variables now non-static. Fill in
pending-inline field of new decl, rather than template-info, and
chain into either pending-inlines or pending-template-expansions.
* cplus-typeck.c (build_x_function_call): If a template is found,
treat it as an overloaded declaration.
Fri May 31 14:20:45 1991 Richard Stallman (rms at
* (all.cross): New target.
* configure: If cross-compiling, change `ALL' to use all.cross.
Fri May 31 11:43:31 1991 Matthew Self (mself at
Add new constructor and destructor sections.
(MAX_OFILE_ALIGNMENT): Define as 2^15 for Mach-O.
(ASM_OUTPUT_ALIGN): Use .align, not .even. Allow alignments > 2.
(CPP_PREDEFINES): Added -Dm68k since some code expects this.
Fri May 31 05:41:51 1991 Michael Tiemann (tiemann at
* cplus-class.c (pushclass): New argument value for MODIFY accepted.
* cplus-decl2.c (build_push_scope): Call `pushclass' with MODIFY == 3.
* cplus-decl.c (finish_function): Set TREE_PUBLIC and TREE_EXTERNAL
bits on functions according to #pragma interface/implementation,
regardless of whether or not the function's inline. This fixes the
bug of needless code replication with -fno-inline.
Thu May 30 17:39:53 1991 Richard Stallman (rms at
* expr.c (expand_expr):
Don't lose volatility of fields in COMPONENT_REF.
Thu May 30 17:36:45 1991 Richard Kenner (kenner at
* cse.c (count_reg_usage, delete_dead_from_cse): New functions.
* toplev.c (rest_of_compilation): Call delete_dead_from_cse immediately
after the first cse pass.
* local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem):
New functions, to find cases where a REG is equivalent to a MEM.
(optimize_reg_copy): New function.
(update_equiv_regs): Call these new functions.
Look for a register used in only one basic block being stored into
Keep track of loop depth so we can find regs used only once, but
inside a loop.
* reload1.c (reload): Use single_set when looking for an insn
that initializes a register.
If making a REG equivalent to a MEM, the insn with SET_DEST being
the register isn't always the one making the equivalence, since the
equivalence might be occurring due to a store into MEM; in that
case set reg_equiv_init to the latter insn.
Thu May 30 14:23:01 1991 Ken Raeburn (raeburn at
* Pending expansions processed at end-of-file can be processed out
of order, so freeing the associated data from the obstacks is not
* cplus-tree.h (struct pending_inline): New field can_free
indicates whether to free the text after processing it.
* cplus-lex.c (do_pending_inline, process_next_inline): If
can_free flag is set, specify inline-text obstack, otherwise null
(cons_up_default_function): Clear flag.
(reinit_parse_for_method): Set it.
(store_pending_inline): Clear it when changing obstacks.
(pending_template_obstack): Deleted. References changed to use
* cplus-lex.c (store_pending_inline): Set DECL_PENDING_INLINE_INFO
value after swapping obstacks, not before.
Thu May 30 07:23:18 1991 Michael Tiemann (tiemann at
* va-sparc.h: Has to be a char * to be compatible with Sun.
i.e., we have to pass a `va_list' to vsprintf. Also, fixed
bug in passing vararg structs.
Thu May 30 00:32:18 1991 Richard Stallman (rms at
* configure: Delete Makefile.tem before writing it.
* stor-layout.c (layout_record):
Ignore PCC_BITFIELD_TYPE_MATTERS for incomplete type.
* fixincludes (stdtypes.h): Handle wchar_t like the other types.
* function.c (assign_parms): Don't declare args_so_far register.
Wed May 29 15:13:05 1991 Ken Raeburn (raeburn at
* cplus-tree.def (TEMPLATE_PARM_IDX): Deleted.
(TEMPLATE_TYPE_PARM): New node type, looks like a type node.
(TEMPLATE_CONST_PARM): New node type, looks like a const node.
* cplus-tree.h (IDENTIFIER_TYPE_VALUE_PTR): Inlined under gcc.
(struct lang_type): New bitfield `use_template'.
(CLASSTYPE_USE_TEMPLATE): Accessor macro for above.
(struct lang_decl): New field `template_info'.
(DECL_TEMPLATE_INFO): Accessor macro for above.
(push_overloaded_decl_top_level): Added declaration.
accessing fields of TEMPLATE_..._PARM nodes.
(struct pending_inline): New fields for names and values to bind
to them while processing.
(struct template_info): Definition moved here from cplus-pt.c.
(instantiate_template): Added declaration.
(instantiate_class_template): Ditto.
(processing_template_{decl,defn}): New variable declarations.
* print-tree.c (print_node): Provide missing argument to
print_node for `bitpos' field. Display `virtual' flag, and (for
function and method types) `class' field; these are only used by
C++ that I'm aware of, but are defined in common code, so they
should be displayed here.
* cplus-parse.y (template_def): Separate set of derivations, for
class and function templates. Template_def is a type of extdef;
extern_lang_string before template_def is not permitted.
(fn_tmpl_end): New nonterminal, anything that signals the end of
the portion of a template that we should parse.
(yyprint): Define only if YYDEBUG. Handle TYPESPEC.
(datadef): Complain at class template override declaration if that
specialization has already been produced by expansion. Template
definitions no longer belong here.
(tmpl.2): Always call instantiate_class_template; let it decide
whether or not to go through with it.
(template_instantiation): Put decl in global scope only if not
already there.
(typespec, scoped_typename): Scoped typename inside template type
should be a scoped_typename, not a typespec. However, a
template_type should be allowed as a typespec.
(structsp): Don't undo template name overload here. Deleted
derivation from template_type.
(named_class_head_sans_basetype): Don't overload template name.
(LC): Do it here.
(notype_declarator): For scoped_id derivations, don't call
build_push_scope if the scoped_id is a SCOPE_REF.
(scoped_id): Moved old typespec-from-template_type rule here.
Call resolve_scope_to_name only if template parms aren't involved.
* cplus-pt.c (struct template_info): Definition deleted.
(templates, current_template_info): Variables deleted.
(processing_template_{decl,defn}): New variables.
(push_template_decls, pop_template_decls): Accept parmlist and
arglist as separate arguments, instead of deriving both from the
template. If class_level is non-zero, push and pop a level,
making it transparent to tags. Removed some pointless checks from
pop_template_decls that are only needed in push_template_decls,
and some assertions from both. Callers changed.
(uses_template_parms): Return non-zero iff argument refers to any
(tsubst): Walk tree, substituting for template parms, returning
new tree.
(type_unification): Rewritten a bit, to make it work. New
argument nsubsts is pointer to place to record number of
substitutions made when matching.
(unify): Renamed from unify1. Rewritten completely, to work.
Still may need extending for some tree node types.
(do_pending_expansions): At end-of-file, expand any templates not
yet expanded which were actually needed. Needs work to accomodate
latest specs.
(process_template_parm): Simplified slightly. Non-type parms
should be marked read-only; aggregate types are not allowed, since
equality checks don't work.
(end_template_parm_list): Moved to after process_template_parm.
Push a level, and push decls for TEMPLATE_*_PARMs. Set
processing_template_decl flag.
(end_template_decl): For non-class templates, build a
TEMPLATE_DECL and store the regular decl in its result field.
Context and other values get copied over too. Call poplevel to
get rid of the TEMPLATE_*_PARM decls, and call
dont_forget_overload to avoid losing the declaration later. Clear
processing_template_decl flag. Call get_pending_sizes, so later
function compilation doesn't try to evaluate sizes of templates.
(mangle_class_name_for_template): Convert type/non-type check from
switch to if test. Added support for ENUMERAL_TYPE, REAL_TYPE,
and POINTER_TYPE parms.
(instantiate_class_template): Renamed from old
instantiate_template. Don't expand if type size is set, or if
being-defined flag is set, or use-template flag is non-zero. If
other-template parms are used in the parm list, construct a simple
RECORD_TYPE node and return it. Catch case of template declared
but not defined before use. Renamed argument from class to
classname. Set processing_template_defn flag.
(instantiate_template): New routine; constructs new decl node
given TEMPLATE_DECL node and template arg vector.
(end_template_instantiation): Set use-template field to 2 ("did
use template"). Clear processing_template_defn flag.
(reinit_parse_for_template): Get template-info ptr from decl node.
Store template parm vector in it.
(pending_template_expansions): List of templates that may need
expanding later for function or class data definitions.
* cplus-method.c (build_overload_value): Ensure tree code is
values, compare against integer_zero_node instead of constructing
another one. Added support for POINTER_TYPEs. If not
REAL_IS_NOT_DOUBLE, support real values as well.
(build_overload_name): Accept TEMPLATE_*_PARM nodes, but generate
a string that should cause some assembler errors.
* cplus-ptree.c (print_lang_decl): Retrieve template-info from its
new place.
(print_lang_type): For TEMPLATE_TYPE_PARM, print its (short) info
and return. For RECORD_TYPE, print use-template and interface-*
* cplus-search.c (push_class_decls): Don't call
push_template_decls; the bindings of template parameter names
should be associated with the template body, not with the class.
Do overload the template name, however.
(pop_class_decls): Don't call pop_template_decls.
* cplus-call.c (build_method_call): Changed to recognize
constructor of template class.
(build_overload_call): Add in number of template substitutions as
extra cost of a candidate function. For template decls, try
unification and instantiation before evaluating cost of result.
This too is incorrect in terms of the spec, but it's a starting
point for later work.
* cplus-class.c (finish_struct): If structure is named, undo
overload of its name as a template.
(pushclass): If prev_class_type was a template class, pop it; the
decls are handled wrong and should be re-entered.
* cplus-decl.c (poplevel): Assert that the current level is not
(push_to_top_level): Include global scope when looking for old
values, because class bindings aren't listed in any other one
(push_overloaded_decl_top_level): New function; like
push_overloaded_decl, but places decl in global binding level.
(dont_forget_overload): New function; removes decl from list of
overloads to be forgotten when scope is exited.
(start_decl): If template parms are used, construct a
TEMPLATE_DECL node referencing the current decl. For function
templates, call push_overloaded_decl; for class template members,
chain them into the class template definition.
(grokdeclarator): Don't try determining size of a
TEMPLATE_CONST_PARM node. For template class-data decls,
construct a phony VAR_DECL node and return it.
* cplus-decl2.c (grokfield): For static class data, use
build_overload_name result, instead of copying class name, since
the latter could be a human-readable template class name. (If
NEW_OVERLOAD_SCHEME is not defined, do this only if the class has
a template-derived name.)
* cplus-lex.c (pending_template_obstack): New variable; obstack
for pending-template stuff to be saved to end-of-file.
(init_lex): Initialize it.
(default_def): New variable; used for default definition of copy
constructors and destructors.
(do_pending_inlines): Figure out whether text is in an obstack,
and which one, for calling feed_input. Push template decls if
needed, as specified in pending_inline data. Pass current
pending_inlines pointer back in PRE_PARSED_FUNCTION_DECL instead
of next.
(process_next_inline): Ditto. Pop pending inline data if needed.
(store_pending_inline): New function. Decides which obstack to
store a pending definition on, and which list to chain it into.
(reinit_parse_for_method): Call it.
(reinit_parse_for_block): If character passed in is '=', look for
a semicolon to end the block; don't require a {} block. Don't pad
to 8 bytes on USG, since we aren't feeding input via stdio any
more. Also, use newlines instead of # directives for advancing
line number only a few lines.
(cons_up_default_function): Punt padding for USG stdio, since we
aren't using it any more. Use default_def for definition. Call
store_pending_inline to save it away.
(identifier_type): For TEMPLATE_DECL, DECL_RESULT field non-null
indicates a non-type template, so don't return PTYPENAME.
(yylex): If end-of-file and input isn't redirected, call
do_pending_expansions and maybe start yylex over. Don't check
TEMPLATE_EXPANSION_NAME_P; a proper name transformation system
will eliminate conflicts. Try for SCOPED_TYPENAME with PTYPENAME
Wed May 29 11:48:34 1991 Richard Stallman (rms at
* cccp.c (do_include): Check that ->control_macro is non-zero.
* gcc.c (process_command): Use `error' in last change.
Wed May 29 11:10:12 1991 Tom Wood (wood at
* (movdi): Accept CONST_INT.
* out-m88k.c (output_load_const_dimode): Accept CONST_INT.
(output_call): Don't use #plt for jsr.
Wed May 29 00:51:36 1991 Michael Tiemann (tiemann at
* cplus-type2.c (build_functional_cast): Give error if functional
cast is missing argument.
* cplus-tree.h (interface_unknown): Add a declaration for this
* cplus-type2.c (store_init_value): Normally initialized PIC data
must be laid into the text segment and then copied into the data
segment. But cecause of special things we do for ctors and dtors
(the only things that can reference such things), we can leave
vtables in initialized data space.
* cplus-decl.c (finish_decl): Use #pragma interface knowledge if
available for processing initialized variables of type const.
Tue May 28 18:39:20 1991 Richard Kenner (kenner at
* sched.c ({true,anti,output}_dependence): Correct MEM_IN_STRUCT_P
code; only avoid conflict if MEM_IN_STRUCT_P ref has varying address.
* protoize.c (stat): Remove declaration of stat; it is defined
differently (no const in arg 1) on some machines.
* combine.c (simplify_shift_const): Avoid infinite loops by quitting
when COUNT becomes zero; delete now-unnecessary tests on COUNT.
* flow.c (last_mem_set): New variable.
(propagate_block): Initialize it.
Show calls can change memory.
(insn_dead_p): Remove unneeded arg STRICT_LOW_OK; don't treat
All callers changed.
If insn stores into the same, nonvolatile, MEM as recorded in
last_mem_set, it is dead.
(mark_set_1): If writing into register mentioned in last_mem_set or
writing into memory, clear last_mem_set.
Record last MEM written.
(find_auto_inc): New function, from mark_used_regs.
Add support for pre-increment and pre-decrement.
(mark_used_regs, case MEM): Clear last_mem_set.
Call find_auto_inc; move code to there.
(mark_used_regs, case SET): Don't call recursively on MEM if it is
SET_DEST, instead call find_auto_inc ourselves.
Tue May 28 17:29:52 1991 Micheal Tiemann (tiemann at
* gnulib1.c (__fixsfsi, __cmpsf2, __extendsfdf2): Add declarations
for intify.
* gcc.c (default_compilers): Accept `.cxx' as a C++ extension.
Tue May 28 17:05:28 1991 Tom Wood (wood at
* (movstrsi): Pass original MEM expressions.
* out-m88k.c (expand_block_move, block_move_{sequence,no_loop,loop}):
Use original MEM expressions to set RTX_UNCHANGING_P, MEM_VOLATILE_P,
* out-m88k.c (emit_bcnd): Use bxx when optimizing so jump_optimize
will work on more cases. Change this back when jump_optimize uses
get_condition to find the values being compared.
* Don't use operand0 or operand1.
Tue May 28 16:00:56 1991 Micheal Tiemann (tiemann at
* emit-rtl.c (try_split): Make sure `after' exists before checking
to see if it is a BARRIER.
Tue May 28 15:08:44 1991 Richard Stallman (rms at
* gcc.c (process_command): Warn if -x follows last input file.
* cccp.c: Don't include file twice if a #ifndef would make it a no-op.
(struct file_name_list): New field, control_macro.
Initialize it where these structures are created.
(struct if_stack): Likewise.
(do_include): If file already known, check its control macro if any.
Don't include the file if the macro is now defined.
(do_xifdef): Detect case of successful #ifndef at start of file.
(condition_skip): Accept macro name as new arg. Record in if_stack.
(do_endif): Detect being effectively at end of file.
(record_control_macro): New function. Called from do_endif.
* calls.c (store_one_arg): Set used after calling push_rounding.
* (floating move peepholes): Allow `r' for operand 2.
*, tm-arm.h, out-arm.c, xm-arm.h: New files.
* configure (arm): New alternative.
Tue May 28 11:53:21 1991 Michael Meissner (meissner at
* tm-decstatn.h (CPP_PREDEFINES): Add Ultrix 4.2 support.
* tm-mips.h (cmp_type, branch_cmp, branch_type): Global variables
and type to record what type of comparison is being done.
(mips_print_operand_punct): New array to specify whether a
character is valid for print_operand as punctuation.
(set_nomacro, set_noat, set_noreorder): New variables to record
whether a .set nomacro, .set noat, or .set noreorder has been
(dslots_{filled,total}_{load,jump}): New global variables to
remember how many delay slots exist and are filled for the -mstats
(CC1_SPEC): Combine %{O:...} %{O*:...} cases. For -G32, pass -G
32. Add dummy pattern for -save-temps to avoid error message.
(DBX_DEBUGGING_INFO): Define this all the time.
(TARGET_SWITCHES): Add -mstats to print interesting statistics.
Add -mmemcpy to force memcpy to be called. Add -mdebug[fghij].
Add -mno- version of switches.
(DATA_ALIGNMENT): Align all char/short arrays/unions/structures,
rather than just char arrays.
(CONST_OK_FOR_LETTER_P): 'N' returns true if power of 2.
(EXTRA_CONSTRAINT): Redefine 'Q' to be 1 word memory references,
'R' to be multiword memory references.
(struct frame_info): Add initialized field.
(current_frame_info): New global structure to hold frame info.
(INITIAL_FRAME_POINTER_OFFSET): Use current_frame_info.
(INIT_CUMULATIVE_ARGS): Pass LIBNAME to init_cumulative_args.
(DELAY_SLOTS_FOR_EPILOGUE): Define this to fill j $r31 delay slot.
(ENCODE_SEGMENT_INFO): Don't flag references to 0-sized arrays as
being in the small data segment.
(CONST_COSTS): Reword to be more accurate.
(RTX_COSTS): Define this.
(ADDRESS_COST): Define this.
rtx_classify to classify various comparison operators.
(FINAL_PRESCAN_INSN): Define this to collect info for -mstats.
(NOTICE_UPDATE_CC): Only do CC_STATUS_INIT if the insn is a
(EXTRA_CC_MODES): Define new modes CC_EQmode, CC_FPmode, CC_0mode.
(EXTRA_CC_NAMES): Define this.
(SELECT_CC_MODE): Define this.
(PRINT_OPERAND_PUNCT_VALID_P): Redefine this to index into
(DBR_OUTPUT_SEQEND): Reset .set reorder, .set macro as appropriate.
* out-mips.c (branch_cmp, branch_type): New Global variables
and type to record what type of comparison is being done.
(mips_print_operand_punct): New array to specify whether a
character is valid for print_operand as punctuation.
(set_nomacro, set_noat, set_noreorder): New variables to record
whether a .set nomacro, .set noat, or .set noreorder has been
(dslots_{filled,total}_{load,jump}): New global variables to
remember how many delay slots exist and are filled for the -mstats
(reg_or_0_operand): Rewrite to add support for CONST_DOUBLE.
(mips_const_double_ok): Allow normal FP constants (not Infinity,
Nan, etc) to be used as operands when using the MIPS assembler.
(simple_memory_operand): Combine GP memory references from
gp_memory_operand. Delete gp_memory_operand.
(equality_op): Return true if EQ or NE.
(cmp_op): Return true if comparison operator.
(uns_cmp_op): Return true if unsigned comparison.
(mips_move_1word): New name for mips_move_instructions. Also, loads
of HImode/QImode use unsigned loads, rather than signed loads, so
that BYTE_LOADS_ZERO_EXTEND can be defined. Use %z to get name of
$0, instead of hardwiring it. Explicitly use lui where appropriate.
(mips_move_2words): New name for mips_move_2words_instructions. Use
%z to get name of $0, instead of hardwiring it.
(mips_address_cost): New function to define ADDRESS_COST macro.
(gen_conditional_branch): New function to generate all of the tests
and branches.
(block_move_sequence): New function to generate straight line code
for block moves.
(block_move_call): New function to set up a call to memcpy/bcopy as
appropriate for block moves.
(expand_block_move): New function which is called from the movstrsi
define_expand, to set up block moves. At present, unless -mmemcpy
is used, moves of less than 32 bytes, get straight line code, all
others get a call.
(init_cumulative_args): Take libname as third argument.
(function_arg_partial_nregs): Fix bug, to not return a negative
number when passing small structs in registers.
(compare_collect, compare_restore): Remove these functions, since
they are no longer called.
(override_options): Initialize mips_rtx_classify for all of the
comparison operator bits. Initialize mips_print_operand_punct to
return TRUE for each of the valid punctuation characters used in
(print_operand): %X now prints 32 bit ints in hex format. %z now
prints $0 if the operand is the constant integer 0. %(, %) now turn
on/off both .set noreorder/.set nomacro. %<, %> turns on/off .set
nomacro. %* turns on both .set noreorder and .set nomacro if
filling delay slots. %! turns on .set nomacro if filling delay
(compute_frame_size, save_restore, function_prologue,
function_epilogue): Change the calling sequence of
compute_frame_size to save everything in a global structure, which
has an initialized field to indicate that compute_frame_size needs
to be called.
(function_prologue): INIT_CUMULATIVE_ARGS now takes 3 args.
(function_epilogue): If current_function_epilogue_delay_list is
non-null, use that to fill the final delay slot. Also, make sure
the various asm .set's are reset properly. Write interesting
statistics out to stderr if -mstats.
(mips_epilogue_delay_slots): New function to return # of delay slots
the epilogue needs.
(null_epilogue): Return true if the function has a null epilogue,
which allows the optimizer to omit jumps to the final j $31 if no
stack was created.
* (type attribute): Redo how the type attributes work, and
change some names.
(mode attribute): New attribute to describe the insn's result mode.
(length attribute): New attribute to give insn length in words.
(dslot attribute): New attribute to return whether an insn needs a
delay slot.
(define_delay): Use dslot and length attributes to determine if a
delay slot is needed.
(define_function_unit): Define all of the function units now.
(all patterns): Provide new attribute definitions.
(all memory reference patterns): modify alternatives to use 'Q' for
1 word instructions, 'R' for multiword instructions.
(unnamed patterns): Provide names for all patterns, so that -dp will
pinpoint exactly which pattern is used.
(*divsi3, *divmodsi4, *modsi3): If optimizing and not -mdebugc, use
the *divmodsi4 patterns, so that the opimizer will only use 1 divide
if doing a = b / c; d = b % c; This replaces the peepholes, which
previously were used for this. If not optimizing, use the normal
div/mod patterns.
(zero_extendqihi2, extendqihi2): Allow zero/sign extending from
(fixuns_trunc{df,sf}si2): Use generator patterns to generate
appropriate branches.
(movsi_ulw, movsi_usw): New patterns to generate the appropriate
unaligned load/store for use in the block move expansion.
(mov*): Provide all possible combinations of moves.
(movstrsi): New pattern to generate block moves.
(negsi2): Change to a define_expand, which uses minus.
(one_cmpsli2): Change to a define_expand, which use the nor pattern.
(cmp*, b*): Redo comparison/branch completely to save things in
global variables, call the common C code to expand the branch, and
provide match_operators to do the actual branch.
(s*): Provide for the ability to set a register with an integer
comparison, without using a branch.
* make-decrose (AUX_OUTPUT2): Delete macro, since aux-output.c is
always compiled separately now.
(LANGUAGES): Suppress G++, Objc temporarily.
(cse.o): Rebuild cse if the config files change, to get new cost
functions, no longer rebuild calls/function since the FUNCTION_ARG
macros just call functions in out-mips.c.
(SRCS): Change $(AUX_OUTPUT2_SRC) to aux-output.c.
* make-mips (AUX_OUTPUT2): Delete macro, since aux-output.c is
always compiler separately now.
(CONFIG2_H): Add rules to rebuild selected modules when the
tm-mips.h file changes.
(mips-tfile): Rules to build mips-tfile.
(mips-tdump): Rules to build mips-tdump.
(LANGUAGES): Suppress G++, Objc temporarily, build mips-tfile.
* mips-tfile.c (whole file): New file to put the MIPS specific debug
information into the object file, after the assembler has been run.
This is needed because the MIPS assembler provides no method of
setting up the debug information for local variables. This is
enabled by the make-mips Makefile modifier.
* mips-tdump.c (whole file): New file to dump the contents of the
MIPS ECOFF symbol table in a symbolic format. This is not currently
built by default, but make-mips contains rules to build it.
* tm-decrose.h (MD_EXEC_PREFIX): Change to use the test prefix
/usr/ccs/gcc-2.00/gcc- instead of the release prefix /usr/ccs/gcc.
(WCHAR_TYPE_SIZE): Define as 16.
(WCHAR_UNSIGNED): Define as 1.
(DBX_DEBUGGING_INFO): Define moved to tm-mips.h.
Tue May 28 06:26:44 1991 Richard Kenner (kenner at
* expmed.c (store_bit_field, extract_bit_field): If -fforce-mem
specified, copy OP0 into register (and back again, for store).
* sched.c (memrefs_conflict_p, {true,anti,output}_dependence): Add
missing parens.
* reload.c (find_reloads): Turn usage of reg_preferred_class back on
now that the code has been refined.
Mon May 27 12:41:14 1991 Richard Stallman (rms at
* c-typeck.c (build_binary_op_nodefault): Set converted for shifts,
so op1 is not converted to the result type.
Clean up some warning messages.
* expr.c (expand_expr): Use temp stack slot for BLKmode SAVE_EXPR.
* (alloca.o): Use new vars ALLOCA_FLAGS and ALLOCA_FINISH.
Mon May 27 05:42:20 1991 Richard Kenner (kenner at
* sched.c ({read,true,anti,output}_dependence): Remove unused arg INSN.
All callers changed.
* combine.c (subst, case PLUS): Fix typo in (plus (plus X C) Y) case.
(subst, case MULT): Distribute MULT over PLUS to try to simplify it.
Mon May 27 05:15:16 1991 Michael Tiemann (tiemann at
* tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): Don't accept a SYMBOL_REF
sum if FLAG_PIC is not 1. This forces the -fPIC to take effect,
even when the optimizer knows how to stitch together HIGH and LO_SUM
(PRINT_OPERAND): Move body to out-sparc.c.
* out-sparc.c (print_operand): New function, implementing actions of
old PRINT_OPERAND macro. Comments written for all cases.
(reg_unused_after): Don't do anything special with JUMP_INSNs. Only
do something special with CALL_INSN if REGNO is a call-used reg.
* cplus-type2.c (store_init_value): Back out 23 Feb change, which
was completely backward.
* dbxout.c, cplus-dbxout.c (dbxout_parms): Also test that TREE_TYPE
* cplus-init.c (build_up_reference): Check FLAGS parameter to see if
we can accept building a reference to a constructor-generated
(various places): Change calls to `build_up_reference' that used to
use an explicit `1' to use LOOKUP_PROTECT instead.
(build_offset_ref): Use IDENTIFIER_TYPE_VALUE macro to the the type
associated with CNAME.
* cplus-class.c (build_vbase_path): Fix 11 May change by only
changing TREE_TYPE (EXPR) if NULL_EXPR. We might build different
vbase paths for the same expr in multiple inheritance
* Change sed script so it matches '^# ' instead of just
'^#'. This allows processing of md files with #if/#endif controls
in their C function bodies.
* cplus-tree.c (build_cplus_new): Set TREE_SIDE_EFFECTS on RVAL.
* stmt.c (warn_if_unused_value): Don't warn about EXIT_EXPRs.
(expand_decl_cleanup): Add missing type declarations for parameters.
* cplus-call.c, cplus-class.c, cplus-dbxout.c, cplus-edsel.c: Include
stdio.h after cplus-tree.h since the latter references printf.
* cplus-search.c, cplus-xref.c: Likewise.
* cplus-class.c (prev_class_type): Not static; defined in cplus-tree.h.
* cplus-decl.c (builtin_function, auto_function): Don't put & in
front of function name.
* cplus-typeck.c (comptypes,comp_target_types): Likewise.
* cplus-search.c (report_ambiguous_mi_virtuals): Likewise, for arrays.
Sun May 26 22:47:35 1991 Michael Tiemann (tiemann at
* cplus-decl.c (make_temporary_for_reference): New function. Split
out code from `grok_reference_init' so we could call it in two
places: where it was called before, and when initializing a
reference through a constructor for a temporary.
(grokdeclarator): Give error message instead of aborting if user
gave method qualifiers for function decl.
(start_function): Switch to temporary obstack before computing
destructor and constructor labels, and before building the
function's RESULT_DECL.
* cplus-decl.c (store_parm_decls): Make a cleanup that controls the
action of the garbage collector. This ensures that the call to
__gc_pop doesn't get skipped in the function issues a return stmt.
* cplus-gc.c (expand_gc_prologue_and_epilogue): Work with new
cleanup model.
* cplus-gc.c (build_i_desc): Figure out whether the i_desc should
constitute a defn of its type or not.
* cplus-typeck.c (c_expand_return): Look through TARGET_EXPR as well
as NEW_EXPR for returning addresses of local variables.
* reload.c (find_reloads): Intialized `goal_alternative_swapped'
where `swapped' is initialized to zero.
Sun May 26 21:29:26 1991 Richard Stallman (rms at
* recog.c (const_double_operand): Fix typo.
* reload1.c (choose_reload_regs): Fix typo--swap #endif with }.
* loop.c (init_loop): Multiply copy_cost by 2.
(general_induction_var): Use rtx_cost directly.
(expr_benefit): Function deleted.
* (andsi3): Generate bclr if appropriate.
* cccp.c (do_undef): Just a warning, if deleting something unusual.
Sun May 26 18:51:33 1991 Jim Wilson (wilson at
* expr.c (force_operand): When calling recursively, use
a temporary to force evaluation of calls. The C language
allows `f (g (x), g (y))' to be evaluated in different orders
on different hosts, which could lead to different code
generation for different hosts.
* recog.c (const_double_operand): New function for recognizing
* expmed.c (expand_mult_add): Add new parameter TARGET which is a
suggestion of where to store the result; pass it to expand_expr.
* loop.c (emit_iv_add_mult): Pass REG to expand_mult_add call as
target for the result.
*,, Delete obsolete UMULT patterns.
* expmed.c (expand_mult): Convert DImode constants to a CONST_INT
if possible, so that multiplies by these can be optimized by the
existing code.
Sun May 26 00:59:42 1991 Richard Stallman (rms at
* gcc.c (process_command): -save-temps is always valid.
* varasm.c (output_constructor): Don't crash if val == 0.
* cse.c (refers_to_mem_p): Handle constant addresses.
* cccp.c (main): Don't store thru last_include if null.
Sat May 25 06:33:19 1991 Richard Kenner (kenner at
* reload.c (find_reloads): Don't assume we have at least two operands
when we check for a simple copy.
* sched.c (update_reg_known_value): Deleted.
(init_alias_analysis): If have REG_EQUIV note, can always use NOTE's
value irrespective of number of sets.
Take known value from note, not SET_SRC.
(memrefs_conflict_p): Remove gotos.
ASHIFT can't occur in an address.
(true_dependence, anti_dependence, output_dependence): Take into
account the fact that a MEM_IN_STRUCT_P reference cannot conflict
with a non-MEM_IN_STRUCT_P reference at a fixed address.
Fri May 24 11:34:39 1991 Richard Stallman (rms at
* (cplus-tab.c): Put back -d option.
Fri May 24 06:46:07 1991 Richard Kenner (kenner at
* rtl.c (rtx_alloc): Ensure we keep the obstack aligned.
Fri May 24 00:17:13 1991 Richard Stallman (rms at
* reload1.c (choose_reload_regs): Try with inheritance, then without.
#if 0 the code to avoid inheritance in certain cases.
Fri May 24 00:13:40 1991 James Van Artsdalen (james at
* out-i386.c (split_di): Check for CONST_DOUBLE before CONSTANT_P.
* tm-i386.h (LIMIT_RELOAD_CLASS): new macro.
(PREFERRED_RELOAD_CLASS): a CONST_DOUBLE can appear in narrower
classes than GENERAL_REGS.
* reload.c (push_reload): Limit reload class even if the SUBREG has
already been stripped.
Thu May 23 11:08:21 1991 Jim Wilson (wilson at
* sched.c (schedule_insns): Don't schedule a block if the only insn is
Thu May 23 07:54:57 1991 Richard Kenner (kenner at
* reload1.c (choose_reload_regs): Process reload in first pass if
a subsequent reload requires fewer registers.
Change criteria for processing from being a strict superset to
having an intersecting, non-equal class.
Ignore optional and turned-off reloads in loop to see what is forced
to be allocated in first pass.
* toplev.c (compile_file): Fix typo in length of string to allocate
for sched2 dump's name.
* jump.c (find_cross_jump): Don't crash if single_set returns 0.
* recog.c (general_operand): A SUBREG of a constant is never valid.
* local-alloc.c (qty_compare, qty_compare_1): Make priority function
the same as in global-alloc: quantities with shorter lives are
allocated first. This can speed up some code by a factor of three.
Wed May 22 17:40:49 1991 Richard Kenner (kenner at
* reload1.c (emit_reload_insns): Fix some minor bugs in making
REG_DEAD notes and recording insn that does store; code sometimes
assumed that each call to gen_move_insn produced at most one insn.
Wed May 22 16:51:53 1991 Richard Stallman (rms at
* reload.c (push_reload): Support LIMIT_RELOAD_CLASS.
Wed May 22 14:14:51 1991 Micheal Tiemann (tiemann at
* jump.c (jump_optimize): Update the three simplifications that
start with the "if (...) x = 1;" case. Add comments explaining how
to make them more machine independent, and comments explaining how
they might fail in the future. Ifdef out the second case, and add
code explaining why it does not work.
* rtl.h: Put definition of FUNCTION_FLAGS_USES_CONST_POOL here.
* integrate.c: Remove definition of it here.
* integrate.h: New fields in struct inline_remap, min_insnno and
max_insnno, which indicate the range of insns covered by insn_map.
* integrate.c (expand_inline_function): Set min_insnno and max_insnno.
Wed May 22 12:31:53 1991 Richard Stallman (rms at
* tm-vaxv.h (ASM_OUTPUT_LOCAL): Use data_section.
* protoize.c (fancy_abort): Define it.
* objc-parse.y (yyprint, set_yydebug): New functions.
* tree.h (gettags, get_permanent_types, get_temporary_types):
Declare them.
* (protoize.o, unprotoize.o):
Use the standard flags and include dirs. Don't use -Wall.
* protoize.c (abort): Declaration deleted.
* cccp.c (main): Ensure `next' field in directory list is initialized.
Wed May 22 09:27:49 1991 James Van Artsdalen (james at
* expmed.c (synth_mult): Return cost of -1 if shift is too
Wed May 22 07:53:52 1991 Michael Tiemann (tiemann at
* out-sparc.c (output_move_double): More SImode->Pmode fixes.
Wed May 22 02:43:02 1991 Micheal Tiemann (tiemann at
*, emit-rtl.c, explow.c, final.c, global-alloc.c,
gnulib2.c, hard-reg-set.h, regclass.c, reload1.c, cccp.c: Fix typos
and indentation.
Wed May 22 00:14:37 1991 Richard Stallman (rms at
* combine.c (try_combine): Add to last change; handle subreg
in src as well as in dest of i3.
Tue May 21 22:32:08 1991 Richard Kenner (kenner at
* (dbra): Rewrite pattern so it reflects simplifications that
combine will make.
Tue May 21 10:44:05 1991 Jim Wilson (wilson at
* loop.c (strength_reduce): When a loop-vtop note is encountered,
reset `not_every_iteration'.
Tue May 21 00:17:31 1991 Richard Stallman (rms at
* c-decl.c (init_decl_processing): Always use long type for size_t.
* varasm.c (assemble_variable): Use ASM_DECLARE_OBJECT_NAME.
* protoize.c: Include config.h.
(chmod, kill): Declarations deleted.
They aren't needed, and can conflict with system headers.
(wait): BSD declaration deleted.
(save_def_or_dec): Add missing fprintf arg.
* tm-next.h (EXTRA_FORMAT_FUNCTIONS): Fix typo.
* protoize.c: Use USG and VMS as most files do.
Don't expect BSD to be necessary defined outside this file.
Define getwd using getcwd, not vice-versa, to be like dbxout.c.
* cccp.c, SYSCALLS.c: Use USG and VMS as most files do.
Don't expect BSD to be necessary defined outside this file.
Mon May 20 16:54:17 1991 Richard Stallman (rms at
* tm-i386.h, tm-att386.h, tm-bsd386.h, tm-sun386.h (ASM_BYTE_OP):
Renamed from ASM_BYTE.
* varasm.c (ASM_BYTE_OP): Likewise.
* c-decl.c, cplus-class.c (finish_struct): Typo:
* gcc.c (handle_braces): Don't deref input_suffix if null.
Mon May 20 15:19:27 1991 Michael I Bushnell (mib at
* cccp.c (pcfinclude): STRINGDEF struct is now longword aligned.
Mon May 20 14:26:18 1991 Michael Tiemann (tiemann at
* Remove all arithmetic, logical, and shift patterns for
sub-SImode operands. Also fix some DImode patterns.
* out-sparc.c (emit_move_sequence): Simplified considerably.
* rtl.c (rtx_alloc): Inline-code an optimized obstack_alloc.
* cplus-lex.c (make_{pointer,reference}_declaration): Call
`build_parse_node' instead of `build1' so memory can be freed.
* cplus-parse.y: Remove unneeded epsilon rules to produce an average
15% reduction in the number of reductions performed.
* cplus-parse.y (RETURN_INIT): Use new interface to speed up
* cplus-decl.c (store_return_init): Use new interface.
Mon May 20 11:16:34 1991 Jim Wilson (wilson at
* sched.c (schedule_block): A register which dies in a CALL_INSN
does not cross calls. A single insn block must be scheduled, to
ensure that register lifetime info is corrected updated.
Mon May 20 06:50:37 1991 Richard Kenner (kenner at
* combine.c (try_combine): Don't combine when I1 and I2 both feed
into I3 and I1 uses the register set in I2.
* reload.c (find_reloads): Prefer pseudos over other things we may
Mon May 20 02:02:15 1991 Richard Stallman (rms at
* combine.c (try_combine): Test MODES_TIEABLE_P when i3 src is subreg.
* (trunc*): Don't set cc if use wider insn.
Sun May 19 14:45:46 1991 Ron Guilmette (rfg at
* (clean): Delete stage1...stage4.
(realclean): Delete cexp.output.
* fixincludes: Handle BSD43__IO* and BSD43_CTRL like IO* and CTRL.
Sun May 19 15:00:05 1991 Richard Stallman (rms at
* reload1.c (count_possible_groups): New function.
(reload): Call it twice. This checks for possible groups
after maybe spilling some single regs.
* configure (magnum, m3230): Aliases for mips/mips.
* fixincludes (machine/cpu.h):
Create in proper dir. Fix mips/cpu.h too.
* reload.c (find_reloads): Turn off usage of reg_preferred_class.
Sun May 19 09:51:24 1991 Richard Kenner (kenner at
* flow.c (mark_used_regs): Continue putting REG_DEAD notes on
fixed registers.
* regclass.c (reg_class_record): Don't count classes in which objects
won't fit.
* reload.c (find_reloads): Pre-compute preferred classes for each
operand; if operand 1 is copied to operand 0, merge the classes.
REJECT is now only 1/3 as costly as LOSERS; ? adds 3 to REJECT so
that it's semantics don't change.
* expr.c (compare_from_rtx): Do EQ and NE comparisons unsigned since
they are usually cheaper and will cse with comparisons against zero
which are already unsigned.
* reload1.c (choose_reload_regs): Don't try to access reload_out
for disabled reload (reload_strict_low may not have been cleared).
* reload1.c (choose_reload_regs): Don't let optional reloads inherit
spill regs until all non-optional reloads have been allocated spill
We can use find_equiv_reg even if must_reuse, we just can't get a
spill reg that way.
* expr.c (do_tablejump): When using LABEL_REF in arithmetic, make it
in Pmode instead of VOIDmode.
* function.c (fixup_var_refs_1): Don't try to make paradoxical
memory SUBREGs; instead keep SUBREG_REG a pseudo and copy between
memory and the pseudo.
(fixup_memory_subreg): Abort if we try making paradoxical SUBREGs.
* reorg.c (redundant_insn_p): Insns we pass may reference resources
set by INSN; it is sufficient that they not set resources in INSN.
Sun May 19 08:06:17 1991 Michael Tiemann (tiemann at
* tm-sparc.h (STRUCT_VALUE): Change SImode to Pmode here, and in
other places.
(FIRST_PARM_OFFSET): Change 4 to UNITS_PER_WORD here, and in other
(ROUND_ADVANCE): New macro to compute how far to advance the arg
pointer for a give parameter.
(FUNCTION_ARG): Use PARM_BOUNDARY instead of 32.
(EXTRA_CONSTRAINT): Don't depend on `reload_completed'.
* (various places): Change many DImode predicates from
`general_operand' to `register_operand'.
* jump.c (find_cross_jump): Fixed 18 May change to use
`validate_change' to make sure we get valid, initialized values
regardless of which path we choose.
Sat May 18 15:07:29 1991 Richard Stallman (rms at
* gnulib1.c: Rename SFVALUE to FLOAT_VALUE_TYPE.
(union flt_or_value): New type.
(*): Use that instead of flt_or_int in most places.
Delete some variables `intify' that aren't needed.
* tm-i386.h: Rename SFVALUE to FLOAT_VALUE_TYPE.
* stor-layout.c (layout_record): BITFIELD_NBYTES_LIMITED now 1 or 0.
* rtl.h (struct rtx_def): Drop SHORT_ENUM_BUG; keep ONLY_INT_FIELDS.
* loop.c (add_cost, copy_cost):
Variables replace old macros *_BENEFIT and COPY_PENALTY.
(init_loop): New function to set the variables.
(expr_benefit): Use rtx_cost.
* toplev.c (compile_file): Call init_loop.
* cse.c (rtx_cost): Treat mult by 2**n as a shift by default.
* toplev.c (output_file_directive):
* gnulib2.c [L_trampoline]: Rename function to __trampoline.
Always compile it even if empty. Make it global.
Sat May 18 14:11:37 1991 Richard Kenner (kenner at
* reload.c (find_reloads): Remove unnecessary test when increasing
cost of alternative due to non-preferred register class.
* reload1.c (choose_reload_regs): Fix typo.
* tm-rs6000.h: Add hard registers for the 8 CR fields; add classes
Don't use CC0; add CCUNSmode and CCFPmode.
(FIXED_REGISTERS): r31 (fp) is no longer fixed.
(REG_CLASS_FROM_LETTER): Remove 'd' for GENERAL_REGS; 'r' already
means this.
(CONST_DOUBLE_OK_FOR_LETTER): If we can move a constant in two insns
for DF or one insn for SF, let it match 'G'.
(SECONDARY_RELOAD_CLASS): Define this new macro.
(FUNCTION_ARG): Fix typo in testing nargs_prototype.
(LEGITIMATE_CONSTANT_P): Always return 1.
* Don't use CC0; instead use a pseudo which will be assigned
to CR_REGS or CR0_REGS. Make variants of arithmetic insns that
set only the condition code and that set both the condition code
and a normal result.
Delete "cc" attribute and add "type" attribute.
Define delays for cc-setting insns and for loads.
Replace `d' constraint with `r'.
Delete patterns for HImode and QImode arithmetic operations.
Handle putting "easy" DFmode or SFmode constant into a register.
Rework compare and branches; add scc insns.
Fix up decrement-and-branch insns, but they still won't be used yet.
(call insns): Use pseudo for "lr" in indirect calls.
(movdf, movsf): Explictly handle need to use memory to copy between
general and FP registers.
* out-rs6000.c (next_insn_tests_no_unsigned, unsigned_comparisons_p):
(update_cc): Likewise.
(gen_reg_operand): Tighen up a bit.
(cc_reg_operand, reg_or_u_short_operand, easy_fp_constant): New fns.
(fp_reg_or_mem_operand, mem_or_easy_const_operand): Likewise.
(call_operand): Accept pseudo register.
(branch_comparison_operator, scc_comparison_operator): New functions.
(secondary_reload_class, ccr_bit, must_save_cr): Likewise.
(print_operand, case 'w', 'u'): Support CONST_DOUBLE.
(print_operand, cases 'W', 'f', 'F', 'R', 't', 'T', 'C', 'D'):
New cases.
(print_operand, cases 'j' and 'J'): Now use for bit number in CCR.
(output_{pro,epi}logue): If we call function to save/restore fpr's,
we need to save/restore LR.
Save CR if we modify the call-saved fields.
* Delete HImode and QImode arithmetic operations.
(swapxi): Delete; obsolete and never used.
* tm-a29k.h (TARGET_SWITCHES): Change -mnodw to -mndw.
Add -m{no-,}reuse-arg-regs.
(SECONDARY_RELOAD_CLASS): Provide a definition for this new macro.
* Delete all HImode and QImode arithmetic operations.
* out-a29k.c (secondary_reload_class): New function.
(incoming_reg): Look at TARGET_NO_REUSE_ARGS.
* reload1.c (eliminate_regs): Don't remove a PLUS unless inside an
address since it would need to change INSN_CODE and can't do it here.
* reorg.c (uid_to_ruid, max_uid): New vars.
(mostly_true_jump): Refine prediction slightly.
Use uid_to_ruid map to accurately see if branches are backward.
(relax_delay_slots): Pass condition to mostly_true_jump.
(dbr_schedule): Allocate and build uid_to_ruid map.
Sat May 18 12:54:45 1991 Richard Stallman (rms at
* cse.c (insert): "Unchanging" pseudos count as constant.
* tree.c (make_node): Rewrite end as a switch.
Sat May 18 03:51:06 1991 Michael Tiemann (tiemann at
* cse.c (FIXED_BASE_PLUS_P): Since this is used when called from
`expand_inline_function', also catch the case where the base
(simplify_binary_operation): In EQ and NE case, convert a COMPARE
operand to something we can optimize.
(refers_to_mem_p): Handle the case when `base' is a LO_SUM.
* integrate.c (FIXED_BASE_PLUS_P): Define this to recognize offsets
from the various virtual registers.
(expand_inline_function): Expand exprs using EXPAND_SUM so as to get
stack frame addresses instead of pseudos. This yields much better
cse (at little cost) for GNU C++. Also, test FIXED_BASE_PLUS_P as
an alternative to CONSTANT_P to record a known register value.
* jump.c (find_cross_jump): If we are processing a cross jump and
the insns fail to match, try looking for a REG_EQUAL note that makes
them equivalent insns. If found, keep going. This is important for
merging cleanup codes when one cleanup path gets frame address in a
register when the other path gets the frame address explicitly.
* cplus-init.c (build_delete): Fixed residual use of 1-based
indexing to use 0-based indexing instead.
* cplus-decl2.c (grokclassfn): Fix raeburn's May 12 change so that
destructors still have the same name.
* cplus-decl.c (decls_match): Remove dependence on MERGED.
* cplus-class.c (build_vbase_path): Fixed bug in computing offsets
for exprs which are FIXED_TYPE_P.
(build_vfn_ref): Change initializer for REF from 0 to NULL_TREE.
* cplus-decl.c (maybe_build_cleanup): Add LOOKUP_NONVIRTUAL to flags
argument in call to `build_delete' if DECL does not use virtual
baseclasses. If it does, we go through a function call to save
space, unless FLAG_EXPENSIVEO_OPTIMIZATIONS is nonzero. ??Better
approach is to know, in expand_cleanups, to clear `flag_no_inline'
during the cleanup's expansion.
* cplus-*.c (various places): Add LOOKUP_DESTRUCTOR to all places
where we know we are calling a destructor for a non-null object.
* stmt.c (fixup_gotos): Run destructors on cleanups that come
from the block being exited, in addition to any inner blocks
for which LABEL is now defined.
(expand_return): Take care of destructors that occur in the
current binding level.
(fixup_cleanups): If we emitted no insns, don't change *BEFORE_JUMP.
* rtlanal.c: Define `target_flags' here...
* toplev.c: ...not here. This enables us to link gen* programs
which might, through rtlanal.o, pull in references to `target_flags'
that are never used.
* function.c: Add declaration for `current_function_uses_const_pool'.
* expr.h: Add extern declaration for that variable.
* function.h (struct function): Add a slot named
`uses_const_pool' for `current_function_uses_const_pool'.
* function.c ({push,pop}_function_context): save and restore the
value of `current_function_uses_const_pool'.
* rtl.h (FUNCTION_FLAGS_USES_CONST_POOL): Defined to be 0200.
* integrate.c (initialize_for_inline):
FUNCTION_FLAGS_USES_CONST_POOL now contributes to the value of
(output_inline_function): Restore `current_function_uses_const_pool'
from `function_flags'.
(save_for_inline_copying): Only call `save_constants' if
`current_function_uses_const_pool' is nonzero.
(save_for_inline_nocopy): Ditto.
(save_constants): Tweaked to perform its treewalk faster. Notably,
it no longer accepts ptrs to NULL rtl. All callers changed.
* varasm.c (force_const_mem): Set `current_function_uses_const_pool'
if we create a constant pool reference.
* cplus-parse.y, c-parse.y: Add new function `set_yydebug'. If
YYDEBUG is defined, sets `yydebug' to VALUE. Otherwise, prints
warning that operation is invalid.
* toplev.c (main): Call `set_yydebug' instead of setting `yydebug'
directly. This allows user to turn YYDEBUG off for faster parsing.
* cse.c (simplify_binary_operation): Eliminate abort when passed
DImode operands.
Fri May 17 21:56:41 1991 Richard Kenner (kenner at
* hard-reg-set.h (reg_class_superunion): New var.
* regclass.c (init_reg_sets): Compute reg_class_superunion.
(reg_classes_intersect_p): New function.
* reload.c (find_reloads): Alternative is discouraged if it puts
a pseudo in a register class it doesn't prefer.
* reload1.c (basic_block_needs): Now an array, per register class.
(reload): Compute separate basic_block_needs for each class.
(spill_hard_reg): If pseudo is only in one block, see if that block
needs a spill register of a class containing the hard reg; leave the
pseudo alone if not.
* reload1.c (reload_mode, reload_nregs): New vars.
(reload_reg_class_lower): Use them.
(allocate_reload_reg): New function.
(choose_reload_regs): Track size and class of any groups. We
can inherit reloads if we are the size of the largest group or
if our class is disjoint from those needed for groups.
Try all inherits first before all spill register allocations
unless there is a later reload with a smaller class; call
allocate_reload_reg to do the actual allocation.
Use new vars above.
(emit_reload_insns): Delete output reload even if we weren't
storing to memory.
* reload.h (reload_secondary_reload, reload_secondary_p): New vars.
* reload.c (push_reload): If secondary reload register is needed,
make a secondary reload.
* reload1.c (reload): Reload with reload_secondary_p nonzero is in use.
(choose_reload_regs): Likewise.
(emit_reload_insns): Handle secondary reloads, when needed.
* reload1.c (reload): Add pass to remove death notes for things that
are no longer registers or don't die if we must preserve death notes.
(emit_reload_insns): Refine REG_DEAD notes to be more accurate; make
notes for secondary reloads.
* reload1.c (emit_reload_insns): Abort for output reloads for jumps;
we have to implement this at some point.
Fri May 17 20:08:22 1991 Richard Stallman (rms at
* protoize.c: Handle ultrix like BSD.
Fri May 17 15:56:41 1991 Richard Stallman (rms at
* Pass library function name to INIT_CUMULATIVE_ARGS.
* calls.c (expand_call): Pass extra arg to INIT_CUMULATIVE_ARGS.
* expr.c (emit_library_call): Likewise.
* function.c (assign_parms): Likewise.
* tm-*.h (INIT_CUMULATIVE_ARGS): Accept the extra arg.
(INIT_CUMULATIVE_INCOMING_ARGS): Likewise, just for symmetry.
Fri May 17 15:41:22 1991 James Van Artsdalen (james at
* tm-i386v4.h (ASM_OUTPUT_COMMON): Don't attempt alignment on a
three byte boundary.
Fri May 17 15:25:16 1991 Tom Wood (wood at
* function.c (assign_stack_local, assign_outer_stack_local): Make
the alignment in bytes.
Fri May 17 14:31:00 1991 Michael Tiemann (tiemann at
* cplus-class.c (build_vbase_path): Only build a COND_EXPR if
NONNULL is zero.
(resolves_to_fixed_type_p): Check TREE_HAS_CONSTRUCTOR for
* cplus-call.c (build_method_call): Add call to `constructor_name'
if BASETYPE changes.
* cplus-init.c (build_new): Add LOOKUP_NONVIRTUAL to FLAGS argument
to `build_method_call'. Constructors are never virtual. Also, set
TREE_HAS_CONSTRUCTOR bit for return value from `build_method_call'.
Thu May 16 21:36:10 1991 Richard Kenner (kenner at
* rtl.h (CONSTANT_P): Now true for a CONST_DOUBLE.
* combine.c, cse.c, emit-rtl.c, expr.c, integrate.c, loop.c:
Update for new meaning of CONSTANT_P to include CONST_DOUBLE.
* optabs.c, recog.c, reload.c, reload1.c, rtl.h, rtlanal.c:
*,, out-alliant.c, out-convex.c: Likewise.
* out-gmicro.c, out-i386.c, out-i860.c, out-m68k.c: Likewise.
* out-sparc.c, out-spur.c, out-tahoe.c: Likewise.
* combine.c (SUBST, SUBST_INT): If INTO equals NEWVAL, don't
record the substitution.
(try_combine, subst, make_compound_operation, simplify_and_const_int):
No longer need check for changes before using SUBST macro.
(simplify_shift_count): Likewise.
* integrate.c (copy_rtx_and_substitute, case CONST): If what
was originally a constant becomes something that is not a constant
when passed through a recursive call, return it without the CONST.
* rtl.c (copy_most_rtx): New function.
* rtl.h (copy_most_rtx): Declare it.
* function.c (fixup_var_refs_1, case MEM): If a MEM contains VAR,
ensure the MEM isn't shared by copying it.
* expmed.c (expand_divmod): If doing MOD, produce divide result
into unique pseudo so that we might CSE the division.
Thu May 16 12:01:42 1991 Richard Stallman (rms at
* reload.c (push_reload): Try find_dummy_reload before dead regs.
* function.c (assign_stack_local*): Use GET_MODE_ALIGNMENT.
Use CEIL_ROUND consistently.
Don't force word alignment even if STRICT_ALIGNMENT (experiment).
Thu May 16 10:31:04 1991 Jim Wilson (wilson at
* unroll.c (unroll_loop): Don't abort if start label does not
immediately follow LOOP_BEG note. This can happen as a result of
jump threading.
* reorg.c (mostly_true_jump): Eliminate repeated test in second loop.
* sched.c (priority): Abort if find a NOTE in a groups of insns that
must be scheduled together.
(free_pending_lists): New function. Moves every *_LIST rtx on the
pending lists to the free list.
(add_insn_mem_dependence): Get a *_LIST from the free list instead
of creating one if possible.
(sched_analyze_1): Don't move an insn across a call if it uses a
register that is not already live across calls.
(sched_analyze_insn): Likewise.
(sched_analyze_1): When flusing the pending lists, put the *_LIST
rtx on the free list.
(sched_analyze): Likewise.
(schedule_block): Likewise.
(sched_analyze_2): For a cc0 setter/user pair, put a copy of all
dependencies on the first insn onto the second insn.
(sched_analyze_insn): Likewise for call sequences.
(sched_analyze_insn): Handle REG_INC notes just like SETs.
(sched_note_set): Handle hard registers same as psuedo regs.
(attach_deaths): Likewise. Don't add REG_DEAD notes to the frame
pointer, arg pointer or stack pointer.
(schedule_block): Likewise.
(rank_for_schedule): Do not check whether each insn of a sequence
that must be scheduled together is ready. They will only reach here
if they are all already ready.
(schedule_block): After reload, don't need to give special treatment
to insns at function start which set up the function parameters.
Don't treat tail specially if it is part of a group that must be
scheduled together.
When a group of instructions is scheduled together, run the lifetime
analysis code on every instruction in the group from last to first.
A call_insn kills all call_used and global regs except those
explicitly used by the call_insn.
(schedule_insn): Initialize new variables. If USE_C_ALLOCA, free
alloced memory immediately after each schedule_block call, not once
at the end.
* rtl.c (add_dependence): When adding a dependence that points to an
insn that is part of a sequence that must be scheduled together,
make the dependence point to the last insn of the sequence instead.
Wed May 15 13:08:32 1991 Richard Kenner (kenner at
* combine.c (simplify_and_const_int): If we have
(and (OP (lshiftrt X Y) Z) C), for OP of IOR, XOR, and NOT, commute
OP and LSHIFTRT to put AND and LSHIFTRT adjacent to try to form
* combine.c (subst, gen_lowpart_for_combine, get_last_value_validate):
Use object's mode instead of VOIDmode when we make
(clobber (const_int 0)) in case someone uses the mode for significant
* rtlanal.c (side_effects_p): Reject non-VOIDmode CLOBBERs.
* rtlanal.c (reg_set_p_1): Remove test for `reg_set_reg' being MEM.
(reg_set_p): Abort if passed a MEM.
* toplev.c (strip_off_ending): Strip trailing ".f".
Wed May 15 12:54:18 1991 Michael Tiemann (tiemann at
* cplus-typeck.c (build_modify_expr_1): If the TREE_TYPE of the
recursive result is an ARRAY_TYPE, change it to void_type_node so
build_compound_expr doesn't lose when calling default_conversion.
* cplus-tree.h (lang_type): Remove AS_LIST field from lang_type.
Use TYPE_MAX_VALUE field of type instead.
* cplus-parse.y (LC): If we are not in temporary allocation, call
permanent_allocation. This frees up any PARM_DECL nodes that were
allocated since we processed an inline function. NOTE: we still
have to clean up these parms from inline functions that did not go
* cplus-decl.c (store_parm_decls): Since we no longer push an extra
binding level if ! PARMS_HAVE_CLEANUPS, test CLEANUP_LABEL to figure
out how far up the binding countours we must look.
(init_decl_processing): If FLAG_NO_INLINE is nonzero, set
* cplus-class.c (finish_struct_bits): Copy TYPE_MIN_VALUE and
TYPE_MAX_VALUE. These actually hold C++-related data that's moved
up from the lang_type data structure.
* cplus-*.c: Change REFERENCE_EXPR to CONVERT_EXPR. Set
TREE_REFERENCE_EXPR bit to indicate a CONVERT_EXPR that's really the
address of a C++ reference expression.
Wed May 15 12:30:26 1991 Richard Stallman (rms at
* tm-sparc.h (FIXED_REGISTERS): Register 0 is not fixed; it is used
for the condition code, not to represent the fixed %g0.
Tue May 14 18:59:06 1991 Jim Wilson (wilson at
* explow.c (find_next_ref): Start search at first insn after INSN.
* jump.c (jump_optimize): Update the three simplications that start
with the "if (...) x = 1; else {...} if (x) ..." case, so that when
HAVE_cc0 is not defined, they do not accept TST insns (which could
just be a register to register move). They should only accept insns
with the COMPARE operator.
Tue May 14 14:51:33 1991 Tom Wood (wood at
* cse.c (simplify_binary_operation): Don't abort when comparing
two CONST_DOUBLE values.
Tue May 14 11:35:47 1991 Richard Stallman (rms at
* c-common.c (decl_attributes): Fix typo in name of attribute.
It should be `aligned'. Also don't crash on unknown attribute.
* expmed.c (init_expmed): Make a separate object to free back to.
* hard-reg-set.h (HOST_BITS_PER_LONG_LONG): Provide default definition.
* toplev.c (main): Implement -gdwarf.
Tue May 14 06:32:48 1991 Richard Kenner (kenner at
* flow.c (mark_used_regs): Don't make REG_DEAD notes for fixed regs.
* combine.c (subst): Convert (not (ashift C X)) to (or (rotate ..))
and similarly for (not (lshiftrt C X)).
(make_field_assignment): Make corresponding change in how we recognize
bitfield assignment of single bit to zero.
* combine.c (merge_outer_ops): New function.
(simplify_shift_const): Use merge_outer_ops to generalize and
simplify handling of outer_ops.
Try using distributive law followed by invert distributive law
to simplify combinations of logical operations and shifts.
* emit-rtl.c (gen_highpart): Correct conditional that says when we
can get the bits of a DFmode object; copy from gen_lowpart.
* cse.c (simplify_binary_operation, case MULT): Simplify zero case.
(simplify_binary_operation, case DIV): In 0/x, return zero in proper
* combine.c (simplify_comparison): Can only extend comparison
to wider mode if equality comparison or test of sign bit.
Tue May 14 03:26:36 1991 Michael Tiemann (tiemann at
* cplus-tree.h (lang_type): Change to use TREE_VEC to hold basetype
Baseclasses are now counted [0..n) instead of [1..n].
* cplus-*.c (various places): Change code to work with new
representation for basetypes.
* toplev.c (main): Handle `-gdwarf' as a debug option.
* cse.c (insert): Treat pseudos marked RTX_UNCHANGING_P as being
Mon May 13 22:44:18 1991 Jim Wilson (wilson at
* In the div/mod peepholes, don't apply the peephole if the
first operation overwrites one of its two operands.
Mon May 13 12:14:51 1991 Richard Stallman (rms at
* expmed.c (store_bit_field, extract_bit_field):
Set volatile_p while checking predicates.
* recog.h (volatile_p): Declare it.
* explow.c (force_not_mem): Do nothing with BLKmode.
* SYSCALLS.c (u_int): Don't define on DGUX--already defined.
* (zero_extend*): Don't make the subreg in the template.
Make it explicitly, and handle subregs as operand 0.
* tm-convex.h (MODES_TIEABLE_P): Fix typos.
* loop.c (check_dbra_loop): To check for a loop with a `break', use
loop_number_exit_label, not the uid_luid of each label, since loop
unrolling may have created new labels with no uid_luid.
* expr.c (push_block): Fixed typo in last change.
Mon May 13 12:07:25 1991 Richard Kenner (kenner at
* combine.c (subst): If we can't change comparison code, see if
we can instead surround our operation with an XOR.
* combine.c (make_compound_operation, simplify_and_const_int):
Ensure shift counts are non-negative and in range before using them
to perform shifts.
(simplify_comparison): Likewise.
* combine.c (try_combine): See if we have previously merged a
compare and arithmetic operation. If so try to take it apart to
allow further combines (such as making a branch-and-decrement).
* combine.c (try_combine): Don't make VOIDmode register if our split
point is a constant.
* combine.c (subst): Use COMBINE_RTX_EQUAL_P to see if SET_DEST
is our register; two hard regs might have different rtx.
* combine.c (subst): Generalize associative law handling to
cases not involving constants.
* combine.c (expand_compound_operation): If we would return a
(clobber (const_int 0)), return what we were given.
* combine.c (simplify_shift_const): Clean up by removing fallthrough.
Mon May 13 10:26:00 1991 James Van Artsdalen (james at
* (all calls to output_move_double): call return
value to avoid spurious compiler warnings.
Allow REG in all alternatives of operand 0 where possible.
Remove patterns to recognize increment/decrement.
(addsi3, addhi3, addqi3): Do this in here instead.
(floatdidf2): New pattern.
(adddi3, subdi3, negdi2): New patterns.
(umulsi3, umulhi3): Remove obsolete UMULT patterns.
(divM3, udivM3, divmodM4, udivmodM4): Use "r" constraint instead
of "x" or "abc".
(sqrtsf2, sqrtdf2): New patterns.
(ashldi3, ashrdi3, lshldi3, lshrdi3): New patterns
(All shift and rotate patterns): Don't use reg name explicitly in
output string: use %N operand reference.
(ashlM3, lshlM3): Use `add' instead of `shl'/`sal' if possible.
(insv): Fix output constraint. Clarify source. Disable for now -
makes worse code.
(SImode bit test, all Scond patterns): Allow MEM operands too.
(seq, sne): Handle CC_Z_IN_NOT_C.
(jump, indirect_jump, tablejump): Align code on word boundary
after unconditional jumps.
(`loop' patterns): Delete - will never be useful on i386.
(call_pop, call_value_pop): New patterns.
(return): New pattern: Do `return' if simple epilogue. But only if
the real function epilogue isn't next.
(movstrsi): Do word moves, not just bytes, if count is unknown.
(ffsM2): New patterns.
* out-i386.c (FP_TOP, AT_SP, RET, RETCOM, POP_ONE_FP,
FP_CALL1, FP_CALL): Move to tm-i386.h for use by
(output_movf, fp_call_internal, output_fix_trunc, split_di):
No longer static - called from
(via_memory): Finish return value change.
(output_move_const_double): Delete unused function.
(simple_386_epilogue): New predicate.
(function_prologue): Allocate frame regardless of whether or not
there is a frame pointer.
Use output_asm_insn instead of fprintf to push registers.
(function_epilogue): Likewise.
If there is a frame pointer, don't necessarily fix %esp just to
pop a reg - use offset from frame pointer.
Fix -fomit-frame-pointer support.
Fix RETURN_POPS_ARGS case where args > 32K bytes.
(print_operand): A LABEL_REF gets an OFFSET_PREFIX too.
(print_operand_address): %esp can only be base reg, never index.
(split_di): New function.
* tm-i386.h: Remove references to obsolete tm-compaq.h file.
(TARGET_486): New flag.
(TARGET_SWITCHES): New options -m486, -mno486, -m386.
(all reg macros, ARG_POINTER_REGNUM): Create argument pointer,
to be eliminated in favor of %esp or %ebp.
(REGISTER_MOVE_COSTS): It is expensive to move between integer and
float registers.
(FP_REGNO_P): Detect only the FP regs.
(all class macros): Delete obsolete classes ABC_REGS & ABCI_REGS.
(REG_CLASS_FROM_LETTER): Add `S' for SIREG, remove `x' for ABCI_REGS.
(CONST_OK_FOR_LETTER_P): Add `J' for DImode shifts.
(FIRST_PARM_OFFSET): Offset now zero.
Use generalized scheme to eliminate frame and arg pointers.
(REG_OK_FOR_BASE_P): allow virtual arg pointer.
Moved here from out-i386.c for use by
* tm-compaq.h: Delete obsolete file.
Sun May 12 18:38:41 1991 Ken Raeburn (raeburn at
* cplus-decl.c (print_binding_level, print_binding_stack,
print_other_binding_stack): New debugging routines; dump one or
more binding levels to stderr.
* cplus-decl.c (push_to_top_level): New routine; saves copies of
all class and local bindings, and some other state, and clears the
real values, to effectively move to global scope.
(pop_from_top_level): Restore the saved state.
* cplus-decl.c (adjust_type_value): No longer static. Abort if
current_binding_level is class binding level; need to investigate
that situation further.
* cplus-decl.c (finish_function): Check that the binding level being
popped really is a function-parameter binding level.
* cplus-tree.h (DESTRUCTOR_DECL_PREFIX): Replaces
DESTRUCTOR_DECL_FORMAT; used as a prefix before the class name.
* cplus-decl2.c (grokclassfn): Use it, and call build_overload_name
rather than just copying the class name.
* cplus-method.c (fndecl_as_string): Use TREE_TYPE rather than
indirecting through type name and the identifier's associated type,
since the latter may have changed.
(build_nested_name): New argument, text_end; callers changed. Call
build_overload_identifier rather than copying class name.
(build_overload_value): Strip non-lvalue nodes for all arguments.
Fixed up the handling of negative DImode values.
(build_overload_identifier): New function. Copy class name (with
length) if non-template, or build a name from template parameters.
(build_overload_name): Call build_overload_identifier for class
* cplus-parse.y: Added comment about use of $$ for $1.
(template_type_name): Removed useless precedence specificiation.
(template_arg_list): Wrap TREE_LIST nodes around all arguments in
the list.
(template_arg): Call groktypename on type names. For expressions,
specify "UNARY" precedence.
(PRE_PARSED_CLASS_DECL handling): Put a copy of the new class decl
into global scope, to avoid recursive expansion, since we start in a
non-global scope set up for the parameters.
* cplus-pt.c (coerce_template_parms): New function. Converts
template arguments to appropriate types, returns a vector containing
(mangle_class_name_for_template): Removed nparms argument.
Changed to deal with arglist as vector. No longer call
groktypename. Some initial code added for PARM_DECL (non-type)
parameters; work not completed.
(lookup_template_class): Call coerce_template_parms. Removed some
unused code.
(push_template_decls, pop_template_decls): Fixed to deal with
arglist as vector. More code for non-type parameters.
(instantiate_template): Push to top binding level before pushing any
(end_template_instantiation): Pop from top level, then push the new
decl at top level.
* cplus-tree.h (struct lang_identifier): Renamed field "template" to
"class_template_info"; accessor macros changed.
* cplus-pt.c (struct template_info): Renamed from "template".
Removed unused fields.
Sun May 12 17:38:46 1991 Jim Wilson (wilson at
* unroll.c (copy_loop_body): Fix typo: had `==' for `='.
Sun May 12 17:05:07 1991 Richard Stallman (rms at
* genattrtab.c (gen_attr): Clear has_asm_insn field in new object.
Sun May 12 04:21:52 1991 Michael Tiemann (tiemann at
* hard-reg-set.h (HARD_CONST): New macro. Converts integer
constants to appropriate type for use with HARD_REG_SET.
({SET,CLEAR,TEST}_HARD_REG_BIT): Use this macro where appropriate.
* global-alloc.c: Pass HARD_CONST (0) instead of 0 to functions
which are looking for a HARD_REG_SET argument.
* reorg.c (resource_conflicts_p): Change comparison of HARD_REG_SET
value to compare against HARD_CONST.
* all xm-*.h files: Added HOST_BITS_PER_LONGLONG where
HOST_BITS_PER_LONG was defined.
* tm-sparc.h (REG_CLASS_CONTENTS): Fixed in case we're using long
* toplev.c (main): support -gdwarf switch.
* longlong.h (umulsidi3): SPARC .umul routine returns the value in
WORD_LITTLE_ENDIAN form, so swap. Other word-endian changes for
inline mul routines.
* gnulib2.c (__divdi3): If C is nonzero, negate whole division
instead of returning negation of quotient.
Sat May 11 20:06:08 1991 Torbjorn Granlund (tege at
* expmed.c (outside of functions): New vars: lea_cost, lea_max_mul.
(init_expmed): Initialize lea_cost and lea_max_mul.
(synth_mult): Use them.
Sat May 11 20:11:41 1991 Michael Tiemann (tiemann at
* cplus-class.c (build_vbase_path): Rewritten and simplified.
* cplus-cvt.c (build_up_reference): Try to get away without building
a NOP_EXPR around the return value of `build_component_addr'.
Ditto for return value from `convert_pointer_to'.
* cplus-decl.c (void_zero_node): New node. Used in conditional
expressions where one arm must do nothing.
* various places: replace calls that built this node dynamically to
just use the global copy.
* cplus-tree.h (void_zero_node): Declare it globally.
(maybe_build_cleanup): Don't call `convert_force' on the return
value of `build_unary_op'. We should have license to modify its
type without harm.
* cplus-gc.c (protect_value_from_gc): Same idea for VAR_DECL and
PARM_DECL nodes.
* toplev.c (f_options): Add choice for -fPIC.
* varasm.c (assemble_function): If it's a function name that's the
first global name, strip of a leading '*' if there is one.
* reload.c (find_reloads): Fix comment.
* stmt.c (expand_return): Call `any_pending_cleanups' with argument.
* expr.c (expand_expr): In TARGET_EXPR case, If TARGET is null and
DECL already has rtl, use that as the target.
(expand_expr): In BIND_EXPR try using expand_{start,end}_bindings to
catch cleanups...otherwise fixup_cleanups must be modified to deal
with cleanups not in any contours.
Sat May 11 15:09:42 1991 Richard Stallman (rms at
* out-i386.c (via_memory): Return a memref to the stack.
(fp_call_internal): Change call to via_memory.
* expr.c (push_block): New arg BELOW specifies padding direction.
All callers changed.
(emit_push_insn): Pass an interesting value for BELOW.
* c-parse.y (typespec): Pass the TYPE_DECL for a typedef name.
* c-decl.c (grokdeclarator): Handle TYPE_DECL in declspecs.
Thu May 9 15:17:44 1991 Tom Wood (wood at
* (zero_extend pattern): Compute correct constant.
Thu May 9 07:44:20 1991 Richard Kenner (kenner at
* combine.c (subst): Remove WAS_REPLACED; always check the rtl
for specific cases of interest and don't use TO and FROM when
looking into the rtl.
* combine.c (subst, case MEM): Call make_compound_operation here
so any ASHIFTs will be MULTs for mode_dependant_address_p calls later.
(subst, case PLUS): Remove cases already done elsewhere.
* expmed.c (emit_store_flag): Don't let the delete_insns_since call
we do kill insns to do an auto-inc.
* flow.c (propagate_block): Don't treat global regs as clobbered
over a CALL_INSN even if call-clobbered.
* stmt.c (expand_end_stmt_expr): Correctly handle the case where an
expression statement is just an auto-inc of a var.
* (fix_trunc[sd]fsi2): Finish change to use MATCH_SCRATCH
by eliminating DEFINE_EXPAND and making DEFINE_INSN a named pattern.
Wed May 8 13:31:23 1991 Richard Stallman (rms at
* cccp.c (rescan): Handle symbols before // as before /*.
* (objc-parse.o): Specify the command.
* c-parse.y (typespec): Fix previous change.
* reload1.c (choose_reload_regs): Use spillregs in round robin.
Wed May 8 11:00:29 1991 Michael Tiemann (tiemann at
* cplus-lex.c (tree_node_kinds): Renamed to `tree_node_counts'.
Wed May 8 05:50:29 1991 Richard Kenner (kenner at
* integrate.c (copy_rtx_and_substitute): Don't round frame size.
* loop.c: Must include insn-flags.h to get
* (loop.o): Likewise.
* expmed.c (expand_divmod): Use LOG instead of INTVAL (OP1)
once we start generating rtl.
Wed May 8 05:38:06 1991 Michael Tiemann (tiemann at
* cplus-decl.c (duplicate_decls): Don't crash on duplicate
(globalize_nested_type): Handle globalizing types when
CLASS_BINDING_LEVEL goes out of effect.
(init_decl_processing): Comment out decls for ABS, FABS and LABS.
They conflict with libg++ inlines.
* cplus-decl2.c (build_push_scope): Fix bug in last change.
(finish_file): Make the dummy decl that we tack on to the global
scope a TYPE_DECL instead of a VAR_DECL. Fake global VAR_DECLs are
problematic on some machines (i.e. MIPS).
* cplus-init.c (init_vfields): Use TREE_TYPE (VFIELDS) to find the
type for which the VFIELD was last distinguished. This picks up
cases where single inheritance overrides base class vtables and the
base class does not get a new vtable for the override.
* cplus-parse.y (named_class_head_sans_basetype): Handle a
`template_type_name' by itself. This happens with e.g.
friend class Stack<T>.
* cplus-pt.c (mangle_class_name_for_template): Put ',' between
(push_template_decls): Don't crash if ARGLIST is ERROR_MARK_NODE.
* cplus-class.c (finish_base_struct): Compute MAX_HAS_VIRTUAL by
looking at all the base classes relevant to VFIELDS.
(build_vbase_path): Initialize NONNULL to zero.
Tue May 7 23:47:42 1991 Richard Stallman (rms at
* stmt.c (any_pending_cleanups): Don't fail if block_stack is empty.
Tue May 7 22:46:16 1991 Richard Kenner (kenner at
* cse.c (simplify_binary_operation; case EQ, NE): Don't assume
the address of a symbol is non-zero.
* sched.c (schedule_insns): Ensure we free memory used by
schedule_block when using the C alloca.
Tue May 7 14:13:57 1991 Richard Stallman (rms at
* reload1.c (mark_reload_reg_in_use): New arg MODE. Mark all the regs.
(choose_reload_regs): Pass that arg; don't loop here.
* c-parse.y (typespec): Convert a TYPENAME to its meaning.
* fold-const.c (fold): Don't assume symbolic constant is nonzero.
* c-typeck.c (c_expand_asm_operands): Convert arrays, fcns to pointers.
Mon May 6 23:29:21 1991 Richard Kenner (kenner at
* cse.c (cse_insn): Only make a REG_WAS_0 note if the previous
set was to the same register, not just the same quantity;
if previous REG_WAS_0 note, update back pointer.
If setting a register to a constant, update QTY_CONST and
QTY_CONST_INSN so it points to the last set.
In special case for (set REG0 REG1), ensure any REG_WAS_0 notes are
updated correctly.
* genrecog.c (make_insn_sequence): Don't clobber `i' when it is
still needed.
* out-vax.c (print_operand_address): Fix bug in last change in handling
(plus (reg) (reg)).
Mon May 6 16:41:50 1991 Torbjorn Granlund (tege at
* expmed.c (synth_mult): Make it handle t == 0. Improve comments.
Use (max_cost <= add_cost) instead of (max_cost < add_cost) to
determine if we should fail early (to better prune the search).
Remove loop with n from factor synthesis. Remove -2 bias from m
loop (for clearity). Add code to use load-effective-address
instructions. Use bit-fiddling instead of loop to determine q in
the last synthesis case.
Mon May 6 11:21:45 1991 Richard Stallman (rms at
* c-typeck.c (convert_for_assignment): Reword an error message.
* c-typeck.c (build_conditional_expr): Typo in last change.
* (enquire, enquire.o): Depend on gnulib.
Sun May 5 17:28:22 1991 (Eric Youngdale at
* Update for GCC 2.0; build insn-attr.h, insn-attrtab.c.
Compile and add obj to linker list: c-aux-info.c, c-common.c, c-lang.c,
aux-output.c, calls.c, dwarfout.c, function.c, reorg.c, sched.c,
sdbout.c, unroll.c, insn-attrtab.c. Remove references to symout.c.
Sun May 5 15:32:01 1991 Richard Stallman (rms at
* (rest.encap): Make gnulib before float.h.
* c-typeck.c (build_conditional_expr):
Don't assume symbolic constant is nonzero.
* reload1.c (choose_reload_regs): Ignore avoid_return_reg.
(reload_as_needed, reload): Don't bother setting avoid_return_reg.
Sun May 5 14:30:14 1991 Michael Tiemann (tiemann at
* cplus-class.c (prev_class_type): Declare this to be static.
(build_vbase_path): Test NONNULL to decide whether a COND_EXPR is
actually needed.
(finish_struct): Another sort of hard virtual function to deal with
is one which comes from the non-leftmost baseclass, and who's index
is different between that class and the main derived class. Use new
variable DOING_HARD_VIRTUALS to control when we punt and when we
plow through.
(modify_vtable_entry): If we find at this point that we have a hard
virtual function, just put it on the list PENDING_HARD_VIRTUALS if
(fixed_type_p): Handle SAVE_EXPR, RTL_EXPR, PLUS_EXPR, MINUS_EXPR,
(pushclass): Fixed comment. Also change test for whether this is
the top-level class scope from an obscure one to an obvious one, and
add comment.
(pushclass,popclass): Now always allocate a binding level. Later
we'll have to rewrite this to actually use it.
* cplus-gc.c (type_needs_gc_entry): Don't need a GC entry for
* cplus-init.c (build_new): Set TREE_CALLS_NEW on RTL_EXPR. This
gives us a case that `fixed_type_p' can grok.
* cplus-lex.c (identifier_type): Make this __inline if compiling
with GNU C.
(tree_node_kinds): Renamed to `tree_node_counts'.
* cplus-parse.y (various places): Take advantage of default rule
`$$ = $1', and where possible, use $$ instead of $1.
Also, back out change for setting `looking_for_typename' to 1 at top
* cplus-decl2.c (build_push_scope): If the user gives X::foo in X's
scope, don't return a SCOPE_REF. Just return `foo' instead.
* cplus-decl.c (init_decl_processing): Don't define `alloca' as a
built-in function until libg++ header files agree with its built-in
(finish_decl): Don't crash if TYPE is error_mark_node.
* fold-const.c (split_tree): When splitting the tree, don't call
convert if the TYPE_MODEs are the smae. This screws up C++ where
conversion of one pointer type to another can cause the pointer's
value to change.
* tree.c (get_identifier): Speed up `get_identifier' by about a
factor of 2. This becomes noticable with the long names used for
C++ overloading.
(tree_cons): Make this most frequent user of `make_node' perform its
actions inline.
* calls.c (expand_call): Eliminate many (most) calls to strcmp by
being smarter about when to call it. Also, don't call `push_block'
in the trivial case when it's not needed.
Sun May 5 08:51:14 1991 Richard Kenner (kenner at
* expr.c (convert_to_mode): Fix (for the second time) test for when
gen_lowpart should be called.
* cse.c (find_best_addr): Try to fold address.
(fold_rtx): Do associativity and (not (not ...)) checks here.
(cse_insn): Not here.
* combine.c (recog_for_combine): New parameter, PNOTES.
When we add a CLOBBER, put a REG_UNUSED note for it in *PNOTES.
(try_combine): Call recog_for_combine with new parameter.
Delete any now-invalid REG_UNUSED notes in OTHER_INSN and add any
required new ones.
Add REG_NOTES to I3 and I2 due to added CLOBBERs.
(remove_death): Call new function, remove_note.
(move_deaths): Don't get confused by a CLOBBER.
(distribute_notes): Don't make duplicate REG_UNUSED notes.
Don't put a REG_DEAD note on an insn when the register is
partially modified, but remains valid.
* rtlanal.c (remove_note): New function.
* combine.c (try_combine): When making a PARALLEL that does a compare
and arithmetic, don't simplify the COMPARE.
* combine.c (try_combine): Validate that I1DEST isn't being
modified invalidly.
* combine.c (simplify_comparison): In ZERO_EXTRACT case, add missing
test for equality comparison against zero; also invert comparison
If we can't do a comparison in a narrower mode, but we know that
some wider bits are zero, see if we can do it in a wider more.
* cse.c (simplify_binary_operation): Remove obsolete code to convert
negative shift counts to the opposite shift.
Don't fold invalid shifts since they may trap (e.g., on Vax).
* reload1.c (emit_reload_insns): Use rtx_equal_p to see if a result
is already in the desired register.
* combine.c (find_split_point): Add two more ways to split an insn.
* combine.c (gen_binary): Put a complex operand first in addition to
putting constants second, just like subst would do.
* combine.c (significant_bits): Correct computation of significant bits
for division operations.
* combine.c (apply_distributive_law): Reject complex SUBREGs.
SUBREG distributes over logical and addition operations.
* combine.c (subst; case AND, IOR, XOR): Add some boolean
arithmetic simplifications.
* expr.c (do_jump): ADDRESS_EXPR is not always zero, unfortunately.
* expr.c (do_store_flag): In case where we are testing a single bit,
don't convert to output mode until after we do the shift.
* optabs.c (expand_binop, expand_unop, expand_fix): Compare
enum insn_code objects against CODE_FOR_nothing instead of 0.
* (bit_insv): Use CC0 in standard way; i.e., in NE.
Sat May 4 20:41:12 1991 (Eric Youngdale at
* c-aux-info.c (gen_aux_info_record): Use getcwd on VMS a la USG.
* dbxout.c: Same here.
* xm-vms.h: Define unlink as remove
(GCC_INCLUDE_DIR): Provide a dummy definition.
Sat May 4 16:46:48 1991 Richard Kenner (kenner at
* combine.c (can_combine_p, try_combine): Use SMALL_REGISTER_CLASSES
to indicate when it is valid to do combines involving hard registers.
* cse.c (canon_hash): #ifdef SMALL_REGISTER_CLASSES, don't record
hard registers unless they are fp, ap, sp or are fixed.
* loop.c (valid_initial_value_p): #ifdef SMALL_REGISTER_CLASSES,
hard register aren't valid initial values.
* reload1.c (reload): Initialize FORBIDDEN_REGS depending on
whether we have small register classes or not.
* Replace const_int with const_int_operand.
Remove HImode extractions.
Remove patterns assigning an AND to CC0.
(andcbxx3): Remove name and eliminate case with NOT as second operand.
(sbitx, cbitx): Remove patterns involving IOR and ASHIFT; add patterns
with ZERO_EXTRACT as destination.
(ibitx): Put ASHIFT as first operand in XOR.
(bitfield compare): Remove comparison of 1 bit field with 1; combine
converts this to comparison with zero.
(and-compare-branch): Fold PLUS or MINUS into constant, like combine
will do.
Remove patterns for reversed cases.
* out-ns32k.c (const_int): Deleted.
* rtlanal.c (reg_used_between_p, reg_set_between_p): Use GET_RTX_CLASS.
(reg_set_p_1): If we are setting a MEM, don't think we are setting
registers used in its address.
* (cmpsf, cmpdf, tstsf, tstdf for FPA): Use MATCH_SCRATCH.
* (memory store patterns): Likewise.
* function.c (assign_parms): Function is varargs function if the
last parameter is `__builtin_va_alist_' instead of checking the first
parameter. Normally, this is the same, but some functions in MACH
have named parameters before va_alist.
* combine.c (simplify_comparison): Remove abort on paradoxical SUBREGs
now that we know they can occur.
* reload.c (decompose): Handle SCRATCH; it can't conflict with
(find_reloads): All operands can set earlyclobber, not just REG & MEM.
Add support for "X" constraint.
SCRATCH does not match "g" constraint.
Sat May 4 14:03:16 1991 Richard Stallman (rms at
* enquire.c (EPROP): Avoid a <= out if bad is set.
* SYSCALLS.c: Test bsd4_2 along with BSD.
Fri May 3 14:26:51 1991 Richard Stallman (rms at
* c-decl.c (pushdecl): Stop looping on type if find error mark.
* loop.c (invariant_p): An address with a PLUS is not the same as
MEM_IN_STRUCT_P being set.
* tree.h (TREE_NO_UNUSED_WARNING): New macro.
* stmt.c (warn_if_unused_value): That flag suppresses warnings.
* c-typeck.c (build_unary_op): Set flag when converting postinc.
Fri May 3 08:09:47 1991 Tom Wood (wood at
* tm-m88k.h (GO_IF_LEGITIMATE_ADDRESS): Remove workarounds for
register elimination problems.
Fri May 3 07:14:22 1991 Richard Kenner (kenner at