|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T U
Length: 991894 (0xf2296) Types: TextFile Notes: Uncompressed file
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89 └─⟦436f1f6c9⟧ »./gcc.diff-1.34-1.35.Z« └─⟦this⟧
Changes for GCC version 1.35, from version 1.34. All the machine description files have been moved into a subdirectory `config'. Therefore, before merging these diffs, create this subdirectory and move all the files *.md, tm-*.h, and xm-*.h into it. Also, the files output-*.c should be renamed to config/out-*.c. The file tm-news800.h should be deleted rather than moved to config. There is a replacement for it in these diffs. As usual, changes in files that can be updated using etags, TeX, makeinfo, or Bison have been omitted. diff -rc2N gcc-1.34/ALTOS-README gcc-1.35/ALTOS-README *** gcc-1.34/ALTOS-README Wed Dec 31 19:00:00 1969 --- gcc-1.35/ALTOS-README Mon Apr 10 06:07:55 1989 *************** *** 0 **** --- 1,53 ---- + Return-Path: <jkp@sauna.hut.fi> + Date: Mon, 10 Apr 89 10:13:45 +0300 + From: Jyrki Kuoppala <jkp@sauna.hut.fi> + Sender: jkp@sauna.hut.fi + To: info-gcc@prep.ai.mit.edu + Subject: Kernel fix needed for Altos 3068 to get coff-encapsulation working right + Organization: Helsinki University of Technology, Finland. + + Here's a description how to fix a kernel bug in Altos 3068 and get + gcc-compiled programs working. + + Author: Jyrki Kuoppala (jkp@cs.hut.fi) + Last modified: Mon Apr 10 09:28:40 1989 + + There's a bug in the Altos 3068 kernel that causes gcc-compiled + programs to fail in certain situations when the machine has a heavy + load and also in some other situations. The bug exists at least in + SVR 2.2 1.0gT1 and SVR 2.2 1.0e. + + If you have source code to your system, apply the following change to + os/exec.c (function gethead): + + Change the lines containing + + u.u_exdata.ux_tstart = sizeof(struct naout) + + sizeof(struct filhd) + (ep->ef.nscns * sizeof(struct scnhdr)); + + to + + u.u_exdata.ux_tstart = u.u_exdata.ux_txtorg; + + If you only have binary, use sdb to find out the address of the + previous lines (on our system it's gethead+0x140) and use your + favourite binary editor to change the bytes '3036 0162 fffc 0002 0280 + 0000' to '23f9 01fb f4ca 01fb f4c2 6016'. This may or may not work in + your case, depending on the version of the operating system and the + phase of the moon. + + Here's what is just before gethead+0x140 to ease finding out the right place: + + 0x9224 (gethead+0x122): 23f9 01fb f4ca 01fb f4ce mov.l &0x1fbf4ca.L,&0 + x1fbf4ce.L [] + 0x922e (gethead+0x12c): 23f9 01fb f4c6 01fb f4ca mov.l &0x1fbf4c6.L,&0 + x1fbf4ca.L [] + 0x9238 (gethead+0x136): 23f9 01fb f4c2 01fb f4c6 mov.l &0x1fbf4c2.L,&0 + x1fbf4c6.L [] + + Good luck ! + + //Jyrki + + jkp@cs.hut.fi + diff -rc2N gcc-1.34/ChangeLog gcc-1.35/ChangeLog *** gcc-1.34/ChangeLog Fri Feb 24 06:20:11 1989 --- gcc-1.35/ChangeLog Wed Apr 26 02:45:35 1989 *************** *** 1,2 **** --- 1,714 ---- + Wed Apr 26 02:44:59 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.35 released. + + * c-decl.c (grokdeclarator): Use INT_CST_LT only on int constants. + + Tue Apr 25 15:47:11 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload.c (find_reloads_address_1): Always return a value. + + * flow.c (mark_set_1): Look inside zero_extract, sign_extract. + + * expr.c (emit_library_call) [STACK_ARGS_ADJUST]: + Fix typo for `struct args_size'. + + Mon Apr 24 00:12:18 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * flow.c (mark_set_1): Look inside strict_low_part. + + * c-typeck.c (decl_constant_value): Don't use var's init if volatile. + + * print-tree.c (dump): Don't call walk on rtx's. + + * integrate.c (expand_inline_function): Convert expanded arg from + passed mode to nominal mode. + + Sun Apr 23 13:14:47 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * fixincludes: fix _IO macros if split across two lines. + Fix typo: EOF was indented. + + * gnulib2.c: New file with DImode library routines. + * Makefile (gnulib2): Put them into gnulib. + Must be explicitly requested. + + Fri Apr 21 13:45:45 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cccp.c (main): Don't turn on trigraphs for -Wtrigraphs or -Wall; + use -trigraphs for that. + + * cccp.c (main): Use -trigraphs to enable trigraphs. + * gcc.c: Pass -trigraphs to cpp; don't pass -T. + + * Makefile: Variable srcdir relates location of sources + to current directory. Default is `.'. + + * integrate.c (expand_inline_function): When copying expanded arg, + use mode it's passed in, not arg's nominal mode. + + * dbxout.c (dbxout_block): Print generated name with assemble_name. + + Thu Apr 20 12:36:09 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stdarg.h: check __sparc__ instead of sparc. + + Tue Apr 18 18:58:03 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-next.h (STARTFILE_SPEC): Define it. + + Mon Apr 17 19:56:05 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * dbxout.c (dbxout_block): Use ASM_GENERATE_INTERNAL_LABEL to format + the labels LBB... and LBE... + + Sun Apr 16 23:57:47 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * mips.md: Change MINUS to COMPARE where appropriate. + + Sat Apr 15 16:11:49 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-decl.c (finish_struct, redeclaration_error_message): + Rename variables named OLD and NEW. + + * sparc.md (cse'd mult pattern): Handle memory operands. + Optimize small integer operands. + + * stmt.c (expand_decl): On sparc, ensure dynamic arrays of doubles + are properly aligned, despite unaligned STACK_POINTER_OFFSET. + + Fri Apr 14 10:59:56 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (expand_call): Bugs treating struct value address as param: + do so only if it's supposed to be pushed; + decode value of FUNCTION_ARG properly. + + * tm-altos3068.h (CPP_SPEC): Some braces were dropped. + + * gcc.c (pexecute): Print message when exec fails. + (perror_exec): New fn. + (perror_with_name,pfatal_with_name): Change message syntax. + + * tm-hp9k320.h (ASM_IDENTIFY_GCC): Define as no-op. + + Wed Apr 12 00:20:31 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cse.c (cse_insn): Can record constant value being stored in + a bit field, if we can tell that truncation won't change it. + + * m68k.md (bfset, bfclr, bfchg insns): Do CC_STATUS_INIT + since the cc's are set from the old contents. + + * gcc.c (compilers): Running `as', put -o option before input file. + + * gcc.c: Delete output file only if that file's compilation fails. + * gcc.c (record_temp_file): Changed args: always_delete, fail_delete. + (store_arg): Likewise. Callers changed. + (clear_failure_queue): Called after each compilation. + + Tue Apr 11 01:18:53 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * combine.c (subst): (SET (ZERO_EXTRACT) (OR (ZERO_EXTRACT) const)) + optimization was sometimes invalid. + + * tm-m68k.h (NOTICE_UPDATE_CC): A doubleword move that requires 2 insns + does not set the cc's usefully. + + * Makefile (cleanlinks): Just do `clean', not `realclean'. + (realclean): Delete config links also. + + * expr.c (expand_call): Handle case where return value is in memory + but TARGET is a register. + + * c-typeck.c (build_binary_op_nodefault): New arg ERROR_CODE + is passed to binary_op_error instead of CODE. + All callers changed. + (binary_op_error): CODE = NOP_EXPR is new special case. + (truthvalue_conversion): Call build_binary_op_nodefault directly + and specify NOP_EXPR for the error code. + + * c-decl.c (xref_tag): If pedantic, warn on fwd ref to enum. + + Mon Apr 10 19:44:48 1989 Chris Smith (csmith at mozart) + + * tm-convex.h (PCC_BITFIELD_TYPE_MATTERS): It doesn't, + but set it anyway. It makes for better code on this + word machine. + + * convex.md (one_compl*): add not:QI and not:HI, which + do get used after all. + + * tm-convex.h (A_REG_P, S_REG_P): define new macros + convex.md: use them + + * convex.md (addsi3): tidy up constraints. + + * tm-convex.h (REG_OK_FOR_INDEX_P): stack pointer is not ok. + + * convex.md: add a pattern to push REG+CONST so we can + prefer an A reg. + + * tm-convex.h (tstqi): should sign extend, not zero extend. + + * expr.c (convert_move): Extending narrow to DI via SI, + operand of extendsidi2 was wrong. + + * emit-rtl.c (gen_lowpart): Handle CONST_DOUBLE. + + Mon Apr 10 05:19:39 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * recog.c (nonmemory_operand): Test constant operands + as general_operand does. + + * tm-m68k.h (PRINT_OPERAND): Limit effect of code `d' + to constant addresses. + + * loop.c (can_eliminate_biv_p, eliminate_biv): Don't rely on givs with + nonconstant coefficients, since the coeffs could be zero. + + * loop.c (can_eliminate_biv_p): Check each giv for ! ignore + before assuming it can be used. + (check_eliminate_biv): New fn, a piece of strength_reduce broken out. + + * cccp.c (error_from_errno): New fn, like error and perror_with_name. + (do_include): Call that if open fails. + (finclude): Print I/O error msg before closing desc. + + * c-decl.c (shadow_tag): If more than one tag or structure, + or anything other than a tag, warning. + + * c-parse.y (components): Just warn if memb decl has no member, + and only if pedantic. + + * loop.c (strength_reduce): Print uids, not luids, for dump. + (record_giv): giv_count field counts only DEST_REG givs. + (check_dbra_loop): src_two_before_end was set wrong. + + * loop.c (record_giv): New arg LOOP_END; all callers changed. + Don't mark giv replaceable if used past LOOP_END. + (find_mem_givs): New arg LOOP_END; all callers changed. + + * out-i386.c (FP_CALL): Make this a `return' stmt. + + Fri Apr 7 11:56:58 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (expand_expr, case ..._DECL): Preserve mode thru + calling change_address. + + * expr.c (emit_library_call): Typo: ARGNUM => COUNT. + + * expr.c (preexpand_calls, expand_call): Take note of RETURN_IN_MEMORY. + * stmt.c (assign_parms): Likewise. + * integrate.c (function_cannot_inline_p): Likewise. + + * STACK_ARGS_ADJUST: Arg is now a `struct arg_data' and it should + be updated in place. + * tm-mips.h: Define it. + * expr.c (expand_call): Adapt to this. Assume padding comes after args + so turn off the feature of changing the args' offsets. + (emit_library_call): Adapt to this. + + * tm-mips.h (PRINT_OPERAND): Use CONST_DOUBLE_{LOW,HIGH}. + Truncate SFmode constants to single precision. + + * c-typeck.c (mark_addressable): Fix test for local vs global reg var. + + * config.gcc: Change `:-' to `-' in var refs. + Shell on convex doesn't handle `:-'. + + Thu Apr 6 00:09:01 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * integrate.c (expand_inline_function): Compare actual's mode + against formal's DECL_ARG_TYPE's mode, not TREE_TYPE's mode. + + * c-decl.c (implicitly_declare): Make the decl permanent if + in global binding level. (Can happen for certain invalid input.) + + * c-typeck.c (build_modify_expr): Block path that made a MODIFY_EXPR + containing an ERROR_MARK. + + * config/tm.h: New file. + + * loop.c (only_reg_use_p): Fix bugs in recursion, add some fast + special cases. Comment on return value was backwards. + (strength_reduce): Negate the value of only_reg_use_p. + + * genoutput.c (output_prologue): Output `#include hard-reg-set.h'. + * Makefile: insn-output.o depends on that. + + * toplev.c (main): Typo recognizing -Wswitch. + + * config.gcc (mips): New alternative. + * tm-mips.h, out-mips.c, mips.md, va-mips.h: New files. + * varargs.h: Include va-mips.h if on mips. + + Wed Apr 5 16:58:04 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-decl.c (duplicate_decls): Rename OLD, NEW to OLDDECL, NEWDECL. + + * stmt.c (expand_function_start): Ref subr instead of + current_function_decl; should make no difference. + + * stmt.c (assign_parms): Do extra padding for some parms, + controlled by MAX_PARM_BOUNDARY. + * expr.c (expand_call): Same thing for caller side. + Note this is implemented only for machines that lack push insns. + Also, in both cases, it doesn't handle variable-size args. + + Tue Apr 4 12:22:06 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * gcc.c (find_file): Try STANDARD_EXEC_PREFIX for startfiles too. + + * varasm.c (make_decl_rtl): Delete never-executed clause. + + * spur.md (movqi, loadhi, extend*, zero_extendhisi): + Make subregs with C code, not RTL patterns, so we can + avoid generating subreg of subreg. + + * optabs.c (emit_cmp_insn): Not all clauses always succeed, + so stop using `else' structure. + + * stmt.c (expand_return): Avoid moving void to void, in cleanups case. + + Mon Apr 3 18:04:33 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * m68k.md (cmphi): Don't allow a-reg vs a-reg, since that sign-extends. + If there is one a-reg, make sure it is not last. + + Sun Apr 2 13:02:26 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stor-layout.c (agg_mode): Use highest mode that has desired size. + Allow all integer modes, but reject sizes > MAX_FIXED_MODE_SIZE. + (That defaults to the size of DImode.) + + * machmode.def: Add PSI, PDI and XF, CXF modes. + + Sat Apr 1 00:50:11 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * ns32k.md (ashd, lshd): Delete patterns that logand the count with 31. + The shift count is not truncated on this machine. + + * combine.c (subst): Simplify nested or's, nested xor's. + (try_distrib): XOR doesn't distribute through anything. + + * rtl.c (rtx_equal_p): Don't die on null pointers. + + * loop.c (eliminate_biv): Use COMPARE, not MINUS, in generated compare. + + * loop.c (invariant_p): Mem refs in constant pool are invariant. + + * c-decl.c (redeclaration_error_message): If -traditional, allow + redeclarations of typedef provided they agree. + + * c-decl.c (start_decl): Do expand_decl on the decl that pushdecl + returns. If there was a prev. decl with a different type, + we have changed its type and cleared its old rtl, so it need new rtl. + + Sat Apr 1 00:50:11 1989 Matthew Self (rms at sugar-bombs.ai.mit.edu) + + * expr.c (convert_move): Modified to use mode classes + instead of refering to specific machine modes. + + * expr.c (do_jump): Converted to use CONST0_RTX macro. + do_jmp no longer refers to any machine modes directly except + for VOIDmode! + + * expr.c (compare, compare1): Modified to use CONST0_RTX + macro. No longer refers to any machine modes directly + except VOIDmode and BLKmode! + + * machmode.def: Documented assumptions made about the order + of machine modes during mode widening. + + * optabs.c (expand_binop, expand_twoval_binop, expand_unop, + emit_cmp_insn): Added mode widening which is independent of + specific machine modes. It assumes that we may widen to any + higher numbered mode of the same mode class. + NOTE: the checks for VOIDmode ops which were present in + QI and HI to SI widening are now present in all widening. + I assume this is correct. Also, widening is now possible + from QI to HI. This may or may not be a good thing.... + + * rtl.h (CONST0_RTX): Added definition of new macro + CONST0_RTX (mode). + + * rtl.h (GET_NOTE_INSN_NAME, GET_REG_NOTE_NAME): New macros. + * rtl.c (note_insn_name, reg_note_name): New tables. + * rtl.def (NOTE): Change last field from `i' to `n'. + * rtl.c (print_rtx): Print mode of INSN_LIST or EXPR_LIST as reg-note. + Print operand code `n' as name of kind of note. + (read_rtx): treat `n' like `i'. + + * loop.c (struct induction): Add `mode' field. + (strength_reduce, record_giv): Set the `mode' field in V. + (can_eliminate_biv_p, eliminate_biv): Use that field. + + * loop.c (struct iv_class): `init_insn' records what inits the biv. + Replaces `init_val_set' flag. + (strength_reduce): Update and test `init_insn' instead. + Use of a biv between its init and the start of the loop + does not preclude its elimination from the loop. + Setting a giv is ok for eliminating a biv, even if giv is "ignore", + since that just means giv will be combined with another. + Handle some DEST_ADDR givs for that purpose. + Test for giv-setting before check can_eliminate_biv_p. + New error check for replaceable giv whose value needed after loop. + (only_reg_use_p): New fn. + + * expr.c (expand_expr): PLUS, MINUS with EXPAND_SUM: + Associate even harder. + + * loop.c (strength_reduce): Treat all constant biv init vals like ints. + + * loop.c (strength_reduce): Clear all_reduced when v->ignore is set; + the code to check this later didn't always do the job. + + * loop.c (verify_loop): Set loop_continue. + (scan_loop): mention its value. + * rtl.h: Define NOTE_INSN_LOOP_CONT. + * stmt.c (expand_loop_continue_here): Output one. + + Fri Mar 31 10:08:29 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-typeck.c (pointer_int_sum, pointer_diff): Treat const void * like + void *. + + * rtl.c (rtx_addr_varies_p): Don't die on null exp. + * cse.c (refers_to_mem_p, refers_to_p): Likewise. + + * gcc.c (validate_switches, validate_all_switches): New fns. + Mark a switch as valid if any compiler spec or the linker spec + matches it, even for languages not being used. + + Thu Mar 30 00:22:14 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * loop.c (loop_optimize, move_movables): when moving a `clr' insn used + in zero-extension, sometimes change it to an `and' so that the + significant low bits are not clobbered. + + * cccp.c: Implement __BASE_FILE__ and #once. + (savestring): New fn. + (struct file_name_list): new name for struct directory_stack. + (enum node_type): Add T_ONCE, T_BASE_FILE. + (directive_table): Add #pragma once. + (initialize_builtins): Add __BASE_FILE__. + (special_symbol): Handle __BASE_FILE__, together with __FILE__. + (do_include): Ignore the file if it's on the #pragma once list. + (do_once): New fn; add current file to #pragma once list. + + * cccp.c (do_include): Don't add non-ex files to list of deps. + + * config.gcc: Use {...:-...}, not {...=...}. + + * c-parse.y: Add precedence for IF/ELSE, and for parens; + avoids some conflicts. + + * tm-newsgas.h: Include tm-news.h and define USE_GAS. + + * tm-news.h: New name for tm-news800.h. + If not USE_GAS, define SONY_ASM. + Don't define USE_GAS by default. + (CPP_PREDEFINES): Various alternatives depending on processor type. + (ASM_FORMAT_PRIVATE_NAME): Override this. + (ASM_IDENTIFY_GCC): Override; output nothing. + (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Round fsize up to % 4. + Max for halfword link insn is 32k, not 64k. + (FUNCTION_EPILOGUE): Don't output move.l if no regs to restore. + (PRINT_OPERAND_ADDRESS): Change handling of tableref pc-rel addresses. + * m68k.md (movhi): Add SONY_ASM conditional. + + * cse.c (cse_insn): If replacing a dest address, preserve MEM_IN_STRUCT + + * gcc.c (error, fatal): alternate varargs defns if HAVE_VPRINTF. + + Wed Mar 29 09:54:13 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * gcc.c (process_command): Check WORD_SWITCH_TAKES_ARG, so that + -Tdata can be handled right. + + * stmt.c (check_for_full_enumeration_handling): new fn, for warn_switch + (expand_end_case): Call it, if orig index was enum. + * toplev.c (main): Handle -Wswitch. + * c-parse.y (SWITCH stmt): Pass orig switch expr to expand_end_case. + + * tm-*.h, out-*.c: Uniformly use reg_names, not reg_name, and don't + define any duplicates. + * final.c: Delete reg_name. + + * c-parse.y (is_reserved_word): Add keywords __asm and __inline; + also __const and __volatile. + (yylex): Keywords that start with `__' are recognized regardless of + -traditional or -ansi. + + * c-parse.y (check_newline): Always recognize #ident. + Macro IDENT_DIRECTIVE is no more. + If ASM_OUTPUT_IDENT is undefined, don't output anything for #ident. + * tm-3b1.h: Don't define IDENT_DIRECTIVE or ASM_OUTPUT_IDENT. + * tm-encore.h, tm-i386gas.h, tm-i368v.h, tm-sun386i.h, tm-vaxv.h: + Don't define IDENT_DIRECTIVE; define ASM_OUTPUT_IDENT to output in + default way. + + * expr.h (RETURN_IN_MEMORY): New macro, default defn here. + * expr.c (expand_call): Use it to control where to return value. + * stmt.c (expand_function_start): Likewise. + + * out-sparc.c (find_addr_reg): Abort if none found. + Eliminate confusion; do only one change between tests for PLUSness. + (output_move_double): Arg to find_addr_reg is address, not mem ref. + * out-m68k.c, out-spur.c, out-i386.c, out-alliant.c: Likewise. + + * jump.c (find_cross_jump): Don't let either E1 or E2 be included + in the range of matching insns preceding the other (E2 or E1). + + * c-parse.y (check_newline): No error for `#pragma\n'. + + * Makefile (gcc.o): Control STANDARD_STARTFILE_PREFIX here. + + * stmt.c (walk_fixup_memory_subreg): handle null. + + * tm-sparc.h (FUNCTION_BLOCK_PROFILER): Change LPBnn to LPYnn, + to avoid conflict with final.c. + + Tue Mar 28 15:23:17 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cccp.c (do_include): If fail, print system error message. + (perror_with_name): Use more standard error format. Inc. `errors'. + + * dbxout.c (dbxout_function): Output any temporary types + that were made by dbxout itself. + + * stmt.c: always use an epilogue if pcc-struct-return. + (expand_function_start): Compute return_label after testing that. + (expand_function_end): Output a return insn after pcc-struct-return + processing, if there is a return insn. + (expand_null_return): Don't output a return insn, in that case. + Simplify the conditions--depends entirely on HAVE_return. + + * tm-m68k.h (FUNCTION_BLOCK_PROFILER): Use jsr, not call. + + * reload.c (find_reloads): Certain mem addresses will be offsetable + after reloading; in particular, those where reg_equiv_address applies. + + * loop.c (check_dbra_loop): Change MINUS to COMPARE. + + * c-typeck.c (convert_for_assignment): Return THE standard error_mark. + + Thu Mar 23 09:39:02 1989 Richard M. Stallman (rms at watson) + + * c-parse.y (components): Error if empty. + + * dbxout.c (dbxout_symbol): Output const variables as N_STSYM. + + * varasm.c (force_const_mem): Use ASM_OUTPUT_DOUBLE_INT if defnd. + + * c-decl.c (grokdeclarator): Warn about `long long long'. + + * reload1.c (reload): When changing REG to MEM, clear REG_USERVAR_P. + * final.c (alter_subreg): Preserve volatile bit of MEM. + + * m68k.md (cmpsi, cmphi): Permit cmpm. + + * gcc.c (find_file): Use standard_startfile_prefix_2. + Now search /usr/local/lib/, /lib/ and /usr/lib/. + + * tm-m68k.h (PRINT_OPERAND): Support code `d'. + * m68k.md (cmpsi, cmphi, cmpqi): Use it for all mem addresses. + + * final.c (output_asm_insn): Don't allow %LETTER without an + operand number. + * tm-m68k.h, m68k.md, tm-hp9k320.h, tm-news*.h: Use %@ instead of %s. + * tm-alliant.h, alliant.md: Likewise. + * i386.md, out-i386.h: Put `0' after each %L, %W, %B, %S, %Q, %R. + + * stmt.c (expand_end_stmt_expr): Pop pending stack args. + + * varasm.c (assemble_variable): For 0-size common variable, + allocate at least 1 byte. + + * tm-encore.h (ASM_OUTPUT_DOUBLE, PRINT_OPERAND): Use 0f, not 0l, + for doubles. + + Mon Mar 13 10:24:56 1989 Richard M. Stallman (rms at ccvi) + + * out-i386.h (function_prologue, function_epilogue): + Use call_used_regs, not a copy, so -f options work. + Save regs in the opposite order. + Save regs even starting from 0 if they happen to be call-saved. + + * Bug fixes from Rob McMahon. + + * loop.c (strength_reduce): When inserting insn to set + nonreplaceable giv, put it after all the consecutive insns + that compute it. + + * reload.c (find_reloads): When forcing const to mem, + use the insn's operand mode, not the const's mode. + + * reload1.c (choose_reload_targets): Use wider of inmode and outmode + when determining have_groups. + + * reload1.c (choose_reload_targets): typo checked wrong insn with + constraint_accepts_reg_p. + + * reload1.c (choose_reload_targets): Enable #if-0'd code for + forgetting old reloads in case of output reload from a non-spill-reg. + + Sun Mar 12 00:04:49 1989 Richard M. Stallman (rms at ccvi) + + * c-parse.y (yyerror): Add forward-decl here. + * c-tree.h: Delete decl here. + + * New macro USE_C_ALLOCA. + * cse.c (cse_main): Do alloca (0) to clear out C alloca. + * flow.c (life_analysis): + * local-alloc.c (local_alloc): + * reload1.c (reload_as_needed): likewise. + + * loop.c (emit_iv_init_code, eliminate_biv): + Always put constant in a PLUS last. + + * gcc.c (make_switch): Unused function deleted. + + *gcc.c (switches): Each switch has a `used' field. + (process_command): Init it to 0 when making `switches'. + (do_spec_1, handle_braces, give_switch): Set to 1 when switch is used. + (main): If it remains 0 at the end, print error message. + + * expr.c (convert_move, convert_to_mode): Don't truncate a MEM in + place if it is volatile. + + * loop.c (strength_reduce): When reducing a giv, if the biv is + incremented between the giv's creation and its use, increment + the reduced giv var *after* its use. + + * c-decl.c (duplicate_decls): Warn about proto vs nonproto + only if no other errors apply. + + * jump.c (invert_exp): Don't crash if arg is null. + + * alliant.md (float*i*f2): Don't allow immediate ops. + (sne): Fix typo, fsne => fsneq. + + * expr.c (store_one_arg, expand_call): When size doesn't matter, + pass const0_rtx, not (rtx) 0. + + * expr.c (do_jump): Args to invert_exp were missing. + + * gcc.c (store_arg): Now 2 separate args for delete-on-success + and delete-on-failure. All calls changed. + (do_spec_1): DELETE_THIS_FILE is meaningful for output files. + + * config/xm-alliant.h (LINK_SPEC): Pass -X to linker. + + Sat Mar 11 10:30:41 1989 Richard M. Stallman (rms at ccvi) + + * tm-*.h, xm-*.h, *.md: Moved to subdir `config'. + * output-*.c: Moved to `config/out-*.c'. + * Makefile (.c.o): Define rule to use -Iconfig when compiling. + (various): Delete the commands from some compilation rules. + Put -Iconfig in other compilation commands. + Also some reordering of variable defs and comments for cleanliness. + (realclean): Change a shell comment to a Make comment. + + * fold-const.c (fold): Simplify and extend TRUTH_... operators + knowing that args must be ints and values will be 0 or 1. + + * gcc.hlp: New file (for VMS). + + * reload1.c (reload): Don't let two 2-groups overlap. + + * reload.c (push_reloads): When a plain reg matches a reload + for an increment, don't change the reload_in to a plain reg. + Leave the increment there. + + * integrate.c (expand_inline_function): Don't try to inline + unless the parm machine modes really match what's expected. + + * stmt.c (emit_case_nodes): default_label is an rtx, not tree. + + * tm-next.h (DOLLARS_IN_IDENTIFIERS): Define it as 1. + + * output-sparc.c (output_move_double): Don't trust random structs + to be double-word aligned. + + * gcc.c: Pass -Wcomments to cpp. + + * rtl.def (ASM_OPERANDS): New operands, source file and line. + * rtl.h (ASM_OPERANDS_*): New macros for components of ASM_OPERANDS. + * stmt.c (expand_asm_operands): Use new fields, not REG_ASM_* notes. + * toplev.c (error_for_asm): likewise. + * rtl.h (enum reg_note): Delete REG_ASM_FILE, REG_ASM_LINE. + + * combine.c (try_combine): Check explicitly for volatility in I2, I1. + + Fri Mar 10 19:30:10 1989 Richard M. Stallman (rms at ccvi) + + * c-parse.y (GOTO stmt): Set TREE_USED for the label. + * c-decl.c (poplevel): Warn about unused label. + + * c-decl.c (warn_pointer_arith, warn_strict_prototypes): New vars. + (lang_decode_options): Options to set them. + * c-typeck.c (pointer_int_sum, c_sizeof): Maybe warn if bad target. + * c-decl.c (grokparms): Maybe warn if nonprototype fn decl. + + * flags.h, toplev.c (warn_shadow): New flag. + * toplev.c (main): Decode it. + * c-decl.c (pushdecl): Maybe warn about any shadowing. + Existing parm-shadowing warning now disabled if shadowing decl + is also a parm. + + * flags.h, toplev.c (warn_id_clash, id_clash_len): New flags. + * toplev.c (main): Decode -Wid-clash-LEN. + * tree.c (get_identifier): Implement warning if two idents match. + + * toplev.c (compile_file): Warn about statics defined and unused. + + * rtl.h (CONST0_RTX): New macro. + + * recog.c (offsetable_address_p): New 1st arg says whether to demand + a strictly valid address. + (offsetable_memref_p): Pass nonzero. + * stmt.c (optimize_bit_field): Pass zero. + + * cccp.c (main): Allow -Wcomment like -Wcomments. + * c-decl.c (lang_decode_options): Likewise. + + Sun Mar 5 15:02:59 1989 Randall Smith (randy at apple-gunkies.ai.mit.edu) + + * m68k.md [tstdf, cmp[sd]f, truncdfsf2, floatsi[sd]f2, add[sd]f3, + sub[sd]f3, mul[sd]f3, div[sd]f3, neg[sd]f2, abs[sd]f2]: Made sure + that the test function's in the match_operands of the define_expand + and define_insn's matched, and made that test function + "register_operand" when both define_insn's really needed registers + in that spot. + + Sat Mar 4 00:25:37 1989 Richard M. Stallman (rms at c2v) + + * expr.c (emit_push_insn): Don't ever bypass the big-endian + padding at the end. + + * cccp.c (deps_output): Break line if would otherwise exceed 75 chars. + Make a name for that value 75. + + * combine.c (subst): Handle general case of (subreg (sign_extend X)). + + * tm-sun386i.h (CPP_PREDEFINES): Define `sun'. + + * fixincludes: change `find' calls to find dirs thru symlinks. + + * flow.c (mark_set_1): (set (subreg (reg N))...) + does make reg N significant for this basic block. + + Fri Mar 3 13:55:25 1989 Richard M. Stallman (rms at c2v) + + * c-decl.c (parmlist_tags_warning): Print an explanation + for the first such warning. + + * i386.md (extendsfdf): Let op 1 match op0 if that is an fp reg. + + * expr.c (expand_call): Fix stupid errors copying pcc struct value. + + * varasm.c (output_constructor): Discard NOP_EXPRs from build_c_cast. + Thu Feb 23 05:55:57 1989 Richard Stallman (rms at sugar-bombs.ai.mit.edu) *************** *** 1152,4802 **** * tm-ns32k.h (FUNCTION_PROLOGUE, ASM_OUTPUT_ALIGN_CODE): Add missing backslashes. - - Wed Dec 21 02:46:34 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.32 released. - - * toplev.c (main): Vax pcc enforces goto-less programming - with fatal error. - - * stmt.c (fixup_memory_subreg): New arg INSN says where to emit insns. - (walk_fixup_memory_subreg): Likewise. All callers changed. - - Tue Dec 20 01:26:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-decl.c (start_function): Don't clear TREE_PERMANENT in fn decl. - Make the result decl a permanent node. - (finish_function): Don't clear DECL_RESULT in an inline function. - (duplicate_decls): Don't lose DECL_RESULT or DECL_SAVED_INSNS - or old decl, when defn is followed by redeclaration. - Likewise DECL_ARGUMENTS and DECL_RESULT_TYPE. - - * stmt.c (expand_function_end): End any sequences left unterminated. - - * cse.c (predecide_loop_entry): If "loop" has no label, do nothing. - - * recog.c (asm_noperands): Now return -1 if not that kind of insn. - All callers changed. - * combine.c (check_asm_operands): Calling changes not quite trivial. - * final.c (final): Likewise. - * reload.c (find_reloads): Likewise. - * recog.c (asm_noperands): Other changes: - Loop computing # of SETs in a PARALLEL was off by 1. - Validate all elts of any PARALLEL, to block invalid combinations. - - * ns32k.md (andsi3, andhi3): Make new CONST_INTs; don't clobber old. - - * integrate.c (copy_rtx_and_substitute): When looking in `parm_map', - if our mode mismatches parm's mode, use change_address to extract part. - On BYTES_BIG_ENDIAN machines, adjust the offset. - - Mon Dec 19 23:50:14 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cexp.y ('/' and '%' ops): If divide by 0, print error, don't die. - - Sun Dec 18 14:03:02 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * toplev.c (main): Avoid shadowing I in inner block. - - * flow.c (propagate_block): The insn at the end of a libcall - may be dead, but the libcall might still be needed if the - hard return reg is used later. Detect this case. - (libcall_dead_p): New fn used to check that the libcall is dead. - - * output-m68k.c, tm-m68k.h (standard_sun_fpa_constant_p): Fn renamed. - - Sat Dec 17 13:23:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stmt.c (expand_end_bindings): error_with_file_and_line => ..._decl. - - * combine.o (try_combine): Accept combination making a valid - asm with operands. - (check_asm_operands): Recognize asm with operands that are valid. - - * loop.c (strength_reduce): Don't accept a reg as a giv - if the reg was made by loop-optimize. - - * stmt.c (balance_case_nodes): A list of 3 always splits in middle. - - Fri Dec 16 17:22:07 1988 Tiemann (rms at sugar-bombs.ai.mit.edu) - - * sparc.md (fetch from constant address): Split into two patterns, - one fixed point and one floating. - (store at constant address): Handle remembered hi-half differently. - Other bug fixes. - (fix_truncsfsi2): Use f1, not f0, as temp. - (fix_truncdfsi2): Don't clear CC_F1_IS_0. - - * output-sparc.c (singlemove_string): Changed handling of case - where op1 is not memory and op0 has varying address. - (output_fp_move_double): Avoid reloading high half address - in the ldd and std cases with constant address. - (make_f0_contain_0): Handle f0 and f1 individually. - - * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): CONST is now illegitimate. - - * rtl.c (note_stores): Pass entire SET rtx, not flag, as 2nd arg to FN. - * local-alloc.c (reg_is_set): New type for 2nd arg. - - * Makefile: Comment out cc1plus, since not ready for release. - - Thu Dec 15 16:39:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * local-alloc.c (reg_is_set): If a hard reg is clobbered, make it free - before and after the insn. - * stupid.c (stupid_mark_refs): Likewise. - * global-alloc.c (global_conflicts): Likewise. - Use note_stores to call mark_reg_{store,clobber}. - (mark_reg_store): Changed calling conventions - All work done on set/clobbered regs is now done here. - Ignore CLOBBERs. - (mark_reg_clobber): Similar fn, but ignore SETs and handle CLOBBERs. - (regs_set, n_regs_set): New static vars for comm. among the above. - - * stmt.c (expand_asm_operands): call protect_from_queue on operands. - This requires preexpanding the outputs into a vector of rtx's. - - * Makefile (install): cd to $(libdir) before ranlib. - - * c-typeck.c (c_expand_asm_operands): emit_queue at the end. - - * reload.c (find_reloads): Count # alternatives properly for - an asm insn, and check that all operands correspond. - - * loop.c (verify_loop): Reject loops containg setjmps. - * cse.c (cse_main): Don't cse across a call to setjmp. - - * expr.c (expand_expr): Permit any non0 DECL_RTL for a VAR_DECL. - - * stmt.c (balance_case_nodes): Count ranges double when balancing. - - Wed Dec 14 13:50:45 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * final.c (output_addr_const): Output just `-', not `+-'. - - * make-cc1.com: Update filenames changed to `c-'. - * make-cccp.com: Pass needed -D options when compiling cccp.c. - Use /nomap when linking. - - * loop.c (strength_reduce): Paraphrase setting NEW_REG, for Iris cc. - - * output-m68k.c (output_move_const_single): %'s must be doubled twice. - - * loop.c (record_giv): A giv can be replaceable if its uses are - all in the same basic block as its sole setting. - (last_use_this_basic_block): Subroutine to test that. - - Tue Dec 13 13:41:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expr.c (do_store_flag): Allow for COMPARISON to be a const_int. - - * c-decl.c (pushdecl): Warn if type mismatch with another external decl - in a global scope. - - * fixincludes: Fix typo in msg of deleting unchanged file. - - * Makefile (insn-*): Use two-step rules with a separate time-stamp file - to avoid rerunning gen* unless md has changed again. - - Mon Dec 12 13:32:05 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * i386.md (tstsf, tstdf, cmpsf, cmpdf): Use fnstsw, not fstsw. Faster. - - * tm-vax.h (ASM_OUTPUT_REG_POP): Use correct asm syntax for pop insn. - - * combine.c (subst): Handle (subreg (mem)) by making a changed mem. - This avoids producing any (subreg (mem))s except in the special - case they are supposed to be made here. - Also set undo_storage in a couple of cases that forgot to. - - * reload.c (push_reload): When handling (SUBREG (MEM)) for IN, - if there is an OUT, make that a separate reload. - Return its number in `output_reloadnum' - (find_reloads): When pushing matching-reloads, note that the - two operands can have different reload-numbers. - - * tm-3b1.h (ASM_OUTPUT_CASE_END): Test flag on TABLE, not its pattern. - (ASM_OUTPUT_CASE_LABEL): If /i flag set, don't output the dummy entry - since the fetcher-insn will not be off by 2 in this case. - * m68k.md (casesi_2 recognizer): For 3b1 syntax, compensate for that. - - Sun Dec 11 12:51:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * genrecog.c (try_merge_2): No longer put all explicit decompositions - before all predicates. Patterns are now tested in the order written. - * vax.md: Move the push-or-move-address patterns to the end. - * m68k.md: Move load-address pattern to end. - Rearrange the special-case movsi patterns. - * ns32k.md: Move special load-reg-17 pattern before movsi. - * i386.md: Move the QI and DI push patterns to logical places. - This should not actually change anything. - - * stmt.c: Add Andy Hitchins's binary-tree case statement code. - (struct case_stmt): case_list field is now a case_node chain. - Replace has_default field with default_label field. - (pushcase, pushcase_range): Build case_list in its new type, - and keep it sorted. - (expand_end_case): Use case_list in its new type. - Count a range of > 1 as two cases, when choosing strategy. - (group_case_nodes, balance_case_nodes): New fns, rearrange case_list. - (node_has_{low,high}_bound, node_is_bounded): New fns test - relationships of values of various case_list tree nodes. - (emit_jump_if_reachable): New fn. - (emit_case_nodes): Emit compares and jumps based on tree of case_list. - - * cccp.c (finclude): Handle nonordinary files (stat doesn't give size). - - * tm-3b1.h (PRINT_OPERAND_ADDRESS): Handle case of breg and no ireg. - - Sat Dec 10 16:30:32 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * sparc.md (movstrsi): Separate define_expand and define_insn; - clobber some pseudos to get temp regs to use in the output. - * output-sparc.c (output_block_move): Use those temp regs, - guaranteed to be free. - - * sparc.md (andcc patterns for bitfields from memory): - Test immed. arg for being in range. - (load DFmode constant): Use %m for output in one case. - * output-sparc.c (singlemove_string, output_move_double): Likewise. - - * output-sparc.c (singlemove_string): New case for mem-to-mem move. - - Fri Dec 9 11:42:15 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stupid.c (stupid_mark_refs): for CLOBBER of a pseudo, - it is born just before this insn and dies just after. - - * tm-vax.h (NOTICE_UPDATE_CC): For aob, sob insns, forget the cc's. - - * basic-block.h (REG_BLOCK_UNKNOWN, REG_BLOCK_GLOBAL): Move defn here. - * local-alloc.c: Use them. - - * c-decl.c (store_parm_decls): Additional explanatory message - for some prototype mismatches. - - * gnulib.c (SItype): New macro used instead of `int' - for SImode operands and values. Definition is `long int'. - - Thu Dec 8 18:45:48 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload.c (operands_match_p): Move the label `slow' so that - it doesn't cause a REG and a SUBREG to be compared wrong. - - * toplev.c (compile_file): Output a label `gcc_compiled.' for GDB. - If new macro ASM_IDENTIFY_GCC is defined, run that instead. - * tm-3b1.h (ASM_IDENTIFY_GCC): Define this as no-op. - - Wed Dec 7 12:20:42 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * i386.md (adddf3): Typo: paren was in a constraint. - - * c-decl.c (grokparms): Avoid duplicate msgs for incomplete type ptrs. - - * gnulib.c: Rename all fns to start with `__'. - * optabs.c, expr.c: Rename all references. - - * gnulib.c (__cmpdi2, __ucmpdi2): New fns. - * optabs.c (emit_cmp_insn): Use them. - - * Makefile (stage*): Ignore errors on the main `mv' (for cc1plus). - Run ranlib if we have to copy gnulib. - - * expmed.c (expand_divmod): Split `label' into several local vars. - - * jump.c (jump_back_p): Do nothing unless cc's were set from integers. - - Tue Dec 6 12:00:21 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-parse.y (extend_token_buffer): Use xrealloc, not realloc. - - * integrate.c (output_inline_function): fix args of expand_function_end - (expand_inline_function): Add missing arg to expand_end_bindings. - - * cse.c (cse_insn): Add missing MODE arg to canon_hash. - - * reload1.c (reload_as_needed): Del. extra arg of choose_reload_targets - (reload): Add missing MODE arg to immediate_operand. - - * expmed.c (expand_mult): Delete extra arg to expand_unop. - - * c-typeck.c (default_conversion): - Add missing NOCONVERT arg to build_unary_op. - - * c-decl.c (duplicate_decls, finish_struct): Add missing arg - KNOWN_ALIGMENT to layout_decl. - * stor-layout.c (layout_record): Likewise. - * varasm.c (assemble_variable): Likewise. - - * dbxout.c (dbxout_init): Add missing LOCAL arg to dbxout_symbol. - - * expr.c (clear_storage): Remove excess arg to emit_move_insn. - - * loop.c (consec_sets_invariant_p): Add parens in hairy if-condition. - - * fold-const.c (fold): Typo, missing `case'. - - * cccp.c (main): Typo handling `-I-' option. - - * tm-i386.h (NO_FUNCTION_CSE): Define this; cse is said to slow - things down with less than 7 calls. - - * stmt.c (fixup_var_refs_insn): When scanning the reg-notes, - don't touch other insns they point at. - - * expr.c (do_jump): Use invert_exp, not reverse_condition, - to invert sense of a jump. - * jump.c reverse_condition now static, invert_exp now global. - - Mon Dec 5 10:51:39 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tm-sun386.h (ASM_FILE_START): In the .file arg, exclude directories. - - * stmt.c (expand_expr_stmt): If -W, warn if stmt has no side effect. - - * cccp.c (monthnames): Capitalize each name. - - * rtl.def: New code MATCH_OPERATOR. - * genconfig.c (walk_insn_part): Handle it. - * genextract.c (walk_rtx): Handle it. - * genpeep.c (match_rtx): Handle it. - * genrecog.c (add_to_sequence): Handle it. - * genemit.c (max_operand_1, gen_exp, gen_expand): Handle it. - * genoutput.c (scan_operands): Handle it. - (insn_n_alternatives): New array in the output. - (struct data): New slots n_alternatives and op_n_alternatives. - (scan_operands, gen_insn, gen_peephole): - Record op_n_alternatives for each operand. - (output_epilogue): Verify that all operands have same # of alternatives - Also output insn_n_alternatives. - - * reload.c (find_reloads): use insn_n_alternatives to control - the loop over all alternatives. - An empty constraint or empty alternative in a constraint - is always satisfied. - * recog.c (constrain_operands): Likewise. - - * c-decl.c (lang_decode_option): For each -f option, recognize a form - with `no-' and a form without, as contraries. - - * toplev.c (main): Decode -f options using a table - so that each option automatically has a `no-' variant. - - * combine.c (try_combine): Give up if I1 or I2 follows a compare insn. - - Sun Dec 4 12:00:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * varasm.c (data_section): If flag_shared, use SHARED_SECTION_ASM_OP - if that is defined. - - * cccp.c (include_default): Add /usr/local/include. - - * Makefile (install): Install the makefile. - - * varasm.c (assemble_external): New fn to declare an external. - (assemble_variable): Output nothing for externals. - * c-parse.y (primary => identifier): Call assemble_variable on 1st use. - - * toplev.c (main): Print version info on stderr, not stdout. - * tm-*.h (TARGET_VERSION): Likewise. - - * tm-isi68.h, tm-news800.h: Rename __HAVE_FPU__ to __HAVE_68881__. - - * sparc.md (seq, etc): Entire page rewritten by Tiemann - to avoid incorrect use of PARALLEL. - * output-sparc.c (gen_scc_insn): Corresponding changes. - - Sat Dec 3 00:03:19 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * gcc.c (do_spec_1): %P is an ANSIfied form of %p: - put __ at beg and end of each predefined macro name. - - * tm-sun3.h (CPP_SPEC): Don't define -Dmc68010, etc., if -ansi. - * tm-sun2.h (CPP_SPEC): Likewise. - - * c-decl.c (shadow_tag): Don't complain if declare a new tag - at top level, or if redeclare a tag. - - * c-decl.c (grokparms): Warn if parm points to incomplete type. - (We already err if its own type is incomplete.) - - * stmt.c (fixup_var_refs_insns): Fix any (SUBREG (MEM)) in REG_NOTES. - (walk_fixup_memory_subreg): New subroutine used for this. - - * integrate.c (copy_rtx_and_substitute): Handle MEM refs to the middle - of a stack-parm--at least in the case of reading the parm. - - * rtl.c (rtx_equal_p): REG_FUNCTION_VALUE_P is significant - only until end of reload pass. - * toplev.c (rest_of_compilation): - Control that by setting new var rtx_equal_function_value_matters. - - * c-decl.c (init_decl_processing): Don't declare the builtins - that aren't really implemented. - - * output-sparc.c (output_move_double): "in structure" implies - 8-byte alignment only for DFmode, not for DImode. - - * final.c (output_operand_lossage): Cleaner text for error msg. - No longer need to write text into .s file, now that linenum is correct. - - * c-decl.c (pushdecl): -traditional stops warning - about "declared extern, later static". - - * c-typeck.c (build_indirect_ref): Don't handle flag_volatile here. - * expr.c (expand_expr): Handle it here, in INDIRECT_REF case. - This prevents -fvolatile from causing additional warnings. - - * output-sparc.c (output_load_address): Allow REG+REG for operands[3]. - - * m68k.md (movsi): If we output the label LIn, - set the RTL_INTEGRATED flag in the switch table's pattern. - * tm-3b1.h (ASM_OUTPUT_CASE_END): Define LD%n only if LI%n was output. - - * i386.md (push-and-add pattern): Comment it out. - It's said to result in slower code. - - * i386.md (tstqi, tsthi, tstsi): Output real `test' insn if op is reg. - - * i386.md (push for DI): Allow `oiF' for 2nd operand. - - Fri Dec 2 13:57:35 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * i386.md (movdi): Allow F constraint for 2nd operand. - - * i386.md (push for QI): define pattern to push a QImode - which really uses pushw and therefore really pushes a halfword. - * tm-i386.h (PUSH_ROUNDING): Round up to multiple of 2. - - * gcc.c (do_spec_1): Handle %e, which means report an error. - Use it to prohibit -pg with -fomit-frame-pointer. - - * tree.h (DECL_RESULT_TYPE): New field in FUNCTION_DECL holds the type - of the widened returned value (not nec. the declared return type). - * c-decl.c (start_function): Set DECL_RESULT_TYPE. - * integrate.c (expan_inline_function): Use that, not DECL_RESULT. - - Thu Dec 1 16:44:10 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cse.c (fold_rtx): When reordering constant args, insist on - manifest constants; regs with known contents won't do. - - * i386.md (mulsi3): Don't use rtx_equal_p to compare regs. - - * expr.c (move_by_pieces_1): Don't call change_address - if address is autoinc, since that may not be memory_address_p. - Subroutine-macro add_offset deleted. - - * optabs.c (bcc_gen_fctn, setcc_gen_fctn): Moved to this file. - (init_optabs): Init those tables here. - * expr.c (init_conditions): Not here. - - * stmt.c (assign_stack_local): Make a list of all stack slots. - * emit-rtl.c (unshare_all_rtl): Unshare all the stack slots. - - * final.c (final): Handle BARRIER with ASM_OUTPUT_ALIGN_CODE. - * tm-ns32k.h (ASM_OUTPUT_ALIGN_CODE): Align to 4-byte bdry. - ?? * tm-sequent.h (ASM_OUTPUT_ALIGN_CODE): Override: just 2-byte bdry. - - * tm-m68k.h (PRINT_OPERAND): use new macros to print floats. - (ASM_OUTPUT_FLOAT_OPERAND): New macro. - (ASM_OUTPUT_DOUBLE_OPERAND): New macro. - * tm-sun3.h: Override those macros, to check for infinities. - - Wed Nov 30 06:35:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tm-ns32k.h (FUNCTION_{PRO,EPI}LOGUE): if no frame pointer, - do explicit push or pop insns. - - * tm-genix.h (PRINT_OPERAND): Fix typo `file'. - Extedn decl for paren_base_reg_printed. - (MAIN_FUNCTION_PROLOGUE): Deleted. - (ASM_OUTPUT_EXTERNAL): Defined. - - * c-parse.y (yyerror): Better error msg for unprintable char in token. - (primary => identifier): Set TREE_USED if implicit decl made. - - * Makefile (cleanlinks): New target. - (INSTALL): New variable, has program used for installing files in sys. - - * output-ns32k.c (print_operand_address): If addr is sum of 2 consts, - output ADDR first, then OFFSET. - - * ns32k.md (addsi3): Allow adding const+reg with result in another reg. - - * tm-seq386.h (FUNCTION_PROFILER): Provide overriding definition. - - * tm-hp9k320.h: Alternate ASM_SPEC if using GAS. - Define STANDARD_STARTFILE_PREFIX if using GAS. - (FUNCTION_PROLOGUE): on 68020 for big stack frame use link.l. - - * gcc.c (STANDARD_STARTFILE_PREFIX): New cust. macro replaces `/lib/'. - - * va-sparc.h, va-spur.h: Prefix non-interface identifiers with `__'. - - * optabs.c (init_optabs): Don't set up libcalls for ftrunc_optab - because (1) they aren't supported and (2) they are never used. - - * gnulib.c (__builtin_saveregs): If not sparc, define the symbol anyway - to avoid a warning in ranlib. - - Mon Nov 28 01:46:12 1988 Michael Tiemann (mdt at choctaw) - - * c-parse.y (yylex): Typo, `=' for `==' making wide strings. - - * sparc.md (various places): make sure that all patterns which store - can store using const0_rtx (i.e., make all operands to `st' %rx). - - * output-sparc.c (various places): changed dispatches on SYMBOL_REF - to dispatches on CONSTANT_ADDRESS_P since we now recognize any CONST - (and not just SYMBOL_REFs). Don't recognize special case CONST for - output_block_move. Compiler doesn't have enough information to use - it. - - * stmt.c (expand_fixup): If the control stack is nested within the - nesting stack, then no fixup is needed. Otherwise, compiler must - check for possible fixups between the current nesting stack and the - nesting stack that immediately contains the control stack. - - * stmt.c (expand_function_start): functions which are nested use - DECL_CONTEXT. For these functions, test that their DECL_CONTEXT is - a LET_STMT node. - - * tree.h: declare `build_offset_type'. - - Sun Nov 27 10:34:53 1988 Richard Stallman (mdt at yahi) - - * output-sparc.c (output_move_double): - Don't try to use ldd/std if OP1 is a constant. - * sparc.md (movdi): Allow immediate args moved into general regs. - - * c-decl.c (grokparms): Reject incomplete parm types even if just - declarating, not defining. Change types to error_mark_node - in both the PARM_DECL and the list of types. - - * dbxout.c (dbxout_type): It's not a bug if a RECORD_TYPE - has a typedef as its TYPE_NAME. That happens in C++. - - * Make each `asm' with operands record its source file/line - with reg-notes. It doesn't work to emit a special note before the insn - because the insn can be moved by loop_optimize. - * stmt.c (expand_asm_operands): New args FILENAME, LINE. - Record them in the insn, in reg notes. - * c-typeck.c (c_expand_asm_operands): New args, passed along. - * c-parse.y: Pass those args. - (maybe_type_qual): Line #s for asm stmts emitted like all others. - * rtl.h (REG_ASM_FILE, REG_ASM_LINE): New kinds of reg notes. - * toplev.c (error_for_asm): Get the info from those notes. - - * reload.c (find_reloads): Don't clear BADOP for a reg letter - if the alternative ultimately doesn't allow any regs. - - * reload.c (find_reloads): If an `asm' insn gets an error, - change it to a USE to avoid duplicate error msgs or later trouble. - - * reload.c (find_reloads_address): Reloading a constant address, - specify Pmode as the mode for push_reloads, in case of CONST_INT. - - * expr.c (emit_push_insn): Fix calc. of space needed when PARTIAL > 0. - Both scalar case and BLKmode case needed fixing. - - * sparc.md (load/store constant address): - Moving DF from mem to cpu regs, don't go via %f0. - Don't use std/ltd if alignment is wrong or uncertain. - - Sun Nov 27 10:34:53 1988 Michael Tiemann (mdt at yahi) - - * reload.c (push_reload): Allow VOIDmode for INMODE, OUTMODE; - default the mode from the operand values. - - * sparc.md: remove patterns which generate annulled branch insns. - They are correct, but those insns confuse GDB. - - * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): - Treat any constant address like a SYMBOL_REF. - * sparc.md: Check for CONSTANT_ADDRESS_P rather than SYMBOL_REF. - - * sparc.md: Peepholes now accept SYMBOL_REF addresses. - The output routine can now split them properly even as delay insns. - - * print-tree.c (dump): added entry for METHOD_TYPE and - METHOD_CALL_EXPR. Also added entry for WITH_CLEANUP_EXPR. Suggest - that we make first_rtl of WITH_CLEANUP_EXPR 2 instead of 1. - - Sun Nov 27 00:15:33 1988 Michael Tiemann (mdt at yahi) - - * print-tree.c (dump): added entry for OP_IDENTIFIER. - - * tree.c (build_op_identifier): new function. Needed because - `build_nt' expects an "e" node, but OP_IDENTIFIER is an "x" node. - - * store_layout.c (layout_record): use DECL_FIELD_CONTEXT instead of - DECL_CONTEXT. - - * tree.h (DECL_FIELD_CONTEXT): new macro. Points to the type that a - FIELD_DECL is a member of. For C, this is just DECL_CONTEXT. - - * tree.c (build_method_type): typo used "==" to assign basetype to - TYPE_METHOD_BASETYPE with predictably poor results. - - Sat Nov 26 22:55:32 1988 Michael Tiemann (mdt at yahi) - - * output-sparc.c (output_sized_memop): new function to output a load - or store insn based on the size of the operand loaded or stored. - (make_f0_contain_0): use info from condition codes to decide whether - the register %f0 needs to have 0 loaded from memory or not in order - to contain zero. - (gen_scc_insn): new function used by define_expands for - set-on-condition-code insns. - (output_delay_insn): now knows how to handle load and store - scheduling when the load or store operation takes two insns instead - of one. The rewrite is now understands is this: - - sethi %hi(address),%g1 -> sethi %hi(address),%g1 - ld/st [%g1+%lo(address)],%reg -> b target - b target -> ld/st [%g1+%lo(address)],%reg - nop -> ;; gone - - * jump.c (reverse_condition): make this function publicly visible, - now needed in expr.c. - - * output-sparc.c (reg_or_0_operand): new function, returns nonzero - if operand is const0_rtx or a register of specified mode. - (hardreg): deleted. - - * expr.c, stmt.c: fixed random syntax errors. - - * tree.c (build_method_type): now corresponds to defn in tree.def - expr.c (expand_call): removed code to get FUNCTION_TYPE from - METHOD_TYPE. This should probably be looked at harder. - - * tree.def (METHOD_TYPE): Changed definition so that TREE_TYPE (m) - (where m is a METHOD_TYPE) is the type of the return value of the - method, not the FUNCTION_TYPE from which the METHOD_TYPE is derived. - - * Makefile: Changed target of BINDIR from /usr/local to - /usr/local/bin. - - Sat Nov 26 16:29:22 1988 Michael Tiemann (mdt at chickasaw) - - * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): Allow any SYMBOL_REF. - (NOTICE_UPDATE_CC): Remember high half of %g1 as a "condition code" - to avoid reloading it if it does not change. - (NOTICE_UPDATE_CC): Test SET_SRC, not SET_DEST, for a CALL rtx. - (PRINT_OPERAND): New code-letter `m' says output operand as an address. - - * toplev.c (flag_syntax_only): New flag variable. - * flags.h: Likewise. - - * toplev.c (error_with_decl): Extra arg, passed to fprintf. - (warning_with_decl): Likewise. - - * tree.c (build_offset_type): New function. - - * tree.h (TYPE_METHOD_BASETYPE): New name for TYPE_METHOD_CLASS. - Uses in tree.c and... renamed. - - * combine.c (SUBST_INT): New macro, for replacing an int. - (subst): Collapse nested SUBREGs even if SUBREG_WORDs are not 0. - - * expr.c (bcc_gen_fctn, setcc_gen_fctn): new tables, - initialized in init_comparisons. - Used in expand_expr, do_jump, do_store_flag - instead of explicit construction of a jump. - - * expr.c (save_noncopied_parts): New function. - - * expr.c (expand_expr): - ARRAY_REF: Special case for array of constants. - WITH_CLEANUP_EXPR: Handle it. - INIT_EXPR: Case deleted. - MODIFY_EXPR: Use save_noncopied_parts. - - * expr.c (expand_call): blkmode_parms_forced can be >0 - even when no stack arg space otherwise needed. - Don't use a hard reg as a target if there are cleanups. - - * stmt.c (struct block): New elt. outer_cleanups. - (struct case): New elt. num_ranges. - (struct fixup): Changed meaning of cleanup_list_list. - Changes in expand_fixup, fixup_gotos. - (expand_fixup): Detect some internal forward-jumps - that need no fixups--for speed. - (fixup_gotos): New arg THISBLOCK. - (expand_expr_stmt): Handle flag_syntax_only. - (use_variable): No longer static. - (use_variable_after): new fn. - (expand_end_bindings): handle cleanups like a stack level. - (expand_decl): Handle a cleanup with no decl. - (move_cleanups_up): Preserve relative order of cleanups. - (expand_anon_union_decl): New fn. - (pushcase): New fast clause if no ranges yet. - (pushcase_range): Turned on. - (expand_function_start): New temp var `fntype'. - Set TREE_USED for a parm we are ignoring. - (expand_function_end): Really use the `filename' arg. - Use use_variable_after for SAVE_EXPR regs. - - * dbxout.c (dbxout_type): Handle OFFSET_TYPE. - - * gnulib.c (__builtin_new, etc.): Support for C++. - - * emit-rtl.c (next_insn, prev_insn): New fns. - - Sat Nov 26 16:29:22 1988 Richard Stallman (mdt at chickasaw) - - * tree.h (TREE_LANG_FLAG_[1234]): New attributes. - (TYPE_METHOD_BASETYPE): New name for TYPE_METHOD_CLASS. - (TYPE_OFFSET_BASETYPE): New macro. - (NUM_TREE_CODE): New macro. - (TYPE_NONCOPIED_PARTS): new field in a type-node. - - * varasm.c (make_decl_rtl): Split out from assemble_variable. - (assemble_variable): No longer creates the rtl. - No longer handles policy of whether to output tentative decl yet. - (output_constant_def): Don't lose if wasn't temp allocation - when this was called. - (output_constant): Handle REFERENCE_EXPR. - - * Makefile (BISONFLAGS): new variable. - (prefix): New variable, used in bindir and libdir. - (C_OBJS, CPLUS_OBJS): New vars, split off from OBJS. - (LIBFUNCS): C++ support functions added. - (CPLUS_TREE_H): New variable. - (cc1plus): New target. - (lang_c, lang_cplus): Combines all targets for one language. - (gplus.info): New target. - (cplus-*.o): New targets. - (realclean): Handle new C++ files and recent renamings. - (install, TAGS): Likewise. - - * print-tree.c (prtypeinfo): Handle TREE_LANG_FLAG_[1-4]. - - * tm-sparc.h (ASM_OUTPUT_DOUBLE): Special case for infinity. - (ASM_OUTPUT_FLOAT): Likewise. - - * gcc.c: Don't define __GNU__. - For .cc files, pass -+ to cpp, and don't handle -ansi. - Use cc1plus as name of compiler for .cc files. - - * stor-layout.c (layout_type): abort if given a LANG_TYPE node. - (layout_union): Complain if union has basetypes or static members. - (layout_record): Handle anonymous union members. - - * tree.def (LANG_TYPE): New tree code for language-specific purposes. - (WITH_CLEANUP_EXPR): New tree code for expressions whose values - need to be cleaned up when they are deallocated. - (OP_IDENTIFIER): New tree code for certain C++ purposes. - - * toplev.c (rest_of_decl_compilation): Call make_var_rtl - before assemble_variable. - - Wed Nov 23 02:15:45 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * xm-sunos4.h: Rename included config files to xm-*. - * xm-*.h: Likewise. - - * fixincludes: Avoid altering args to names other than CTRL - that end in ...CTRL. - If a file isn't actually changed, delete the copy. - - Mon Nov 21 12:48:22 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * loop.c (move_movables): Never move a reg w/ # > old_max_reg. - (strength_reduce): For nonreplaceable giv, put insn to load it - after the insn that used to compute it, in case the latter - is the last of a libcall sequence. - - * stmt.c (expand_function_end): If returning BLKmode, also copy - address where value is returned to the place that GDB will - expect to see it after the return. - - * c-parse.y (readescape): Warn about hex constant out of range - for a target integer. - (yylex): Warn about escape out of range for non-wide char or string. - Use a buffer of ints to read a wide string. - - Sat Nov 19 02:18:02 1988 Richard Stallman (rms at apple-gunkies.ai.mit.edu) - - * Version 1.31 released. - - * sparc.md: Change `K' to `I' in all constraints. - - * loop.c (gen_iv_mult): Handle TARGET==0. - - * c-decl.c (duplicate_decls): Undo last change. - - * c-decl.c (pushdecl): Instead of that change, - save old-decl's file/line before calling duplicate_decls, - and pass them later to warning_with_file_and_line. - * toplev.c (warning_with_file_and_line): New fn. - - Fri Nov 18 13:07:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stmt.c (fixup_var_refs_1): (SUBREG (MEM)) was slipping through - in case where a SET was writing in the variable being fixed. - - * recog.c (register_operand, nonmemory_operand, memory_operand): - Changes to handle new var reload_completed: 1 means that - (SUBREG (MEM)) now counts as a mem-ref, since alter_subreg - will make it one. - * toplev.c (rest_of_compilation): Set and clear reload_completed. - - * sparc.md (call patterns): If TARGET_SUN_ASM, and address in reg, - output a jmpl rather than a call. - * tm-sun4os3.h: Like tm-sparc.h but turn on TARGET_SUN_ASM. - - * reload.c (push_reloads): Reinstate handling of reg_equiv_constant. - - Thu Nov 17 09:48:14 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload1.c (constraint_accepts_reg_p): Name changed from - constraint_all_regs_p; new arg is reg we are concerned with, - and condition tested takes some advantage of that reg. - - * gcc.c (main): Rename var `error' to `error_count' for name conflict. - - * emit-rtl.c (emit_note): Output line #s even if no debug info wanted. - (emit_line_note): New fn, does what emit_note did. - (emit_line_note_force): New name for emit_note_force. - * stmt.c, c-parse.y: Call emit_line_note instead of emit_note. - - * c-parse.y (maybe_type_qual): Call emit_note instead of emit_line_note - Now we can find the line # of every `asm' from the RTL. - * toplev.c (error_for_asm): New fn, gets line # by searching for NOTE. - * reload.c (find_reloads): Use error_for_asm. - * reload1.c (choose_reload_targets): Likewise. - * final.c (output_operand_lossage): Likewise. - Variable this_is_asm_operands is now current insn if it's nonzero. - - * loop.c (move_movables): When a reg is moved, update regno_first_uid - and regno_last_uid; say life span includes entire loop. - * Decrement THRESHOLD per reg moved, not per insn moved. - - Wed Nov 16 08:41:32 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * gnulib.c (___builtin_saveregs): New fn, for sparc. - - * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): Don't recognize - SYMBOL_REFs, except for the constants pool. - But do recognize REG+REG and SMALLINT+REG. - * sparc.md: New patterns for fetching and storing memory - whose address is symbolic and not "legitimate". - - * sparc.md (movsi): Add `f' to op1 constraint. - New output clause for result in fp reg. - (Floating point fetch patterns): Output sethi insns. - (call_value, related patterns): value-register has `register_operand'. - - * output-sparc.c (hardreg): New function. - (COMPATIBLE): Clause added for n_regs == 2. - (single_insn_src_p): Return 0 for MEM whose address is absolute. - - * tm-genix.h (GO_IF_LEGITIMATE_ADDRESS subroutines): - Redefine, to exclude any possibility of SB-referencing addresses. - - * loop.c (strength_reduce): Can't eliminate a biv if used before - start of the loop. Used before is same as used after, if contained - in another loop. - - * recog.c (asm_noperands, decode_asm_operands): - Handle case of no outputs, but some clobbers. - * stmt.c (expand_asm_operands): Generate right stuff for that case. - - * tm-sun3.h (CPP_SPEC): Don't define __HAVE_68881__ if using fpa. - - Tue Nov 15 00:10:26 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * loop.c (gen_iv_mult): Arg OP0 may not be a constant. - Pay attention to return value of expand_mult. - (eliminate_biv): Call changed. - - * output-m88k.c, output-sparc.c (output_move_double): - Fix typo `optype0' for `optype1'. - - * c-decl.c (duplicate_decls): Don't alter file, line of old decl. - - * c-parse.y (skip_white_space): Don't recognize comments; rely on cpp. - - * rtl.c (rtx_equal_p): Handle vectors. - - * loop.c (scan_loop): Change elts of n_times_set back to positive - for candidates that weren't moved, before doing strength reduction. - - * ns32k.md (movdi, movdf): Use `&' constraint for first operand. - - * reload1.c (reload): Initialize spill_indirect_ok here. - - * config-sun4.h: Recognize `-static' switch. - - * global-alloc.c (set_preference): Avoid using nonsense hard reg #s - that result from adding OFFSET. - - * sdbout.c (sdbout_end_function): Line # in .ef should be relative. - - * final.c (output_source_line): For SDB, don't output negative #s. - - * tm-encore.h (ASM_OUTPUT_LOCAL): Don't ignore SIZE arg. - - Mon Nov 14 11:03:16 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload.c: Don't declare refers_to_regno_p. - - * gcc.c (main): Warn if any input files are for the linker - but the linker is not being run. - - * jump.c (sets_cc0_p): Dumb bug fetching elts of a PARALLEL. - - * local-alloc.c: qty_birth, qty_death elements are now -1, not 0, - when the value is not known. - - * expmed.c (extract_bit_field): Bug computing xbitpos, xoffset - when changing units from bytes to words. - - * loop.c: Rename `times_used' field in `struct movable' to `savings'. - (scan_loop): When scanning the consecutive sets, for each libcall, - increment `savings'--leave `consec'. - When making movable for (SET (REG) 0) which is part of zero-extension, - set `savings' to 1 initially, since only 1 insn will be moved. - And don't let any other reg force that insn. - Reduce initial THRESHOLDs. - (move_movables): Don't add `consec' into `savings' - since the initial `savings' was proportional to `consec'. - Decrement THRESHOLD by 3 (not 2) for each move done. - - * reload1.c (choose_reload_targets): Strip subregs from OLD - before writing the output-reload move-insn. - - * reload1.c (reload): counted_for_groups and counted_for_nongroups - are now file-scope. Update them both when spilling. - (new_spill_reg): No need for counted_for_nongroups as arg. - (choose_reload_targets): Don't use for a group - any spill regs for which counted_for_nongroups is set. - - * dbxout.c (dbxout_symbol): Indirect-symbol case checked erroneously - for PARM_DECL. - - Sun Nov 13 08:13:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cse.c (fold_rtx): Don't alter MULT by -1 if arg mode != result mode. - - * loop.c (move_movables): If moving a CALL_INSN, make a new CALL_INSN. - * emit-rtl.c (emit_call_insn_before): New fn. - - * config-sun4.h (LINK_SPEC): Avoid shared libraries if -g. - - * expr.c (store_one_arg): Stabilize ARG->stack so it doesn't use SP - before computing the arg value. - - * combine.c (use_crosses_set_p): Moving a ref to stack ptr - is always forbidden if machine has push insns, since might cross one. - - * vax.md (movqi): Avoid out-of-range immed ops in mcomb. - - * expmed.c (extract_bit_field): Don't say `extzv' in the - clause for `extv'. - - * emit-rtl.c (copy_rtx_if_shared): Even if a MEM can be shared, - unshare its address from everything outside that MEM. - - * expr.c (expand_builtin): Fix omitted arg to `convert_to_mode'. - - * expr.c (store_expr): In case where will not return TARGET - and must do type conversion, don't fail to store into TARGET. - - * dbxout.c (FORCE_TEXT): New macro used before output `.stabs' - to go to the text section on targets that require it. - (DEBUG_SYMS_TEXT): Target macro which turns on that feature. - - * reload1.c (reload): Index in spill_regs was wrong - when checking counted_for_groups. - (choose_reload_targets): When calling find_equiv_reg looking for - a reload reg, reject all spill regs, even those not in use now. - - * tm-sun386.h, tm-sun386i.h, config-sun386i.h: New files. - - * cccp.c (main): Don't die if no output file arg given. - - * fixincludes: Tell `find' to find only ordinary files. - - * config.gcc: If symlink fails, make a hard link. - - Sat Nov 12 20:43:20 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Makefile (gnulib): Use cp to make the temporary .c files; - less likely to fail than ln. - - Sat Nov 5 12:46:39 1988 Randall Smith (randy at sugar-bombs.ai.mit.edu) - - * tm-m68k.h (HARD_REGNO_MODE_OK): Disallowed d7:a0 as an allowable - pair of registers to hold a double value. This is correct for the - fpa but incorrect for the 68881. It was, however, simpler than - defining a new regclass. - - Tue Oct 25 12:03:49 1988 Randall Smith (randy at gluteus.ai.mit.edu) - - * m68k.md: Added some thoughts (comments) on best method to allow - 68881 code with fpa code. - - Thu Oct 13 14:19:17 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.30 released. - - * stupid.c (stupid_life_analysis): Init last_call_suid with - largest possible value, not 0. - - Wed Oct 12 04:40:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * output-i386.c (output_asm_insn_double_reg_op): Compensate for - assembler bug that interchanges fsub and fsubr. - - * reload1.c (order_regs_for_reload): Undo 29 Sept change. - It breaks the 386. - - * varasm.c (decode_rtx_const): Don't example value->addr - if what was stored in was value->d. - - * toplev.c (set_float_handler): New fn, specify where to jump - on floating exception signal. - * fold-const.c (combine): Use that to handle overflow in arithmetic. - - * c-decl.c (grokdeclarator): Don't clear CONSTP, VOLATILEP - when making an array type. - - * dbxout.c (dbxout_symbol): Ignore VAR_DECLs in memory whose - addresses we can't represent. - - * fold-const.c (fold): don't convert >= to > if both args are constant. - When converting >= to >, don't fail to change CODE. - - Tue Oct 11 04:13:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * vax.md (movhi): Error in truncating mcomw, addh3 args to 16 bits. - - * final.c: Better error checking for %-specs in templates. - (output_operand_lossage): new fn to report errors. - (insn_noperands): new var: # operands in current fn. - (this_insn_asm_operands): new var: 1 for `asm', 0 otherwise. - (output_asm_insn): Check for operand # out of range. - (output_asm_label, output_operand): Call new fn to report errors. - - * reload.c (push_reloads): An input reload for (REG N) can match one - for (POST_INC (REG N)) or (PRE_INC (REG N)), since the value - reloaded is the same in any case. - - Mon Oct 10 06:19:05 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * recog.c (next_insns_test_no_inequality): Like next_insn_tests... - but check all insns that follow this one and can use it's cc's. - * output-m68k.c (output_btst): Use that. - - * vax.md (movsf, movdf): Undo last change; movq/movl set the cc wrong. - - * expr.c (expand_call): Set current_function_calls_setjmp if appro. - * stmt.c (setjmp_protect): New fn: move all vars into stack - unless declared `register'. - * c-decl.c (finish_function): Call it if -traditional and setjmp used. - - * cccp.c (main): Open output after the input. - Handle `-o -'. - - Sun Oct 9 00:28:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tm-sun3.h (CPP_SPEC): Define __HAVE_FPA__ if appropriate. - - * c-decl.c (pushdecl): After duplicate_decls, maybe warn about - "declared extern and later static". - - * expmed.c (store_bit_field): In insv case, avoid turning - VALUE into a subreg of a subreg. - - * loop.c (move_movables): When moving a libcall, - un-cse the function address; put it into the call insn. - - Sat Oct 8 01:48:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cse.c (equiv_constant): Subroutine to find the constant equivalent - of a reg. Now handles SUBREGs too. - (fold_rtx, fold_cc0): Use that function. - Don't handle SUBREGs like arithmetic. - - * reload1.c (choose_reload_targets): Don't call reg_overlap_mentioned_p - if arg is 0. - - Fri Oct 7 01:00:19 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * assert.h: Typo declaring __eprintf. - - * config.gcc: New file for making the links. - Fixed bugs for sun-[23]-os4. Added sun-[234] for sunos 3. - Added sequent-i386. - - * emit-rtl.c (gen_rtx): Return const0_rtx for 0 in DImode. - * varasm.c (immed_double_const): Don't be confused by this. - - * expmed.c (negate_rtx): New 1st arg MODE. - * expr.c (push_block): Calls changed. - * m68k.md, ns32k.md, vax.md: Calls changed. - - * c-decl.c (duplicate_decls): Don't discard DECL_BLOCK_SYMTAB_ADDRESS. - - * tree.c (staticp): INDIRECT_REF with constant address is static. - COMPONENT_REF may not be, if component offset isn't constant. - - * c-typeck.c (default_conversion): Converting array to ptr, if array - isn't a VAR_DECL, go through build_unary_op so that COMPONENT_REFs - will be simplified away. - - * ns32k.md (tbitd patterns): op 0 constraint: reject constants. - * ns32k.md (extzv for SImode and HImode): - Use adj_offsetable_operand; plus_constant was the wrong thing. - - Thu Oct 6 00:10:41 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.29 released. - - * loop.c (scan_loop): Don't think a `return' insn enters the loop. - - * ns32k.md (ashrsi3, etc): New define_expands for right shift. - - * reload1.c (choose_reload_targets): Change in the `force_group' - logic to avoid crashes. - - Wed Oct 5 04:09:19 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * expr.c (expand_expr, MINUS_EXPR): When negating integer op1, - truncate it to its mode. - - * expmed.c (extract_bit_field): SUBREG error check was wrong; - SImode SUBREGs are possible and ok in extzv, extv. - - * tm-ns32k.h (REGISTER_NAMES): Had two excess elements; deleted. - - Mon Oct 3 01:15:51 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * toplev.c (main, compile_file): If no files spec'd, use stdin, stdout. - - * flow.c (propagate_block): When checking for stack-adjust insns, - exclude non-SET patterns. - - * jump.c (jump_optimize): When changing jump=>return to return, - must rerecognize the insn. - - * toplev.c (compile_file): Allow `-' for main input or output filename. - - Sun Oct 2 10:30:09 1988 Richard Stallman (rms at apple-gunkies.ai.mit.edu) - - * final.c (final): NOTICE_UPDATE_CC has extra arg, INSN. - * tm-*.h: Change definitions. - - * stmt.c (optimize_bit_field): Use gen_lowpart to make subregs. - - * stmt.c (assign_parms): Don't obey regdecls in inline function. - Don't lose existing REG_NOTES when adding one. - - * stmt.c (expand_function_start): Make return rtx before - marking parms live. - (expand_function_end): Use use_variable to emit USEs for SAVE_EXPRs. - - * stmt.c (expand_return): Handle TRUTH_AND_EXPR like ANDIF; OR also. - - * stmt.c (expand_end_stmt_expr): Always set TREE_VOLATILE, - sometimes TREE_THIS_VOLATILE. - - * jump.c (delete_insn): When finding PREV, skip deleted insns. - - * varasm.c (output_constant): WORDS_BIG_ENDIAN test was backwards. - - * emit-rtl.c (gen_lowpart): Allow MODE > 1 word if X is same size. - - * final.c (final): Don't delete no-op moves (jump did it if appro.). - - * final.c: Support prescan pass. - (final_start_function): init_recog and CC_STATUS_INIT mvd to `final'. - (final): New arg PRESCAN. Do no output if prescanning. - Don't alter conditionals if PRESCAN < 0 (prescan already done). - If jump becomes no-op, change it to a NOTE. - Remember to free the temp space for ASM_OPERANDS. - - * final.c (final): Altering store-flag must check STORE_FLAG_VALUE. - Don't try to do it if that isn't defined. - Don't try it if condition doesn't test CC0. - (alter_cond): No need to check COND != 0. - Handle CC_Z_IN_NOT_N and CC_Z_IN_N. - (m68k.md): Delete code that handled CC_Z_IN_NOT_N. - - * conditions.h: New flag CC_Z_IN_N. - * tm-*.h: Renumber all CC_... flags to make room. - - * combine.c (use_crosses_set_p): Loop start was 1 off. - - * local-alloc.c (reg_is_set): When a reg is CLOBBERed and dies in - one insn, make it live immediately before and after that insn. - - * global-alloc.c: Hard reg preferences for global pseudos. - Var allocno_preferred_reg deleted; new vars hard_reg_preferences - and regs_someone_prefers. - (global_alloc): Init those vars. Pass hard_reg_preferences elt - to find_reg. - (set_preference): New function makes entries in those vars. - (global_conflicts): new arg to mark_reg_store. Call set_preference. - (find_reg): Last arg now a preferred hard_reg_set. - Scan that set first of all. - (mark_reg_store): New arg is offset for renumbered regno. - But the code to use it is turned off. - - * global_alloc (check_frame_pointer_required): Handle reg_equiv_address - like reg_equiv_mem. Don't try to allocate pseudos with equiv mems - that don't use the frame pointer. - * reload1.c (reload): Call changed. - - * jump.c (sets_cc0_p): Tests whether rtx sets cc0, and whether - it does nothing but set cc0. - (find_cross_jump, delete_jump): Use that fn for these tests. - * loop.c (loop_skip_over): Likewise. - * reload.c (push_reload): Likewise. - - * genoutput.c: Output `const' before the data arrays. - Define it as nothing if not __STDC__. - - Sat Oct 1 02:19:29 1988 Richard Stallman (rms at apple-gunkies.ai.mit.edu) - - * expr.c (store_one_arg): 3rd arg to emit_block_move is in bytes. - - * cse.c (fold_rtx): Handling ZERO_EXTEND or SIGN_EXTEND of constant, - if the arg width is too wide to handle, return safely. - - * combine.c (FAKE_EXTEND_SAFE_P): Don't allow extend to > 1 word. - - * rtl.c (refers_to_regno_p): Moved from reload.c. Not static. - (reg_overlap_mentioned_p): New function, calls the above. - * output-*.c: Use that instead of reg_mentioned_p. - * tm-*.h (NOTICE_UPDATE_CC): Likewise. - * reload.c (push_reload, combine_reloads): Likewise. - * reload1.c (choose_reload_targets): Use it to check earlyclobbers. - - * reload1.c (choose_reload_targets): Elimination of previous - output-reload feeding our input now limited to pseudo-regs. - - * flow.c (life_analysis): Delete any insn copying reg to itself. - (propagate_block): Move update of OLD after special life and death - for CALL_INSNs. - - * vax.md (ashrsi3, ashrdi3, rotrsi3): define_expands to negate - the shift count. - * expmed.c (expand_shift): Eliminate negate-the-shift-count feature. - - * vax.md (and*i3): define_expands which use complement and bit-clear. - * expmed.c (expand_bit_and): Eliminate feature to do that. - This function could be eliminated. - - * expmed.c (store_bit_field): Handle nested subregs. - Allow gen_insv to fail; if it does, delete what we did and then - use store_fixed_bit_field. - (store_fixed_bit_field): Use gen_lowpart to make SUBREGs. - Do that for SUBREGs just as for REGs. - Error check OFFSET must be 0 for REGs. - (store_split_bit_field): Error check OP0 is a SUBREG when expected. - (extract_bit_field): Allow gen_ext{,z}v to fail. - Use gen_lowpart to make subregs. - (expand_shift): If a try fails, delete any insns it made. - - * expmed.c (expand_mult): Use expand_unop to negate. - When adding 2 powers of 2, do serial shifts, not parallel. - Handle absval==1 like other powers of 2. - - * explow.c (force_reg): Don't lose any existing reg notes. - - * stmt.c (expand_start_stmt_expr): Eliminate return value. - (expand_end_stmt_expr): No need for argument. - * c-parse.y (primary): Change calls. - - Fri Sep 30 01:50:22 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * integrate.c (copy_rtx_and_substitute, copy_address): - 'u' case erroneously returned the translated single element. - (copy_address): Special cases for frame-ptr and sums containing it. - MEM and LABEL_REF cases passed wrong arg to copy_rtx_and_substitute. - (copy_rtx_and_substitute): adjust mode of inline_target for context. - - * jump.c (true_regnum): For SUBREG of pseudo, use pseudo's # unchanged. - - Thu Sep 29 02:50:46 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * i386.md (movsi, mov{q,h}i): Use find_reg_note to look for REG_WAS_0. - * vax.md (movsi, movhi): Likewise. - - * varasm.c (decode_rtx_const): Was setting un.addr.base wrong - for a CONST. Should be symbol name, not the SYMBOL_REF. - - * rtl.c (rtx_equal_p): When comparing registers, check - REG_FUNCTION_VALUE_P. If there are `u'-slots in the rtx, ignore them. - - * rtl.c (reg_mentioned_p): Some rtx types were mistakenly treated - as uniquified (various constants). - - * rtl.c (read_rtx): Element type 'S' is string that may be omitted. - * rtl.def (define_insn, define_peephole): Add a last element, type 'S'. - * genoutput.c: Collect these optional last elements and output as - array `insn_machine_info' of structs `INSN_MACHINE_INFO'. - The last must be defined as a macro. - * recog.h (insn_machine_info): Declare it if appropriate. - - * regclass.c (record_address_regs): In PLUS case, look inside SUBREGs. - - * reload1.c (reload): Use reg_equiv_address for REG_EQUIVs with - invalid memory addresses. - When changing pseudos to mem refs at end, do FIX_FRAME_POINTER_ADDRESS - on their addresses. - (alter_reg): Check that with reg_equiv_mem. - (spill_hard_reg): If fp reg, spill regardless of basic_block_needs. - - * reload1.c (order_regs_for_reload): Don't put invalid regs into - potential_reload_regs at all. (They used to go at the end.) - - * reload.c (find_reloads): Store all earlyclobber operand in - reload_earlyclobbers (# in n_earlyclobbers): - * reload.1 (choose_reload_targets): Don't use value of find_equiv_reg - if it matches an earlyclobber operand. - - * reload.c (find_reloads_address for REG): - No need for explicitly excluding hard regs in these tests. - (find_reloads, find_reloads_address_1 for REG): likewise. - - * reload.c (push_reload): Code testing reg_equiv_constant should - be obsolete; add error check to verify this. - - * reload.c (hard_reg_set_here_p): Handle CLOBBERs, SUBREGs, overlap. - (refers_to_regno_p): Handle CLOBBERS. Handle overlap. - New arg ENDREGNO specs end of range to check for; - all callers changed (all in this file). - - * reload.c (find_reloads): SUBREG like REG in alternate recovery - for earlyclobber conflict. - The operands to unswap are those that are supposed to commute. - When operands match, copy the regclass of earlier one for later one. - - * stmt.c (optimize_bit_field): Don't use gen_extend_insn; - use convert_move, then reorder the insns. - * optabs.c (gen_extend_insn): Deleted. - - * optabs.c (emit_cmp_insn): Don't emit queue before recursion. - Don't convert size to SImode for cmpstrqi. - - * optabs.c (expand_binop): Keep any old REG_NOTES when adding them. - Always delete_insns_since if returning failure. - (expand_unop, emit_unop_insn): Keep any old REG_NOTES when adding them. - * spur.md (movhi): likewise. - - * RTL_EXPR_SEQUENCE is now a chain of insns, not a SEQUENCE. - * emit-rtl.c (emit_insns): New fn, emit a chain of insns. - * expr.c (expand_expr): Use that. - Also put const0_rtx in the RTL_EXPR_SEQUENCE (mark RTL_EXPR as output). - * stmt.c (expand_end_stmt_expr): Use get_insns to get the chain. - - * stmt.c (expand_end_stmt_expr): Put the RTL_EXPR on rtl_expr_chain. - (fixup_var_refs): Scan all waiting RTL_EXPRs not yet output. - Also scan all stacked sequences on sequence_stack. - - * genemit.c (gen_expand): Generate calls to {start,end}_sequence. - Use `emit' to handle a PARALLEL. - (FAIL, DONE): Change to fit gen_expand changes. - - * emit-rtl.c (change_address): abort if arg isn't a MEM. - - * emit-rtl.c: Sequences work now by saving and restoring first_insn - and last_insn. So these variables are used even when in a sequence. - emit_to_sequence has been deleted. - (start_sequence, end_sequence): Save and restore first_insn, last_insn. - (get_last_insn, add_insn): Sequences no longer need special treatment. - (delete_insns_since, reorder_insns): likewise. - (push_to_sequence): Set up to emit to a given existing insn chain. - - * emit-rtl.c (copy_rtx_if_shared): Don't copy INSNs. - Insert missing return stmt in MEM case (for MEMs ok to share). - (unshare_all_rtx): Now can copy the REG_NOTES simply. - Copy the LOG_LINKS too. - - * emit-rtl.c (make_safe_from): Treat SUBREG as X like a REG. - (delete_insns_since): Don't lose if FROM is the first insn. - (emit): Declare void, since no useful value. - Call simplejump_p properly. - (restore_reg_data_1): When a reg is an address, do mark_reg_pointer. - - * dbxout.c (dbxout_types): Call dbxout_symbol to do the work. - (dbxout_type_def): Deleted. - (dbxout_symbol): Set TREE_ASM_WRITTEN when a TYPE_DECL is output. - Don't output the same one twice. - - * cse.c (fold_cc0): LABEL_REF is not zero. - - * cse.c (cse_insn): Don't insert src, dest if they are the same place. - - * cse.c (lookup_as_function): Return entire rtx, not just operand. - (cse_insn): Caller changed. Also, copy the result before inserting it. - - * cse.c (fold_rtx): Put constant arg last if commutative op. - Handle idempotents and identities for mult, div, booleans, shifts. - - * cse.c (canon_hash): Parens were missing around shifts in "rotates". - - * c-convert.c (convert_to_integer): Truncate TRUTH_ANDIF_EXPR - like TRUTH_AND_EXPR; OR also. - - * c-typeck.c (build_binary_op_nodefault): Do truthvalue_conversion - for TRUTH_ANDIF, etc. - (build_unary_op): More simplifications for TRUTH_NOT_EXPR; - uses new fn `invert_truthvalue'. - - * recog.c (reg_fits_class_p): New name for reg_renumbered_fits_class_p - since it no longer needs to renumber. Also it now really assumes - arg is a REG. Callers changed. - * reload.c: Callers changed. - - * recog.c (general_operand): (SUBREG (MEM...)) need not alter mode. - (register_operand, nonmemory_operand): (SUBREG (MEM...)) is allowed. - (memory_operand): (SUBREG (MEM...)) is *not* allowed. - (mode_independent_operand): Operand names were backwards! - (No change in effect of this function.) - - * print-tree.c (dump): Some expr nodes contain rtx's. Print as rtx's. - - Wed Sep 28 18:51:12 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload1.c (choose_reload_targets): If a reload wanted a group, - don't allow a single register for it. - - Tue Sep 27 11:43:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * final.c (output_addr_const): Handle DImode CONST_DOUBLEs. - * tm-*.h (PRINT_OPERAND): Treat DImode CONST_DOUBLE like a CONST_INT. - - * vax.md (rotldi3): Insn deleted; it doesn't really exist. - - * toplev.c (report_error_function): Also mention the file name, - for parallel makes. New arg FILE; all callers changed. - - Mon Sep 26 15:44:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expmed.c (expand_shift): When using extzv, convert OP1 to SImode. - * c-typeck.c (build_binary_op_nodefault): Convert shift-count - to int regardless of result type. - - * output-spur.c (output_move_double): Fix typo, optype0=>optype1. - - * expr.c (expand_call): Avoid null deref on result of FUNCTION_ARG. - - * tm-i386.h (FUNCTION_PROFILER): Use correct assembler syntax. - - Sun Sep 25 12:13:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * fixincludes: Handle some files in netdnet, netdna, vaxif, vaxuba. - - * reload.c (find_reloads): Make no optional reloads if not -O. - - * loop.c (strength_reduce): Can't eliminate a biv if it's used - to compute a DEST_ADDR giv. Only DEST_REG givs are safe. - - * loop.c (general_induction_var): Shift & divide ops are linear - only in 1st operand; don't look for biv or giv in 2nd operand. - - * vax.md (fix_truncdfqi2): Use `%#'. - - Sat Sep 24 00:25:48 1988 Richard Stallman (rms at gluteus.ai.mit.edu) - - * loop.c (n_times_set, n_times_used): Now file-scope; - no longer passed as args to several functions. - - * loop.c (basic_induction_var): Accept reg as source value - only if it's invariant. - (strength_reduce): Benefit calculation and threshold changed. - Check reducibility of givs before trying to reduce them. - Check eliminability of biv before considering the givs; - let this affect the threshold. - (record_giv): New subroutine adds a giv to the chain. - - * ns32k.md (incrementing sp): Use cmpd insns to increment by 4 or 8. - - * integrate.c (expand_inline_function): Rename return_label - to local_return_label; avoid shadowing. - - Fri Sep 23 13:57:52 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * loop.c (loop_skip_over): Put the new label after the note that ends - the loop. - - * loop.c: New function strength_reduce and subroutines. - * toplev.c: New var flag_strength_reduce, set from -fstrength-reduce. - - * vax.md (sob insns): They were broken, with plus in one place - and minus in another. Use plus consistently. - - * rtl.h (REG_LIBCALL, REG_NONNEG): Two new kinds of reg-note. - * optabs.c (expand_binop, expand_unop): Make REG_LIBCALL notes. - * loop.c (scan_loop, move_movables): Move entire library calls. - Use m->set_src to get the expression, in case it's from a REG_EQUAL. - (consec_sets_invariant_p): Likewise. - - * loop.c (scan_loop): Start scan from loop_top, if entry is rearranged. - Watch out for pseudo regs created by strength_reduce; - they can't index regno_last_uid. - (replace_regs): # regs mapped is now an arg. - - * loop.c (count_loop_regs_set): Don't increment n_times_set past 127. - (consec_sets_invariant_p): Reject if N_SETS arg is 127. - - * toplev.c (rest_of_compilation): NREGS arg of loop_optimize deleted. - - * c-decl.c (store_parm_decls): Anything but an IDENTIFIER_NODE - in SPECPARMS indicates a parmlist, not an identifier list. - (get_parm_info): Use only PARM_DECLs when making the list of arg types. - - * combine.c (try_distrib): Boolean ops can't distribute through PLUS. - MULT can distribute through PLUS and only PLUS. - - Thu Sep 22 15:57:41 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * jump.c (jump_optimize): uncond jump to a return becomes a return. - - * integrate.c (copy_parm_decls, copy_decl_tree): Set TREE_USED. - Avoid inevitable "unused" warning for these decls. - - * c-typeck.c (comptypes): When comparing array types, - ignore qualifiers of element type. - - * tm-*.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Define new macros. - * final.c (final_start_function): Use them to protect around - the call to the profiling function. - * stmt.c (expand_function_start): Set current_function_needs_context - and current_function_returns_struct. - - * stmt.c (expand_null_return_1): If clear_pending_stack_adjust - doesn't clear it, do the adjust now. - * expr.c (clear_pending_stack_adjust): No-op if -finline-functions. - - * cccp.c (macarg1, skip_if_group): Backslash makes next char ordinary. - - * reload.c (find_reloads): Delete code to look for an equiv reg - for a reg being input-reloaded. This isn't safe. - * reload1.c (choose_reload_targets): Do it here. - - Wed Sep 21 00:36:22 1988 Richard Stallman (rms at hobbes.ai.mit.edu) - - * tm-sun3.h (CPP_SPEC): Define it based on TARGET_DEFAULT. - (STARTFILE_SPEC): Likewise. - - * reload1.c (choose_reload_targets): When redirecting prev insn - into this insn's reload-reg, check this doesn't break the prev insn - by giving it a reg it can't accept. Use new fn constraint_all_regs_p. - - * tm-sparc.h (ASM_OUTPUT_LOCAL): Use .reserve, not .common. - - * tree.h (TREE_USED): New attribute macro. - * c-parse.y (primary): Set TREE_USED in ..._DECL nodes. - * toplev.c, flags.h: Define and set warn_unused. - * stmt.c (expand_end_bindings): Warn if any var is unused. - * print-tree.c (prtypeinfo): Print this attribute. - - Tue Sep 20 15:29:01 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * assert.h: `assert' must expand to an expression. - Error message should show arg before expansion, not after. - - * c-decl.c (implicitly_declare): Make decl perm if !warn_implicit - since start_function needs to look inside it in that case. - - * toplev.c (announce_function): If we don't print, don't record we did. - - Mon Sep 19 15:21:11 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-parse.y (structsp): If pedantic, warn if comma at end of enumlist. - - * reload.c (find_reloads): Check insn_code_number >= 0 when - looking in insn_operand_strict_low. - - * tm-sun[23].h (CPP_SPEC): Rename __HAVE_FPU__ to __HAVE_68881__ - and put a space after that option. - - Sun Sep 18 01:12:56 1988 Richard Stallman (rms at hobbes.ai.mit.edu) - - * reload.c (find_reloads): Make optional reloads for explicit MEMs. - - * tm-m68k.h (MODES_TIEABLE_P): If no 68881, can tie fixed to floating. - * m68k.md (movdi): Allow F's (can be DImode now). - Don't allow f-regs (experiment). Don't preference x-regs. - (DImode push): Allow y-regs. - (DFmode push): Allow y-regs, not x-regs. - - * reload1.c (modes_equiv_for_class_p): New function. - (reload): Compare multiple modes for reg group with that function. - Allows differing modes in some cases when not tieable. - - * c-parse.y (check_newline): Let ASM_OUTPUT_IDENT override .ident. - * tm-3b1.h (ASM_OUTPUT_IDENT): Define this as no-op. - - * emit-rtl.c (reorder_insns): Update sequence_{first,last}_insn if nec. - (get_last_insn): If in a sequence, return last insn of sequence. - (delete_insns_since): If in a sequence, set sequence_last_insn. - - * spur.md (CONST_DOUBLE load insn): Use & for most dests. - (cond branches): pass additional args to output_compare. - (movdf, movdi): Use & loading reg from mem. - (trunc*): Enable these. - (add): New pattern for adding large immediate operand. - (shifts): A define_expand for each kind of shift, - plus a recognizer which outputs repeated insns if necessary. - (call*): Use r9 as temp, not r2. - - * output-spur.c (output_compare): New args NEG_{EXCHANGE_,}OPCODE. - (singlemove_string): Handle reg as operand 1. - (output_add_large_offset): Fake add insn with large immediate arg. - (big_immediate_operand): Match such an arg. - - * tm-spur.h (FUNCTION_PROLOGUE): Align the stack pointer. - Handle bigger frames. - (TARGET_LONG_JUMP, TARGET_EXPAND_SHIFT): New target flags. - - * va-spur.h: Track position in regs and stack separately. - - * c-decl.c (duplicate_decls): Warn if prototype follows - non-prototype definition. - - Sat Sep 17 14:30:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expr.c (expand_builtin): Avoid crash if arg isn't integer type. - - * c-decl.c (duplicate_decls): Just warn if redeclaring a builtin, - and leave it built in unless it is redefined. - - * vax.md (ashlsi3): Use addl3, moval or movad when useful. - (addsi3): Avoid pushab, movab for constants < 64. - Do use movab when > 64 when operands match. - (mov*i): Use mcom* rather than mneg*. - Use add*3 with two quick immediate args when useful. - (movhi): Don't use movzbw or cvtbw; said to be slow. - - * rtl.h: New macros MEM_VOLATILE_P, MEM_IN_STRUCT_P, - INSN_DELETED_P, REG_USER_VAR_P, RTX_UNCHANGING_P, RTX_INTEGRATED_P, - CONSTANT_POOL_ADDRESS_P. - Most places changed to use them. - - Fri Sep 16 11:50:15 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * jump.c (jump_optimize): Was testing volatil on non-MEMs erroneously - when looking for no-op move insns. - - * cccp.c (handle_directive): Ignore comments between # and directive. - - * integrate.c (copy_rtx_and_substitute): Stack-push memrefs need - to be copied. - - * tm-bsd386.h (ASM_OUTPUT_DOUBLE): Undef previous def. - - * reload1.c (alter_reg): Don't reuse spill_stack_slot - if it isn't big enough for this reg's mode. - - * expr.c (emit_move_insn): After force_const_mem, ensure - mem address is valid. - (move_block_to_reg, move_block_from_reg): Likewise. - - * expr.c (expand_call): Spurious TREE_VALUE on args[i].tree_value. - - * m68k.md (zero_extend*): Require register_operand for operand 0. - - * stdarg.h (va_start): Alternate defn for sparc. - - Thu Sep 15 11:39:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-parse.y (yylex): When atof gives ERANGE, check for "0.0", etc. - - * assert.h (__assert): Alternative definition for -traditional. - - * output-sparc.c (output_block_move): Initialize xoperands. - - * combine.c (try_combine): Never subst for a reg that is incremented. - - * m68k.md (cmpm pattern): Make the match_operands match memrefs - and check that they are pushes in the extra condition. - This makes reloading handle the pushes properly. - - * expr.c (MOVE_RATIO): Make it 15. Allow overriding it. - - Wed Sep 14 09:50:08 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-decl.c (build_enumerator): Use saveable_tree_cons. - - * vax.md (movdf): Use movq when safe. - - * Version 1.28 released. - - * tm-sparc.h (FIRST_PARM_CALLER_OFFSET): Defined. - - Tue Sep 13 00:11:37 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * tree.c (saveable_tree_cons): New function. - * c-decl.c (pushtag): Use it; lists of tags needed for inlining. - (get_parm_info): Likewise. - - * print-tree.c (dump): Handle each kind of statement node individually. - - * integrate.c (copy_decl_tree): Don't pass DECL_RTL through - copy_rtx_and_substitute if it's a memref with constant address. - - * sdbout.c (sdbout_symbol): Don't output garbage when DECL_RTL - has a form we don't understand. - - * reload.c (find_reloads_address_1): Don't reload an autoincrement - if it has a suitable hard reg already. - - * c-typeck.c (process_init_constructor): Error check after digest_init. - - * c-parse.y (is_reserved_word): Now static. - - Mon Sep 12 19:19:28 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * i386.md (all push insns): Use `<' for the constraint, - since a push_operand won't fit an `m' constraint on this machine. - - * expr.c (expand_call): If fn name is `__builtin_alloca', - it may be alloca. This case arises if the user redeclares - `__builtin_alloca'. - - Sun Sep 11 01:47:01 1988 Richard Stallman (rms at gluteus.ai.mit.edu) - - * Eliminate MAX_SETS_PER_INSN. - * cse.c (cse_insn): Combine all the tables and dynamically allocate. - (cse_main): Count the actual number of SETs; don't estimate. - * genconfig.c: Don't calculate MAX_SETS_PER_INSN. - * stmt.c (expand_asm_operands): No limit on # of output operands. - - * expr.c (expand_call): - Store all non-reg parms first, then store all partially-in-reg - parms, then all the (precomputed) wholly-in-reg parms. - Special hair for BLKmode parms which must be passed entirely - in memory; also for BLKmode parms initialized from function calls, - for which it is best to allocate the space before computing value. - Use macro FIRST_PARM_CALLER_OFFSET to handle machines where reg - parms "take up space" on the stack below the stack pointer. - (store_one_arg): Handle case of preallocated stack loc for BLKmode. - Update current_args_size here, not in caller. - - Sat Sep 10 19:58:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * output-sparc.c (output_scc_insn): Changed asm templates. - Use common code to emit the move insns and label at the end of fn. - (output_mul_by_constant): Use %g1 as temporary reg. - - * sparc.md (indexed load pattern): Deleted. - (fix_truncdfsi2): Don't ignore value of output_fp_move_double. - (cse'd multiply): Operand 1 predicate is general_operand. - (return peepholes): Conditionalize on ! TARGET_EPILOGUE. - - * tm-sparc.h (INIT_CUMULATIVE_ARGS,FUNCTION_ARG...): - Use partial regs for args that start in regs but won't entirely fit. - - * tm-sparc.h (CONST_COSTS): 0 for args that can be immediate. - (STRUCTURE_SIZE_BOUNDARY): Now 8. - (STRUCT_VALUE_OFFSET): Defined as symbolic name for `64'. - - * expr.c (struct arg_data): New component `stack' says where in the - stack to put a BLKmode arg (if it's nonzero). - (store_one_arg): Handle case where it's nonzero. - (target_for_arg): New fn, precompute stack locn for BLKmode arg. - - Fri Sep 9 01:41:13 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * cse.c (fold_rtx): Misnested ifs screwed SUBREG case. - - * reload.c (find_reloads_toplev): Special case for (SUBREG REG) - where REG is equivalent to a CONST_INT. - (find_reloads): Don't ignore the value returned by find_reloads_toplev. - Treat a (SUBREG constant) like a (SUBREG MEM): set force_reload. - - * reload.c (push_reload): Abort if memory subreg is not - paradoxical; the MEM mode should be narrower than the SUBREG. - - * stmt.c (fixup_var_ref_1): Fixup memory subregs in an insn - copying VAR to or from a register. - - * m68k.md (movdi, movdf): the x-reg constraint accidentally allowed - moving rm to rm with no &. - - * vax.md (call_value): Typo. - - * expr.c (emit_block_move, emit_push_insn): prefer movstrqi to movstrsi - - * m68k.md (FPA multiply): bad opcodes for 3-operand multiply insns. - - Thu Sep 8 18:22:14 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-parse.y: Use YYERROR instead of synonym YYFAIL. - BISON VERSIONS PRIOR TO THIS DATE WON'T WORK! - - * c-typeck.c (digest_init): Use TYPE_MAIN_VARIANT of array elt type. - - * tm-sun[23].h (CPP_SPEC, ASM_SPEC): Let -m(c|)680[12]0 control - options for CPP and assembler. - - Wed Sep 7 13:44:59 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * New handling of reloading of PRE_DEC, etc. - Now reload_in is the PRE_DEC, etc, and reload_inc is always positive. - * reload.c (push_reloads): Old code to set reload_inc deleted. - (find_reloads_address_1): Call push_reload the new way. - (find_inc_amount): Value always positive. - * reload1.c (choose_reload_targets): Detect this case. - (inc_for_reload): New fn; does the real work for this case. - * m68k.md (call, call_value): Fn address must be offsetable. - - * combine.c (try_distrib): Reject strange cases such as if - result of PREV1 or PREV2 is used in a memory address in INSN. - - * vax.md (movsf): Generate movl instead of movf. - - * expr.c (expand_call): If have regparms, store all BLKmode args - before all the other args. - (store_one_arg): New subroutine broken out. - - * output-sparc.c (output_block_move): Complete rewrite. - - * sparc.md (cse'd multiply insn): Typo in asm-output code. - - Tue Sep 6 20:05:48 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-parse.y (yylex, etc.) Install Schmidt's perfect hash table. - - * gcc.c: handle extension `.cc'. - - Mon Sep 5 12:09:58 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.27 released. - - * tm-i386.h (PREFERRED_RELOAD_REG): When reloading a QImode, - make sure the class doesn't include %esi or %edi. - * i386.md (movqi): Eliminate only use of the class `x', - for which PREFERRED_RELOAD_REG cannot work. - (In next version, get rid of INDEX_CLASS). - Also use `*' to cause preferencing of Q_REGS. - * tm-m68k.h (PREFERRED_RELOAD_REG): When reloading a QImode, - use DATA_REGS. - - * reload.c (push_reloads): Braino in last change when IN == 0. - - * flow.c (mark_used_regs, mark_set_1): Bug if HARD_REGNO_NREGS - returns 0 for VOIDmode reg (inside a CLOBBER). - - * c-parse.y (asm_operand): Handle `("REGNAME")' as an operand. - * recog.c (decode_asm_operands, asm_noperands): Ignore any CLOBBERs. - * regclass.c (reg_names): Variable now global. - * stmt.c (expand_asm_operands): Generate CLOBBERS when appropriate. - - * stmt.c (assign_parms): Ignore parms that aren't PARM_DECLs. - - * varasm.c (assemble_variable): Do ASM_OUTPUT_EXTERNAL for functions. - - * c-parse.y (yylex): floatflag is now an enum. - Detect invalid use of decimal points (> 1, or in exponent) - and multiple exponent letters. - - * expr.c (expand_call): If inlining fails, set TREE_ADDRESSABLE. - - Sun Sep 4 00:36:30 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * c-decl.c (grokdeclarator): A const array becomes an array of consts. - * c-typeck.c (build_array_ref): Array ref is const if array elts are. - - * output-sparc.c (output_move_double): Change criteria for ldd, std. - (output_fp_move_double): New alternatives avoid ldd, std for - stack refs that aren't aligned. - (output_block_move): Use %g1 as temp reg. - - * sparc.md (floating point load from constant mem address): - Use %g1 as temp reg. Use output_move_double in DF case, not ldd. - (movsf): Asm insn typo in FPreg to FPreg case. - (floatsi{s,d}f2): Constraint changed. - Also new special case pattern in front of it. - (fix_truncdfsi2): Use output_move_double, not ldd. - (addsi3, subsi3): Use %g1 as temp reg. - (cse-optimized multiply): Constraint now `g'; output generalized. - (andsi3, orsi3, xorsi3): Use %g1 as temp reg. - - * reload.c (find_reloads): Force int constants into memory just - like floating ones, if memory is allowed and no regs are. - - * expr.c (expand_call): Don't treat structure_value_addr like a parm - if the first parm would be passed in a register. - Also, write comments for all local vars. - - * tm-386v.h (START_SPEC): Use {g,m}crt1.o, not {g,m}crt0.o. - (LIB_SPEC): Always use crtn.o. - - Sat Sep 3 13:05:50 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * explow.c (plus_constant): Don't put CONST around lone SYMBOL_REF. - - * combine.c (subst): Simplify zero- or sign-extend of a constant. - - * expr.c (expand_expr): for REAL_CST, etc., check for invalid - memory addresses and copy into registers. - - * integrate.c (expand_inline_function): If incoming struct value addr - is in memory, map it like a memory parameter. - - * tm-*.h (FIRST_PARM_OFFSET): Now takes fndecl as argument. - * integrate.c (expand_inline_function): Calc., use and save - this fns value of FIRST_PARM_OFFSET. - (copy_rtx_and_substitute): Use that value. - * stmt.c (assign_parms): Likewise. - - * tm-sparc.h (FIRST_PARM_OFFSET): Make it 64 if value is BLKmode. - (STRUCT_VALUE{,_INCOMING}): Put the value in 64(fp). - - * tm-sparc.h (PRINT_OPERAND_ADDRESS): Print offsets in decimal. - Avoid excess `+' before a negative offset. - - * stmt.c (expand_function_start): Create the return value rtl - before making the tail-recursion loop point. - - * combine.c (gen_lowpart_for_combine): Generate a paradoxical subreg - rather than a wider memref. - - * reload.c (push_reload): Extend last change to case where OUT != 0. - - Fri Sep 2 11:43:20 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stmt.c (fixup_var_refs): Adjust last_parm_insn when deleting insns. - - * expr.c (emit_push_insn): calling memcpy, bump TEMP 2 pointers worth. - - Thu Sep 1 16:39:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload1.c (choose_reload_targets): Test for canceled reload - before looking inside reload_out. - - * jump.c (jump_optimize): Bug in last change. - - * m68k.md (return): Pattern disabled; confuses Aug 29 stmt.c change. - * ns32k.md, i386.md: likewise. - - * emit-rtl.c (emit_note_force): New, like emit_note but always do it. - * stmt.c (expand_function_end): Use emit_note_force. - - Wed Aug 31 11:34:08 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload1.c (alter_reg): New arg FROM_REG is hard reg that the pseudo - was spilled from. Works with spill_stack_slot. Callers changed. - Now all pseudos spilled from one hard reg get the same slot. - (reload): Initialize new variable spill_stack_slot. - - * cse.c (cse_insn): Don't insert floating point mems if -ffloat-store. - - * reload.c (find_equiv_reg): Allow no equivs for volatile memrefs. - Also none for floating mem refs if -ffloat-store. - - * output-sparc.c (output_mul_by_constant): make `p' and `log' unsigned. - - Tue Aug 30 13:47:12 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * jump.c (jump_optimize): Ignore other NOTEs while looking for - a NOTE_INSN_FUNCTION_END. - - * integrate.c (save_for_inline): Flush extra call to max_reg_num. - Don't copy NOTEs that are NOTE_INSN_FUNCTION_END. - (copy_for_inline): Don't copy NOTEs that are NOTE_INSN_FUNCTION_END. - - * stmt.c (optimize_bit_field): If bit field is SRC, strip subregs - from the DEST. - - * expmed.c (expand_mult): Special case for -1 as one operand. - - Mon Aug 29 12:14:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stmt.c (expand_goto_internal, expand_fixup): New arg LAST_INSN. - (expand_return): Pass that arg in tail-recursive case. - (other callers): Pass 0 for that arg. - (expand_null_return): Handle HAVE_return nonzero w/ FUNCTION_EPILOGUE. - (expand_null_return_1): New fn, has guts of old expand_null_return. - (expand_return): Call expand_null_return_1 to pass LAST_INSN arg. - (expand_return): Handle HAVE_return nonzero w/ FUNCTION_EPILOGUE. - (expand_function_{start,end}): Likewise. - (expand_cleanups): Fix typo in recursive-list case. - (move_cleanups_up): New fn. - - * expr.c (expand_call): Execute cleanups_of_this_call on exiting. - Notice calls to __builtin_new (but don't do anything about them yet). - - * reload.c (push_reload): If reloading a (SUBREG (MEM ...) ...), - really reload just the MEM in the MEM's own mode. - - * sparc.md: Define patterns for insns that set the ccs. - Define set-flag insns. - New patterns for indexed load, and for optimizing signed bit fields. - (mulsi3, umulsi3): Give "r" constraint to operand 0. - Peephole optimizers recognize some cases where delay insns are safe. - Changed patterns for call and return insns as well. - - * output-sparc.c (single_insn_src_p): New fn. - (output_delay_insn): New fn. - - * tm-sparc.h (TARGET_EPILOGUE): New target flag. - (NOTICE_UPDATE_CC): New clause for funny PARALLEL with a REG in it. - - * m68k.md (movqi): Use *'s to ensure preferencing d-regs. - - * c-parse.y (datadef): If traditional, no warning about no specs. - - Sun Aug 28 14:34:33 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tm-i386.h: Define PROMOTE_PROTOTYPES. - POINTER_BOUNDARY now 32. - - * regclass.c (reg_scan): Compute `max_parallel', max # of sets and - clobbers in any insn in this function. - * global-alloc.c (global_conflicts): Use that, not MAX_SETS_PER_INSN. - - * stmt.c (expand_asm_operands): MAX_SETS_PER_INSN limits # output ops. - - * emit-rtl.c (init_emit_once): Make elt 2 of {f,d}const0_rtx nonzero. - - * c-decl.c (lang_decode_option): Handle -Wwrite-string. - * c-parse.y (combine_strings): If that flag, make array of const char. - - * expr.c (expand_expr): for INTEGER_CST, always use immed_double_const; - never do output_constant_def (it didn't work). - Also heed WORDS_BIG_ENDIAN. - - * varasm.c (output_constant): Handle integer CONST_DOUBLEs. - (output_constant_def): Abort if arg is an INTEGER_CST. - - * emit-rtl.c (gen_rtx): Don't return {f,d}const0_rtx for DImode. - - Sat Aug 27 12:37:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-decl.c (pushdecl): Global extern decls set TREE_PUBLIC - like local ones. - - * integrate.c (expand_inline_function): Handle parms that were - passed in registers but whose homes are on the stack. - - * varasm.c (force_const_mem): Output ints according to spec'd mode. - ({record,compare}_constant_rtx,const_hash_rtx,decode_rtx_const): - Take mode as argument; pass it along. - - * c-parse.y (read_escape): No warning for `\{' or `\['. - - Fri Aug 26 12:23:07 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stmt.c (fixup_memory_subreg): Typo calculating big-endian adjust. - - * vax.md (call_value): Handle >255 args as in `call'. - - Thu Aug 25 16:00:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * jump.c (delete_jump): Don't delete the cc-setter if it has autoinc. - - Wed Aug 24 16:33:37 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expr.c (expand_expr): For sun with a COND_EXPR, use SUBTARGET - if validate_subtarget says ok. - - * tree.c (build_index_type): make_index_type moved here and renamed. - - * combine.c (move_deaths_2): New function. - (try_distrib): Use that, not move_deaths. - - * tm-sparc.h (SHIFT_COUNT_TRUNCATED, STORE_FLAG_VALUE): Define them. - - * tm-sparc.h: FUNCTION_{PRO,EPI}LOGUE: Save room for ins and - locals to spill to the frame if any ins *or* locals are live. - - * tm-sparc.h (NOTICE_UPDATE_CC): Delete the clause that always - cleared the cc's for unrecognized insns. - - * reload1.c (reload_as_needed): Don't try to use a spill-reg - in a basic block that wasn't spilled: ignore optional reloads. - - Tue Aug 23 09:45:05 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * output-sparc.c (output_scc_insn): New function. - - * expr.c (expand_builtin, alloca): Round result of alloca - up to a multiple of STACK_BYTES. - - * toplev.c (compile_file): Default main_input_filename is cc1 input. - - * tm-i386.h (FUNCTION_BOUNDARY): 32 avoids extra prefetch. - - * i386.md (movdi, movdf): Add `&' where needed in constraints. - - Mon Aug 22 11:57:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * symout.c (symout_finish): Allocate typevector after the symout_types. - - Sun Aug 21 16:10:54 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tm-3b1.h (ASM_FORMAT_PRIVATE_NAME): Use a `_' as well as `%'. - - * expr.c (expand_expr): Typo setting MODE for MAX_EXPR. - - * Makefile (stage*): If ln fails, copy gnulib to stage*. - (realclean): Do `clean' and then some. - (install): new var USER_H specifies headers to copy. - - * c-typeck.c (build_binary_op_nodefault): LT_EXPR, etc. - on ptr vs int failed to set result_type. - (build_conditional_expr): Don't replace nonzero int - with null_pointer_node. - - * combine.c (remove_links, try_distrib): New fns. - (subst): New simplifications for ZERO_EXTEND, SIGN_EXTEND. - (combine_instructions): Call try_distrib. - (FAKE_EXTEND_SAFE_P): Allow SUBREGs. - - * m68k.md (non-FPA pattern for floatsisf2): Typo, had DF for SF. - - Sat Aug 20 12:04:37 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * integrate.c (copy_address): Variant of copy_rtx_and_substitute. - (copy_rtx_and_substitute): Use copy_address for MEM address that - doesn't satisfy memory_address_p. - - * reload.c (find_reloads): If force_reload set, don't set WIN - for a MEM even if `m', `o' or `g' in constraint. - - * i386.md (expendqihi2): Typo in asm template. - - * toplev.c (rest_of_compilation): Call clear_const_double_mem. - * varasm.c (init_const_rtx_hash_table): Don't call it here. - (immed_real_const): Don't record the rtx in the REAL_CST node. - (force_const_double_mem, clear_const_double_mem): Use cc0_rtx, not 0, - as flag for a CONST_DOUBLE not on the chain. - - * cccp.c (handle_directive): If traditional, do scan strings - but accept unterminated ones. - (collect_expansion): -traditional: Don't recognize comments in strings. - Stringify arguments that appear within strings. - (skip_quoted_string): -traditional: Always exit at newline. - (macroexpand): -traditional: Don't put `"'s around stringified arg. - (macarg): Set stringified_length accordingly. - - * c-decl.c (duplicate_decls): Avoid error redeclaring fcn after - implicit decl if -traditional. - - * toplev.c (announce_function, report_error_function): - Change communication logic between these fcns. - - * c-decl.c (lang_decode_options): Handle -Wall here. - * toplev.c (main): not here. - - * tm-bsd386.h: Don't include tm-i386.h--be like tm-att386.h - - Fri Aug 19 11:08:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * config-sun4.h: If sparc, include config-sparc.h. - Never include alloca.h. - - * tm-m68k.h (TARGET_SWITCHES): Define `-mc68020', `-mc68000'. - - * c-decl.c (init_decl_processing): If traditional, use signed sizetype. - - * gcc.c (main): Use stderr for printing version. - - Thu Aug 18 14:42:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.26 released. - - * m68k.md (movsi): Constraint change for fpa regs. - - * reload1.c (choose_reload_targets): Clear reg_reloaded_contents - for all regs of a multi-reg group. - - * reload.c (find_equiv_reg): HARD_REGNO_NREGS wants mode, not size. - Check properly for overlap against multiword reload regs. - - Tue Aug 16 14:54:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * varasm.c, expr.c (immed_double_const): immed_real_const_2 renamed. - - * tm-i386.h (SFVALUE): Should be `double'. - * tm-i386v.h (SFVALUE): Don't override it. - - * tm-i386.h (ASM_OUTPUT_ASCII): Don't define it. - * tm-att386.h: Definition moved here. - - * tm-bsd386.h: New file, for Sequent. - * tm-seq386.h: New file, for Sequent. - * config-i386.h: New file, for Sequent. - - * expr.c (push_block): Take account of STACK_POINTER_OFFSET. - (expand_call): Therefore need not do so here. - - * optabs.c (expand_fix): Typo if going via DImode. - - * reload1.c (choose_reload_targets): Don't * reload_reg_rtx if 0. - - Mon Aug 15 01:11:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * integrate.c (copy_for_inline): Don't try copying 0-length vector. - (copy_rtx_and_substitute): Likewise. - - * m68k.md (andsi3): use clrw instead of andw #0. - - * print-tree.c (walk): Don't omit permanent nodes reach from temps. - - * m68k.md (zero_extend...): Reinstall the old zero-extend insns - without names, so they can help the combiner. - - * expr.c (expand_expr): Don't use hard regs as subtargets. - * combine.c (FAKE_EXTEND_SAFE_P): Always consider MEMs safe. - * reload.c (find_reloads): For (SUBREG (MEM ...)) set force_reload. - - * c-parse.y (redescape): Don't warn for `\('. - - * reload.c (find_reloads_address): #if was backwards. - - Sun Aug 14 16:52:22 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-typeck.c (shorten_compare): Change switch to chain of ifs. - - * tm-ns32k.h (PRINT_OPERAND): CONST_DOUBLE contains a double - even if it's SFmode. - (FUNCTION_PROLOGUE): If MAIN_FUNCTION_PROLOGUE defined, run it. - - * cccp.c (file_buf): Rename field `free' to `free_ptr'. - - * Makefile (ALLOCA, MALLOC, LIBDEPS): New variables for easier - customization. Executables depend on LIBDEPS instead of OBSTACK1. - (cccp): Deps and libs now work like the others. - - * output-i386.c (notice_update_cc): Rewritten for clarity. - - * tm-i386.h (OUTPUT_JUMP): If CC_IN_OVERFLOW, abort. - - * recog.c (push_operand): Test for stack_pointer_rtx. - - * integrate.c (copy_rtx_and_substitute): Don't submit push-operands - to `memory_address'--it would lose on machines where pushing is - a special insn, not an addressing mode. - - * output-i386.c (top_dead_p): No more redundancy--that didn't work. - Now one method if optimized, one for call_insns if noopt, one for - other insns if noopt. - (call_top_dead_p): fp_top_dead_p renamed - and only the call-insn clause remains. - - * i386.md (cmpsf, cmpdf): Output was backwards. - (", tstsf, tstdf): Set CC_IN_80387. - (incb pattern): Restrict allowable registers. - (movsf, movdf): Call top_dead_p only when absolutely necessary. - (call_value): Use top_dead_p, not subroutine. - - Sat Aug 13 15:19:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stupid.c (stupid_life_analysis): If only 1 reg class, - call stupid_find_reg only once. - - * stmt.c (expand_function_start): - Clear current_function_pretend_args_size. - - * expr.c (store_constructor): If target is hard reg, go via a pseudo. - - * varasm.c (real_constant_chain): Now static in this file. - (force_const_double_mem): Put R on chain if not already on. - (clear_const_double_mem): Set XEXP (,2) to 0; - also clear real_constant_chain and the chain links. - * emit-rtl.c (init_emit_once): Put 0 in XEXP (,2) of {d,f}const0_rtx. - * cse.c (canon_hash): For CONST_DOUBLE, ignore elts other than 0,1. - - Fri Aug 12 11:48:38 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload1.c (order_regs_for_reload): Handle REG_ALLOC_ORDER more spots. - - * global-alloc.c (find_reg): error handling REG_ALLOC_ORDER; - also error skipping regs known to be hopeless. - * local-alloc.c (find_free_reg): error skipping hopeless regs. - * stupid.c (stupid_find_reg): likewise. - - * local-alloc.c (qty_compare_1): typo, had q1 for q2. - - * expr.c (expand_expr): Don't use supplied target when optimizing - arithmetic using a comparison or conditional; that target could be - needed for the result of the comparison. - - * reload1.c (reload): Don't set reg_equiv_constant for hard regs. - - * stupid.c (stupid_life_analysis): Ignore reg R if regno_reg_rtx[R]==0. - - * symout.c (symout_finish): Use perm. links in permanent_fwd_refs. - - * i386.md (movhi, movqi): Check no_labels_between_p. - - Thu Aug 11 10:44:46 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * c-parse.y (yylex): Out-of-range float is just a warning. - - * tm-gnx-v3.h: New file for Genix. - * ns32k.md (movsi, call, call_value): GNX_V3 conditionals. - * tm-ns32k.h (PRINT_OPERAND_ADDRESS): Changes for Genix. - - * ns32k.md (insv patterns): Operand 0 is read-write. - - * i386.md (tstsf, tstdf): Don't push the arg if already in st(0). - - * varasm.c (output_constant_def): If EXP is permanent, the rtl is too. - - * tm-*.h (ASM_OUTPUT_{LOCAL,COMMON}): New 4th arg, rounded size - vs unrounded size. - * varasm.c (assemble_variable): Pass new arg. - * symout.c (symout_init): Likewise. - - * cccp.c (rescan): Don't let char const cross lines. - (skip_quoted_string, macarg1, discard_comments): Likewise. - - * expr.c (expand_expr, VAR_DECL case): handle flag_force_addr. - - * tm-i386v.h (TAREGT_DEFAULT): Assume 80387. - * config-i386v.h (alloca): Use __builtin_alloca under GNU C. - - Wed Aug 10 11:23:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload.c (find_reloads): Alternative loses - if it has no regs for a reg operand. - - * tm-sun3.h (STARTFILE_SPEC): Define, for fpa's sake. - * tm-m68k.h: New hard regs, reg classes, reg class letters, - target flag and switch, operand syntax and CC handling for fpa. - * m68k.md: Add fpa insn patterns. - * output-m68k.c (standard_SunFPA_constant_p): New fn. - (output_move_const_{single,double}): Handle fpa regs. - (singlemove_string): Handle fpa regs. - - * stmt.c (fixup_memory_subreg): Result had wrong mode. - - * ns32k.md (insv patterns): Adjust bit-number along with address. - - * sparc.md (negdf2, absdf2): Order of the words was backwards. - - * reload1.c (new_spill_reg): End confusion about meaning of 1st arg. - Arg counted_for_nongroups had wrong type. - - * tm-m68k.h (FUNCTION_{PRO,EPI}LOGUE): Round frame size to word bdry. - - Tue Aug 9 07:53:59 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tm-i386.h (ASM_OUTPUT_ASCII): Don't lose the sign bit. - - * tm-i386v.h (STARTFILE_SPEC, LIB_SPEC): Use crt1.o, crtn.o. - - * stmt.c (fixup_var_refs_1): fixup all memory subregs. - - * reload1.c (choose_reload_targets): Don't strip paradoxical - subregs from values to be reloaded. - - * cccp.c: Comment out text after #endif. - - * c-parse.y (init): Allow empty braces as init; warn if pedantic. - - * c-decl.c: Move C-specific options from toplev.c. - * c-tree.h: Move their externs from flags.h. - * c-decl.c (lang_decode_option): New fn called by `main'. - * toplev.c (sorry, really_sorry): New error reporting fns. - * c-decl.c (language_string): New var, name of this language. - - * c-parse.y: Don't include flags.h. - * dbxout.c: Do include it. - - * dbxout.c (dbxout_type): Handle function fields and static fields - and basetypes. Handle METHOD_TYPE and REFERENCE_TYPE. - Abort on unexpected tree code. - (dbxout_args): New fn to output prototype arg types. - (everywhere): Use IDENTIFIER_LENGTH instead of strlen. - (dbxout_type_name): Cleanup; avoid strlen. - - * local-alloc.c (reg_is_set): Don't call {post_,}mark_life for pseudos. - - * tree.h (TYPE_BASECLASSES): New field in type nodes. - - * ns32k.md (insv patterns): Was adjusting the address wrong. - - * c-decl.c (grokdeclarator): Just a warning for inline varargs fn. - - Mon Aug 8 08:16:46 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * varasm.c (immed_real_const_2): Guts of creating a CONST_DOUBLE. - * expr.c (expand_expr): Use that for 64-bit int constants. - - * loop.c (invariant_p): Don't check x->unchanging; it's not safe. - - * c-typeck.c (build_indirect_ref): Handle flag_volatile here - so that it propagates to component_refs. - * expr.c (expand_expr): No need to handle it here. - - * integrate.c (save_for_inline, expand_inline_function): - Set up insn_map to record mapping of old uids to copied insns. - (copy_for_inline, copy_rtx_and_substitute): Map 'u' refs via insn_map. - - * emit-rtl (emit_label, emit_barrier): Return what was emitted. - - * sdbout.c (sdbout_filename): Split off from sdbout_init. - * tm-encore.h, tm-3b1.h, tm-vaxv.h, tm-att386.h (ASM_FILE_START): - Call sdbout_filename. - - * toplev.c: Better messages for invalid options. - - * tm-m68k.h (PRINT_OPERAND_ADDRESS): Handle labelref+basereg. - - * tm-3b1.h (PUT_SDB_DIM): Override sdbout's definition. - (ASM_FORMAT_PRIVATE_NAME): Override tm-hp...s definition. - (PUT_SDB_PLAIN_DEF): Prepend `~' to specified name. - (SDB_GENERATE_FAKE): Prepend `~'. - - * gcc.c: Include config.h before obstack.h. - - Sun Aug 7 11:17:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stor-layout.c (layout_decl): Do nothing with CONST_DECL. - Treat FRIEND_DECLs like variables. - (layout_record): Handle VAR_DECLs and FUNCTION_DECLs in the fieldlist. - Handle basetypes (almost like fields). - (layout_type): Handle REFERENCE_TYPE and METHOD_TYPE. - - * tree.c (temp_tree_cons): New fn. - (array_type_nelts, simple_cst_equal): New fns. - (lvalue_p): CALL_EXPR is an lvalue if it returns REFERENCE_TYPE. - () Manage TYPE_REFERENCE_TO. - (TYPE_HASH_SIZE): Bigger. - (type_list_equal): Compare the TREE_PURPOSE fields. - (build_reference_type, build_method_type): New fns. - - * stmt.c (block_stack): Add field `cleanups' to each element. - (expand_{start,end}_bindings, expand_decl): Update that field. - (stack_block_stack): Now includes blocks that have cleanups. - (goto_fixup_chain): Add field `cleanup_list_list'. - (expand_goto_internal): Execute cleanups for blocks being exited. - (expand_fixup): Make a fixup if any block has cleanups. - (fixup_gotos): New args CLEANUPS and DONT_JUMP_IN. - Execute cleanups for blocks being exited, or add to cleanup_list_list. - (expand_end_bindings): New arg DONT_JUMP_IN. Execute any cleanups. - (expand_decl): New arg CLEANUP. - (expand_cleanups, fixup_cleanups): New functions. - * c-decl.c: Calls to expand_decl pass new arg. - * c-parse.y: Calls to expand_end_bindings pass new arg. - - * stmt.c (expand_return): Handle INIT_EXPR, or bare RESULT_DECL. - - * stmt.c (case_stack): Add field `has_default' to each element. - (pushcase,expand_end_case): Maintain and use that field. - - * stmt.c (pushcase): Handle RANGE_EXPR cases. - (pushcase_range): Create RANGE_EXPR cases. - - * final.c (final): Always pass 3 args to ASM_OUTPUT_CASE_END. - * tm-3b1.h: Delete offending spaces. - - Fri Aug 5 16:17:16 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * integrate.c (copy_rtx_and_substitute): Don't make fp+reg+const - without an intermediate temporary reg. - - * print-tree.c (dump): Don't print an identifier's chain. - - * toplev.c (compile_file): Treat `.i' suffix like `.co'. - - * gcc.c: New config macro CC1_SPEC: extra switches for cc1. - Make a new spec for `.i' files. - - * c-decl.c (pushdecl, finish_decl): Delete duplicate tests. - - * varargs.h: Maybe include va-sparc.h or va-spur.h. - * va-sparc.h: New file. - * va-spur.h: renamed file. - - * tree.h ({TYPE,DECL}_LANG_SPECIFIC): Types and decls can point to - language-specific structures containing other info. - * print-tree.c (dump): Hooks for printing the language-specific - data in types and decls. - - Thu Aug 4 08:54:30 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tree.def: Add some tree codes for C++. - - * Rename files: parse.[yh] -> c-parse.[yh], decl.c -> c-decl.c, - typecheck.c -> c-typeck.c. - Part of tree.c split out to c-convert.c. - - * expr.c (push_block): No longer static. - (expand_expr): Handle REFERENCE_EXPR and INIT_EXPR. - (expand_call): Turn a METHOD_TYPE to a FUNCTION_TYPE. - This is probably not all that is required. - - * parse.y (yylex): Use p->rid to check for `signed' and `inline'. - - * tm-sparc.h (ASM_OUTPUT_SOURCE_LINE): typo. - - * sparc.md: Add a pattern for andcc. - (cmpsf): Clobber reg 32 in DFmode. - (branches): There are no unsigned floating branches; abort. - (bgt): Correct name of floating variant. - (mov?i): Load small constants via mov. - (movdf for constants): Use mov, not add, to move regs. - (movsf, floatsi*, fix*): Simplify reg-to-reg-via-mem move generation. - (trunc*): Use mov, not or, to move regs. - (negsi2, one_cmplsi2): Avoid "neg" and "not" assembler syntax. - (call...): Generate "call" insns; handle #-reg-parms value. - * Define some peepholes for return insns. - - * tm-sparc.h (TARGET_SUN_ASM): New target flag. - (TARGET_DEFAULT): Now 1. - (FRAME_POINTER_REQUIRED): Now 1. - (STARTING_FRAME_OFFSET): Now -16. - (LEGITIMATE_CONSTANT_P): Only CONST_DOUBLEs fail. - (FUNCTION_{PROLOGUE,EPILOGUE}): Rewritten. - - * output-sparc.c (small_int): Test for int that mov can load. - (singlemove_string): Use mov, not add. - (output_move_double): Changes for overlap and for use of ldd, std. - (output_fp_move_double): Use ldd, std when safe. - (make_f0_contain_0): Simplify. - - * integrate.c (expand_inline_function): Some special CALL_INSN - handling no longer needed due to REG_FUNCTION_VALUE_P. - - * m68k.md (movqi): Constraints allow moving areg to areg. - - Wed Aug 3 08:29:31 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.25 released. - - * integrate.c (expand_inline_function): Don't let MEM be inline_target. - - Tue Aug 2 09:13:37 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * integrate.c (INTEGRATE_THRESHOLD): New macro, default dfn here. - (function_cannot_inline_p): Use it. - - * rtl.h (REG_FUNCTION_VALUE_P): New macro. - * stmt.c (expand_function_start): Set that flag in the return reg. - * integrate.c (expand_inline_function, copy_rtx_and_substitute): - Test that flag to test for the return value. - * expmed.c (expand_fixed_bit_field, expand_mult, expand_divmod): ditto. - FUNCTION_VALUE_OUTGOING_REGNO_P no longer needed. - - Mon Aug 1 02:46:08 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * integrate.c (copy_rtx_and_substitute): If NO_FUNCTION_CSE, - don't break out constant fcn addresses here. - - * expmed.c (expand_fixed_bit_field): Tests of FUNCTION_VALUE_REGNO_P - were backwards. - - Sun Jul 31 13:10:07 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * recog.c (indirect_operand): New function. - - * output-i386.c (print_operand): define %*. eliminate %s. - (fp_top_dead_p): In nonopt case, skip stack-adjusts while looking - for the insn that uses the function value. - - * varasm.c (text_section, data_section): New functions. - Replaced explicit printfs elsewhere with calls to them. - * final.c (final_start_function): Use these fns. - * sdbout.c (sdbout_one_type): Use text_section. - * tm-att386.h (ASM_OUTPUT_LOCAL): Use data_section. - - * expr.c (prepare_call_address): Don't pass const via reg if no -O. - - * tm-sparc.h (FUNCTION_{PROLOGUE,EPILOGUE}) Round the size of saved - registers. Fix bug counting saved registers. - - * tm-sparc.h (ASM_OUTPUT_SOURCE_LINE): Define this macro. - - * tm-sparc.h (DEFAULT_SIGNED_CHAR): Now 1. - - * expr.c (expand_builtin, alloca case): Adding stack offset needs - special code if TARGET is a MEM. - - * dbxout.c (dbxout_init): Define Ltext: after the reference to it. - - * tm-3b1.h (ASM_OUTPUT_CASE_LABEL): `short 0' triggers assembler bug; - `short L%nn-L%nn' supposedly works. - - Sat Jul 30 00:25:52 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * sparc.md (floatsidf2): Minor change in output. - (fix_trunc{sf,df}si2): Similar. - - * output-sparc.c (output_fp_move_double): Minor change in output. - - * stmt.c (assign_parms): Don't count stack space for struct value - address if the function does not have one. - - * sdbout.c: Output .dim's and total size for arrays. - Detect bit-fields properly. - Changed handling of structure tags. - - * reload1.c (new_spill_reg): counted_for_nongroups is a new arg; - store 1 in it if this reg is needed for max_nongroups. - - * reload1.c (choose_reload_targets): Allow inheritance of DFmode - if it needs only one register. - - * reload1.c (choose_reload_targets): Delete the death-note from the - store-insn of an inherited reload if PRESERVE_DEATH_INFO_REGNO_P. - - * reload.c (push_reload): Crash if PREFERRED_RELOAD_CLASS is NO_REGS. - (find_reloads): Smarter handling of forcing CONST_DOUBLE into mem. - Check PREFERRED_RELOAD_CLASS & do this if it says NO_REGS. - - * reload.c (subst_indexed_address): Handle case with 2 regs - and no constant term. - - * local-alloc.c: New variable qty_n_refs, set from reg_n_refs - and tested in qty_compare{,_1}. - (combine_regs): Update qty_n_refs. - Update qty_preferred_or_nothing more intelligently. - - * regclass.c (regclass, reg_class_record, record_address_regs): - Count the number of refs to each reg along with the costs, - and use it when computing the preferred_or_nothing flag. - (Can't use reg_n_refs since that is weighted by loop depth). - - * global-alloc.c (global_alloc): Enable test of OVERLAPPING_REGNO_P - for setting no_global_alloc_regs. - - * expr.c (prepare_call_address): Use force_reg, so it gets a REG_EQUIV. - - * optabs.c (can_{fix,float}_p): Return enum insn_code, not a function. - (init_{fix,float}_tab): Store enum insn_code's in fixtab and floattab. - (expand_{fix,float}): Change calls to can_{fix,float}_p. - Also, use emit_unop_insn to make the actual insns. - - Fri Jul 29 02:42:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cccp.c (initialize_char_syntax): If dollars_in_identifiers is 0, - set entries for `$' to 0. - Set entries to 1 rather than incrementing them. - - Tue Jul 26 11:14:22 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * varasm.c (assemble_variable): Make SDB output only if top-level. - - * local-alloc.c (reg_is_set): Arg to mark_life is regno, not qty. - - * output-ns32k.c (print_operand_address): New flag SEQUENT_BASE_REGS - * tm-sequent.h: Define that flag. - - * Makefile: add some missing deps. - - * tm-encore.h (ASM_FILE_START): Changed to do nothing. - - * sdbout.c (sdbout_init): Fix two dumb errors. - - * sdbout.c (sdbout_end_epilogue): No longer takes arg. - Examine current_function_decl here, not in caller. - * final.c: Call changed. - - Mon Jul 25 01:32:54 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stor-layout.c (layout_record): Handle PCC_BITFIELD_TYPE_MATTERS. - - * tm-3b1.h (__PTR_TO_INT, __INT_TO_PTR): Define these, to alter - parts of obstack.h. - - Sun Jul 24 17:56:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Padding for an arg may now go below or above it; new macro - FUNCTION_ARG_PADDING can now choose which, or can inhibit padding. - This makes for compatibility with PCC. - * expr.h: Default definition of that macro. - * expr.c (emit_push_insn): Put the padding above or below. - (expand_call): Don't count the padding if none wanted. - * stmt.c (assign_parms): Adjust parm stack addr if padded below. - Don't count the padding if none wanted. - * tm-3b1.h: Define FUNCTION_ARG_PADDING: no padding for > 4 bytes. - - * final.c (alter_subreg): Now returns the altered value - (but may still modify the original structure). - Handles (SUBREG:DI (CONST_DOUBLE:DF...)) by returning the CONST_DOUBLE. - - * m68k.md (DImode push): now allows `F'. - * ns32k.md (movdi): now allows `F'. - - * tm-m68k.h (FIX_FRAME_POINTER_ADDRESS): - Handle indexed references to frame pointer. - * tm-i386.h, tm-m88k.h, tm-sparc.h: Likewise. - - * cse.c (predecide_loop_entry): Must search for the loop top label. - - Sat Jul 23 08:53:01 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * parse.y (yylex): typo in wide strings. - - * tm-vaxv.h, config-vaxv.h: New files for sysV on vax. - - * config-sun4.h: If sparc and not compiling with GCC, include alloca.h. - - Fri Jul 22 02:38:02 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * tree.c (build_real_from_int_cst): CHECK_FLOAT_VALUE at proper place. - - * tm-hp9k320.h ({TEXT,DATA}_SECTION_ASM_OP): Should not include a tab. - * final.c (final_start_function): Don't output a tab before those. - - * sdbout.c (PUT_SDB_EPILOGUE_END): New macro. - * sdbout.c (sdbout_end_epilogue): New function to output the C_EFCN. - Like former sdbout_mark_end_function. Uses that macro. - * final.c (final_end_function): Call that function. - * tm-3b1.h: Override PUT_SDB_EPILOGUE_END like the other PUT_SDB... - - * tm-3b1.h (PRINT_OPERAND_ADDRESS, ASM_OUTPUT_INTERNAL_LABEL, - ASM_OUTPUT_CASE_{LABEL,END}): Put a % in names of internal labels. - (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_ADDR_{VEC,DIFF}_ELT): - New macros, for same reason. - (FUNCTION_PROFILER): New macro, for % and also to put addr in a0. - - * final.c (output_source_line): For fcn's first line, use lineno 1. - * sdbout.c (sdbout_end_function): Clear sdb_begin_function_line - so can recognize first line of next function. - - * sdbout.c (sdbout_init): Output the .file pseudo here. - * tm-3b1.h, tm-att386.h (ASM_FILE_START): Don't do it here. - - * sdbout.c (PUT_SDB_VAL): Output leading tab, like the other macros. - * tm-3b1.h (PUT_SDB_VAL): Likewise. - - * regclass.c (regclass): Cast enums to int, not char. - * varasm.c (record_constant): Likewise. Avoids 3b1 PCC bug. - - * decl.c (pushdecl): Better choice of error message for extern/static. - - * emit-rtl.c: Do look for STRUCT_VALUE_INCOMING_REGNUM. - - Thu Jul 21 02:13:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cse.c (canon_hash): CONST_INT case failed to add to prev. value - of HASH; was inconsistent with cse_insn mem address hashing. - - * m68k.md (divide insns): Alternate 3B1 syntax for `swap' insn. - - Wed Jul 20 18:27:10 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * m68k.md: In shift-by-24 patterns, rejects autoincrement memrefs - since they are mode-dependent. - - Tue Jul 19 13:01:38 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * parse.y (check_newline): Handle #ident by writing .ident to output. - * cccp.c: Don't handle #ident; delete IDENT_DIRECTIVE conditionals. - - * stmt.c (expand_end_case): In compares, put constant arg second. - - * jump.c (jump_optimize): Delete conditional jump if followed by - an unconditional jump to the same place. - - Mon Jul 18 17:49:13 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * emit-rtl.c (init_emit_once): Now STRUCT_VALUE_INCOMING is an - expression for an rtx. It can make a MEM. Likewise STRUCT_VALUE - for outgoing structure value addresses. - - * stmt.c (assign_parms): If incoming struct addr on stack, leave room. - * expr.c (expand_call): If outgoing addr on stack, push it like an arg. - - * PROMOTE_PROTOTYPES means if proto says `char', pass `int'. - * decl.c (get_parm_info): Alter DECL_ARG_TYPE to do this. - * typecheck.c (actualparameterlist): Convert value for this. - * tm-m68k.h: Define PROMOTE_PROTOTYPES. - - Sun Jul 17 14:25:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * jump.c (jump_optimize): peephole can delete insns following INSN. - Set NEXT after peephole. - - * decl.c (finish_decl): Always restart perm alloc if global. - - * stmt.c (assign_parms): When a float is passed as double, store the - float in low-numbered word. Avoids trouble with parm_map in integrate. - - * vax.md: New pattern for decrement and compare against -1. - - Sat Jul 16 14:18:00 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * decl.c (pushdecl): Ignore previous decl if it's really an error_mark. - - * stmt.c (expand_start_case): Make sure case_stmt.start is a NOTE. - - * combine.c (subst): In the simplification for - (set (zero_extract ...) (and/or/xor (zero_extract ...) const)), - require same memory location in both extracts. - - * *386*: New files. - - * cse.c (fold_rtx): Save time in memory address if it didn't change. - Don't replace cheaper expression with coslier one. - (cse_insn): Reenable generation of REG_WAS_0. It wasn't obsolete. - - * cccp.c: `ident' has 5 letters. - - * final.c (output_source_line): SDB can't handle multiple source - files, so ignore line-NOTEs for other files. - - * hard-reg-set.h: New var reg_class_size (# regs in the class). - * regclass.c (init_reg_class): Set it up. - - * reload.c (find_reloads): If an earlyclobber is in a class of size 1 - as an output, reload it as input instead of as output. - - * reload1.c (choose_reload_targets): Improve elimimation of spilled - pseudos made dead by reloading: if pseudo is limited to one block - and that block contains just stores, delete all the stores. - - * reload1.c (choose_reload_targets): reg_has_output_reload is now - static and survives through reload pass. - (forget_old_reloads): Don't cancel data on spilled regs of output - reloads of the insn just made. - - * sdbout.c (sdbout_one_type): Go to .text before defining a type. - (sdbout_block): Test against do_block was backwards. - - * stmt.c (expand_end_function): New args to make a NOTE for last line. - * decl.c (finish_function): Pass the args. - - * rtl.c (no_labels_between): New function. - * vax.md (movsi): Call it. - - * print-tree.c (dump): Don't follow chain of a decl. - - * rtl.c (volatile_refs_p): Moved from flow.c. - - Fri Jul 15 13:36:20 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * sdbout.c (PUT_SDB...): Allow config to override any of them. - * sdbout.c (PUT_SDB_{BLOCK,FUNCTION}_{START,END}): New macros. - * tm-3b1.h: Override all of them. - * sdbout.c (SDB_GENERATE_FAKE): New macro to create dummy tag name. - (gen_fake_label): Use SDB_GENERATE_FAKE. - * tm-3b1.h: Override its defn. - - * sdbout.c (sdbout_mark_function_end): Unused; deleted. - - * tm-3b1.h: Define SDB_DEBUGGING_INFO. - - Thu Jul 14 01:55:15 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * config-sunv4.h: New file for Sunos version 4. - - * tm-sun3.h (CPP_SPEC): Define mc68010 or mc68020, depending. - - Tue Jul 12 15:31:30 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stmt.c (expand_fixup, expand_goto_internal): New functions to - emit a jump that can restore the stack level, even without tree node. - (expand_null_return, expand_exit_loop, etc.): Use expand_goto_internal. - (expand_end_function): Do fixup_gotos after emitting return_label. - - * cse.c (predecide_loop_entry): Avoid using JUMP_LABEL. - * flow.c (find_basic_blocks): Avoid using JUMP_LABEL. - - * flow.c (insn_dead_p): Delete special case for stack-adjust insns. - (life_analysis): Mark those insns with INSN_VOLATILE here. - (mark_used_regs): a SET of a hard reg, in a volatile insn, - always makes its source live. - - Mon Jul 11 10:46:26 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * ns32k.md (floatqidf2): Commented out since assemblers warn about it. - - Sun Jul 10 11:49:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * decl.c (xref_tag): Default the TYPE_MODE of enum xrefs - to avoid making MEM and REG with VOIDmode. - - * vax.md (call): If > 255 args, pop them explicitly. - - Sat Jul 9 10:53:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * symout.c (symout_types): Fix up forward refs to previously - undefined structure types. - (filter_undefined_types): New function. - (symout_finish, symout_function_end): Output any never-defined structs. - * toplev.c (rest_of_compilation): call symout_function_end. - - * parse.y: Don't declare errno if it's a macro. - - * tm-hp9k320 (FUNCTION_PROFILER): Pass ptr in a0, not d0. - - * typecheck.c (truthvalue_conversion): Flush unnec recursive call. - (build_cond_expr): Bug testing zeroness of IFEXP with TREE_LITERAL. - - * cse.c (fold_cc0): Constants not CONST_INT are certainly nonzero. - * fold-const.c (fold): ADDR_EXPR is not equal to zero. - - * cccp.c (macroexpand): Disable the macro even if traditional. - (rescan): Error if use a disabled macro. - - * combine.c (try_combine): Don't substitute a different reg into - an auto-increment. Handle multiple REG_INC notes in I1 or I2. - - * decl.c (implicitly_declare): Don't reuse old implicit decl. - - * varasm.c (assemble_variable): Avoid syntax err if no DBX and no SDB. - * final.c (output_source_line): likewise. - - * fold-const.c (fold): PLUS/MINUS_EXPR: in case of cancellation, - convert result to original type. - - * regclass.c (reg_class_record): Changed arguments include address - of entire vector of constraints. - - Fri Jul 8 07:59:00 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload1.c (reload): Find groups of more than 2 registers. - - Thu Jul 7 08:33:07 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expr.c (emit_push_insn): Typo adjusting arg for bcopy - if not STACK_GROWS_DOWNWARD. - - * gnulib.c (_cmpsf2): Value is int, not SFVALUE. - - Wed Jul 6 11:53:46 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tm-encore.h, tm-3b1.h: Replace ASM_FILE_START; output a .file. - - * *m88*: New files for Motorola 88000. They don't really work. - - Tue Jul 5 14:40:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * local-alloc.c (combine_regs): Don't tie a reg to itself. - - * finxincludes: Make a variable LIB for the target dir. - - * m68k.md (movhi, addhi3, addsi3): Micro-optimize choice of asm insns. - - * expr.c (expand_expr): Use new macros NO_DEFER_POP, OK_DEFER_POP - in several places, to keep stack predictable. - - Mon Jul 4 09:50:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * integrate.c (function_cannot_inline_p): Increase threshold size. - - * flags.h (use_gdb_dbx_extensions): New variable. - * toplev.c: - - * sdbout.c (PUT_SDB_TAG): Delete duplicate defn. - - * expr.c (expand_expr): For FIX_TRUNC_EXPR to unsigned short/char, - REALLY go via signed int. - - * loop.c (may_trap_p): Was detecting floating arithmetic incorrectly. - - * tm-news800.h (CPP_PREDEFINES): Add sony and sony_news. - - * parse.y (check_newline): Avoid infinite loop at eof. - - Sat Jul 2 10:35:17 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.24 released. - - * stmt.c (expand_asm_operands): Produce proper no-outputs insn. - * recog.c (asm_noperands): Detect no-outputs insns. - (decode_asm_operands): Likewise. - * reload.c (find_reloads): Likewise (add case ASM_OPERANDS:). - - * local-alloc.c (block_alloc): Tests of qty_compare were backwards. - - * flow.c (life_analysis): Turn off code that finds regs live at - function start and marks them not local to any basic block. - - * cse.c (insert_regs): Fix typo (UNITS_PER_WORD). - - * cccp.c: Define max. - - * expr.c (expand_expr): Put each SAVE_EXPR's reg on save_expr_regs, - if not optimizing. - * stmt.c (expand_function_end): Mark each of those regs live - at the end and also retroactively at the beginning of the function. - - * output-vax.c (print_operand_address): New function from old macro. - * tm-vax.h (PRINT_OPERAND_ADDRESS): Call that function. - - * config-vms.h: If not under GNU C, define X_OK, etc. - - * expr.c (move_by_pieces_1): Use * to call GENFUN. - (expand_expr): Compare DECL_FUNCTION_CODE against an enum const. - (preexpand_calls): Likewise. - * genrecog.c (write_tree): Likewise. - * final.c (final): Use * to call the output function. - * reload.c (push_reload): Rename `noshare' to `dont_share'. - - * genoutput.c (output_epilogue): Put more newlines in insn_outfun. - * genemit (gen_exp): Put in more newlines. - - Fri Jul 1 00:23:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * global-alloc.c (allocno_compare): Avoid comparisons of floats - since that is sensitive to roundoff errors. - - Thu Jun 30 09:25:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * sdbout.c (PUT_SDB_{DEF,TAG}): Use ASM_OUTPUT_LABELREF. - (PUT_SDB_PLAIN_DEF): New name for old defn of PUT_SDB_DEF - (sdbout_one_type): Use PUT_SDB_PLAIN_DEF for `.eos'. - - * tree.c (allocation_temporary_p): New fcn. - (all_types_permanent): New variable. - (make_node): If that's set, make each ...TYPE node permanent. - * decl.c (grokdeclarator): If traditional, make decl data permanent. - (finish_decl): Make the rtl permanent too. - * stor-layout.c (layout_type): If type is permanent, - make its layout data permanent too. - - * cccp.c: Choose C++ or C at run time via var `cplusplus'. - Separate cplusplus_include_default from include_default. - Get GNU-specific include directory names from macros - GCC_INCLUDE_DIR and GPLUSPLUS_INCLUDE_DIR. - (main): Initialize based on CPLUSPLUS; `-+' sets it. - * Makefile: Set *_INCLUDE_DIR based on $(libdir). - - Tue Jun 28 09:25:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * tree.c (copy_node): Round LENGTH up to multiple of sizeof (int). - - * expr.c (emit_push_insn): Avoid using PUSH_ROUNDING if not defined. - - * sparc.md (floatsisf2): Insert missing brace. - (mulsi3): Replace reg_o0_rtx, reg_o1_rtx. - - * tm-sparc.h: Define DBX_DEBUGGING_INFO. - - * parse.y (yylex): If traditional, no error for out-of-range float. - - * Makefile: Comment saying how to compile on an Apollo. - - * tm-sparc.h (ASM_FILE_START): Switch to new calling convention. - - * decl.c (init_decl_processing): Create type nodes for 64-bit ints. - (grokdeclarator): use them for `long long'. Warn only if pedantic. - - * optabs.c (init_optabs): Add missing DImode insn names. - - * expr.c (emit_block_move, emit_push_insn): Use movstrqi if appro. - - * expr.c (convert_move): use extendsidi if appropriate. - - * cccp.c (initialize_builtins): Don't install __STDC__ if traditional. - (main): Call initialize_builtins after option processing. - - * integrate.c (output_inline_function): Set current_function_decl. - - * cse.c (fold_rtx): Typo in avoiding 32-bit shifts. - - * cccp.c: Add forward-decl. - - Mon Jun 27 18:06:42 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * hard-reg-set.h (reg_alloc_order): New variable - based on REG_ALLOC_ORDER, a new machine-description macro. - * regclass.c (reg_alloc_order): Define it. - * local-alloc.c (find_free_reg): Handle reg_alloc_order. - * global-alloc.c (find_reg): Likewise. - * stupid.c (stupid_find_reg): Likewise. - - Sun Jun 26 10:47:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Version 1.23 released. - - * tm-3b1.h: Define IDENT_DIRECTIVE. - - * tm-encore.h: Define SDB_DEBUGGING_INFO. - Define SCCS_DIRECTIVE and IDENT_DIRECTIVE. - - * output-ns32k.c: Decl of paren_base_reg_printed must be outside fcns. - - * tm-encore.h (ASM_OUTPUT_DOUBLE): Do 0f, not 0l. - (CPP_PREDEFINES): No -Dns32032. - - * sdbout.c: Include syms.h, not storclass.h. - (unnamed_struct_member): Decl was missing. - (PUT_SDB_INT_VAL, PUT_SDB_VAL): Fix typos. - (sdbout_types, sdbout_one_type, sdbout_parms): Fix typos. - - * Makefile: Add file sdbout.o. - Changed comments pertaining to sysV. - Make a separate target `doc' to make the info files. - - * m68k.md (bit-field insns): Use nonimmediate_operand for the thing - to extract from. - * vax.md (QImode bit-field insns): Likewise. - - * recog.c (nonimmediate_operand): Accept any nonconst general operand. - - Sat Jun 25 07:54:42 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cse.c (lookup_as_function): arg to exp_equiv_p was missing. - - Fri Jun 24 09:14:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * recog.c (memory_operand): Allow (subreg (mem...)). - - Thu Jun 23 07:34:07 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * decl.c (finish_enum): Compute minimum value like maximum. - If minimum is negative, install it in the type and make it signed. - - * stor-layout.c (layout_record): STRUCTURE_SIZE_BOUNDARY is minimum. - (layout_type): A RECORD_TYPE or UNION_TYPE must be BLKmode if - any member is BLKmode. This is to prevent putting it in a register. - (layout_decl): If decl's type is BLKmode, the decl *must* be BLKmode. - - * local-alloc.c (find_free_reg): Never allocate the frame pointer reg. - - * tm-sequent.h (PRINT_OPERAND): Bug in SFmode CONST_DOUBLE. - * tm-encore.h: Likewise. - - * flow.c (flow_analysis): Bug in n_basic_blocks error check. - - * stmt.c (expand_asm_operands): Emit no insn if an arg is erroneous. - - Tue Jun 21 08:34:24 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload.c (find_reloads_address): Write back *loc even if - subst_reg_equivs makes no change, in case subst_index_address did. - - * flow.c: Define macros for -1 and -2 as values of reg_basic_block. - (mark_used_regs): Add an `else'; no change in behavior. - (mark_label_ref): Abort if LABEL_REF doesn't contain a CODE_LABEL. - (find_basic_blocks): Extra error check. - - * output-ns32k.c (print_operand_address): Changes in handling of - register-indirect, and of indexing by sb register. - - Mon Jun 20 04:55:38 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cccp.c (collect_definition): Compute needed space more accurately. - Abort if use more space than was allocated. - (rescan) [USE_C_ALLOCA]: Do alloca (0) after handle_directive. - - * genflags.c (gen_insn): Put parens around defns of HAVE_... macros. - - Sun Jun 19 02:52:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expr.c (emit_push_insn): Consider PARM_BOUNDARY when compensating - for size of a pushed arg to bcopy. - - Sat Jun 18 07:20:54 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * New files sparc.md, tm-sparc.h, config-sparc.h, output-sparc.c. - - * final.c (final): After an ADDR_{,DIFF_}VEC, do ASM_OUTPUT_CASE_END. - * tm-3b1.h: Define ASM_OUTPUT_CASE_END. - (PRINT_OPERAND_ADDRESS): Ref the case tables via an intermediate symbol - `LDnnn' whose def. is output by ASM_OUTPUT_CASE_END. - (ASM_OUTPUT_CASE_LABEL): Add missing newline. - - * reload.c (find_equiv_reg): Reject a MEM containing an autoincrement. - - Fri Jun 17 06:58:37 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * genpeep.c (main): Write `extern' in the decl for `peep_operand'. - - * flow.c (propagate_block): When a dead insn has a REG_RETVAL note, - call mark_set_regs anyway, so that `significant' is updated. - - * jump.c (follow_jumps): New arg IGNORE_LOOPS. If 0, don't follow - the insn at the beginning of a loop that enters the loop; this avoids - interference with loop optimizer. - (jump_optimize, tension_vector_labels): Pass that arg. - - * loop.c (loop_optimize): Mention invalid multiple-entry loops in log. - - * m68k.md (extv, extzv): Fix # of alternatives mismatch in constraints. - - Thu Jun 16 03:06:48 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * genrecog.c (change_state): Was mishandling printing XVECEXP indices - greater than 9. - - * combine.c (subst, simplify_and_const_int): Avoid making SUBREG - of a non-REG. - - * expr.c (expand_expr): For FIX_TRUNC_EXPR to unsigned short/char, - go via signed int. - - * optabs.c (expand_fix): Copy hard_libcall_value reg only once. - - * reload1.c (order_regs_for_reload): Init all elements - of potential_reload_regs to -1. - - * Prevent generation of (set (reg) (plus ... (label_ref ...))). - * explow.c (memory_address_noforce): Like `memory_address' but - never force it into a register. - * expr.c (do_tablejump): Use that. - * m68k.md (casesi): Use that. - - * rtl.h (struct rtx_def, GET_CODE, PUT_CODE): If SHORT_ENUM_BUG, - define the `code' field as a short. - - Wed Jun 15 01:25:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * gcc.c (CPP_SPEC): New spec set by config.h gives flags to cpp. - * tm-*.h for m68k: Define CPP_SPEC to define __HAVE_FPU__ on - appropriate conditions. - - * combine.c (subst): Simplify (not (minus x 1)) and (neg (minus x y)). - - Mon Jun 13 02:22:43 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * typecheck.c (build_array_ref): Avoid duplicate errmsg if index - is an error-mark. - - Sun Jun 12 23:04:39 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) - - * cccp.c (handle_directive): If -traditional, quotes aren't special. - (rescan): Assume newline ends a string constant. - - * cccp.c, cexp.y: Make all fcns non-static; add some forward decls. - - * various: add static forward-decls for various functions. - - Fri Jun 10 00:25:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload1.c (choose_reload_targets): When writing back an incremented - value (handling reload_inc), write back to the real place, not to - OLDEQUIV (a register that holds the same value). - - * tm-m68k.h (LEGITIMIZE_ADDRESS): Don't give force_operand a target. - This can cause the use of multiple insns with same output reg, - which can confuse cse. - - * loop.c (consec_sets_invariant_p): - If invariant_p ever returns 2, we return 2. - New arg is # of consecutive sets to look for, - since this info is no longer in n_times_set at move_movables. - (scan_loop): If consec_sets_invariant_p returns 2, set m->cond. - (move_movables): check consecutive insns if m->consec && m->cond. - - * tm*.h: ASM_DECLARE_FUNCTION_NAME now takes 3rd arg, - the FUNCTION_DECL node. - * varasm.c (assemble_function): Pass this arg. - - * expr.c (expand_call, expand_builtin [alloca]): - If STACK_POINTER_OFFSET is defined, add it to stack pointer contents - before using it as address of actual data on the stack. - * stmt.c (expand_decl): Likewise. - - * stmt.c (assign_parms): If 1st parm named `__builtin_va_alist' - came in regs, pretend it came on stack. - Handle pretending a BLKmode var came on the stack. - If REG_PARM_STACK_SLOT, count stack space for each parm - even if the parm came in a register; and use that stack space - if the parm needs to be addressable or is BLKmode. - Rearrange to simplify conditionals. - - Thu Jun 9 01:21:29 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * local-alloc.c: - `qty_...' vectors' elements for hard-reg-numbers now aren't used. - `reg_qty' elements for hard-reg numbers now aren't used, - and the element for a pseudo is never a hard-reg number. - (local_alloc): No need to reset those elements. - No need to reset elements out of range of prev block's NEXT_QTY. - (reg_is_born, reg_is_set, wipe_dead_reg): - Divide labor in same way for hard regs and pseudos; - simplify using fact that locality-to-basic-block has been precomputed - and recorded in reg_qty; avoid refs to reg_qty[HARDREG]. - (reg_is_born, wipe_dead_regs): Block-number arg no longer needed. - - * local-alloc.c (combine_regs): Remove old code for tying hard regs - to pseudos; great simplification results. - Use find_regno_note, not regno_dead_p. - - Wed Jun 8 00:18:04 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * reload.c (subst_reg_equivs): Set a flag if anything is changed. - (find_reloads_address): Check that flag to avoid extra work. - Also check early for safe reg+const address and avoid work. - - * reload.c (find_reloads): Use loops instead of bcopy. - Check early for insn with no real constraints, and return. - Also check for move from hard reg to hard reg and return. - - * cse.c (canon_reg): Rewrite for speed; use a switch. - (cse_insn): Don't call find_reg_note if REG_NOTES is 0. - - * cse.c (cse_insn): Store modified SET_SRC even if there's a REG_EQUIV. - Inhibition was needed when the SET_SRC was the only place to find the - equivalent value; now it is in the REG_EQUIV note. - - * stmt.c (expand_asm_operands): If NINPUTS is 0, make vec of no elts. - * regclass.c (reg_scan_mark_refs): Don't lose if XVEC (x,i) is 0. - - Tue Jun 7 03:51:28 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * stmt.c (assign_stack_local): If big-endian and MODE is narrow, - the bytes actually used are the least significant. - - * parse.y (skip_white_space): Accept char as arg; let caller read it. - (yylex): Change call. - (check_newline): Return 1st nonwhite char after skipping lines. - (skip_white_space): Change call. - * toplev.c (compile_file): Change call. - - * gcc.c: Pass -traditional to cc1. - - * cse.c (cse_insn): Return very early for (set (reg) (call...)). - Mainly to save time. - (cse-insn) Old code to add REG_WAS_0 note wasted time but did nothing. - - * expr.c (clear_pending_stack_adjust): Really do clear it, - if current fcn doesn't want to be inline. - - * cse.c (cse_insn): Speedup: instead of safe_hash, use canon_hash - or HASHREG. - - Mon Jun 6 21:47:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * jump.c (rtx_renumbered_equal_p): Reject ADDR_VEC fast. - - * cse.c (cse_insn): Ignore a REG_EQUIV or REG_EQUAL note if the - equivalent value is the same as the SET_SRC of the insn. - - * flow.c (life_analysis): Don't call volatile_refs_p for a CALL_INSN; - just assume value is 1. - (propagate_block): Don't call mark_{used,set}_regs for a stack-pop - since if it isn't dead it has no effect on any useful life data. - (mark_set_1): Return quickly if setting stack-ptr, and almost as - quickly if setting any hard reg. - (mark_used_regs): Likewise for refs. - Also don't scan the vector of an ADDR_VEC or ADDR_DIFF_VEC. - (volatile_refs_p): Likewise. - - * varasm.c (output_constant): Discard NOP_EXPR and CONVERT_EXPR - in integer case (they were for casting a pointer). - - * parse.y (compstmt_or_error): Parse a compstmt after ignoring error. - Use this for fctn body so that an error after store_parm_decls - won't recover to xdecls and call store_parm_decls again. - Typical cause was missing semi at end of last parmdecl. - - * parse.y: Add missing semicolons in actions. - (yylex): Don't use yylloc. - - Sun Jun 5 16:14:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * typecheck.c (build_array_ref): Check arg types here, to make - error message more accurate (not about "addition"). - - Thu Jun 2 02:41:40 1988 Richard Stallman (rms at rice-krispies.ai.mit.edu) - - * cccp.c (collect_expansion): `#' isn't special if -traditional. - - * dbxout.c (dbxout_parms): Don't output a regparm symbol - unless the parm got a hard reg assigned. - - * tm-encore.h (ASM_OUTPUT_DOUBLE): Use 0f... not 0d... - - * tm-vax.h (CHECK_FLOAT_VALUE): Define this. - - Wed Jun 1 17:13:00 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expr.c (expand_call): Have sequence points between args. - - Tue May 31 00:27:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * expmed.c (store_fixed_bit_field): Avoid shifting by 32. - * cse.c (fold_rtx): - * symout.c (subrange_p): likewise. - - * local-alloc.c (block_alloc): If operands 1 and 2 commute, - try tying output to operand 2 if operand 1 won't do. - - * toplev.c (compile_file): Pass main_input_file to symout_init. - - * tree.c (build_real, build_real_from_int_cst): - Call CHECK_FLOAT_VALUE if it's defined, to report out-of-range values. - - * tree.c (build_real, build_real_from_int_cst): New 1st arg TYPE. - * parse.y (yylex): Pass this arg; requires parsing suffixes first. - * fold-const.c (fold, combine, fold_convert): Pass this arg. - Handling of float binops in `combine' simplified. - - * tm-encore.h (CPP_PREDEFINES): Remove -Dencore since CC lacks it. - - * final.c (output_source_line): Let ASM_OUTPUT_SOURCE_LINE - be used for SDB also. - - Mon May 30 00:21:15 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * cse.c (insert): Was inserting in wrong place in list. - (exp_equiv_p): Was failing to check validity when x == y. - - * tree.c (build_pointer_type): Handle saveable_obstack - like current_obstack. - - * decl.c (finish_decl): Error in test for zero-size array warning. - - * reload.c (find_equiv_reg): New arg MODE specifies mode in which - an equivalent value is needed. Equivalence must be good in that mode. - In addition, notice overlap with multiword register modes. - Simplify, knowing that registers have already been renumbered. - It was invalidating memory-goals too easily; setting a reg - only invalidates memory-goal if its address varies. - * reload.c, reload1.c, jump.c: Calls pass the new argument. - - * cccp.c: For correct ANSI, must reject `$' in identifiers. - (dollars_in_ident): Variable says whether to allow them. - (rescan): Handle `$' as randomchar if that's 0. - (main): dollars_in_ident is set to 0 by -$, to 1 by -traditional. - (rescan, do_define): Delete former pedantic warnings for `$'. - (initialize_char_syntax, initialize_builtins): Inits split to two - functions; former is called after options are scanned - so `$' is in is_idchar conditionally. - * gcc.c: For -ansi, pass -$ to cccp. - * toplev.c, flags.h: Define dollars_in_ident. - * parse.y (yylex): Treat $ as punctuation unless dollars_in_ident. - Delete old pedantic warning about $. - * tm-vms.h: Define DOLLARS_IN_IDENTIFIERS as 1. - - * cccp.c (rescan): Preprocessing numbers can have signs, after `e'. - - * integrate.c (expand_inline_function): Abort, don't return failure, - if max_regno is too low. I believe this can't happen. - - * typecheck.c (build_binary_op_nodefault): - For ordered comparisons, no pedantic warning about void *. - For MAX, MIN, ditto, and also don't allow pointer vs 0. - - * typecheck.c (build_unary_op): Don't allow pointer for +. - - * typecheck.c (convert_for_assignment): - Add missing warning for case of unrelated pointer types. - Change criteria for new ANSI C draft. - - * optabs.c (expand_binop): Don't set unused target_is_not_an_operand. - - * fold-const.c (fold_convert): Don't set unused inprec, outprec. - - * emit-rtl.c, parse.y: Delete unused var. - - * stor-layout.c (add_vc_sizes): Unused function deleted. - * loop.c (constant_high_bytes): #if 0 this unused function. - - * gcc.c (fatal): Add missing arg to delete_temp_files. - - * cccp.c (dump_defn_1): Add missing arg to skip_quoted_string. - - * reload.c (find_reloads): If constraints don't fit in an `asm', - print error instead of aborting. - - * regclass.c (reg_class_record): Ignore `&' in constraint. - - Sun May 29 00:20:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * Makefile: Run ranlib only if /usr/bin/ranlib exists. - Add comment saying what to do on system V. - - * tree.c (suspend_momentary): Switch to the saveable_obstack - for the sake of inline functions. - - * flags.h (enum debugger): New enum for write_symbols. - * toplev.c, varasm.c, final.c: Use the enum constants where appro. - Add calls to sdbout paralleling the calls to dbxout; - put each in the appropriate conditional {SDB,DBX}_DEBUGGING_INFO. - - * toplev.c (main): Delete -noreg option; it's now the default. - Make -O an alias for -opt. Rename -g to -gg. -g is alias for -G. - Accept and ignore -Wtrigraphs. - * gcc.c: Simplify the specs. - - * toplev.c (compile_file), tm-*.h: - ASM_FILE_START is now a statement, not just a string to be output. - Output it *after* determining the real source file name. - - * fold-const.c (fold): Simplify x >= CST to x > CST-1 (CST positive). - To simplify this, canonicalize relationals to put constat last. - - * decl.c (duplicate_decls): Make a 2nd errmsg to show previous decl. - - * cccp.c (file_size_and_mode): Delete temporary VMS bootstrap patch. - - * tm-att386.h: New file. - - * decl.c (pushdecl): Warn if a local `extern' decl precedes - a file-scope `static' decl. - - * expr.c (expand_call): No warning for failure to inline. - - * expmed.c (extract_bit_field): copy operand 1 of extv or extzv - into register if memory isn't allowed. - - Sat May 28 02:10:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) - - * gnulib.c, Makefile: Delete va_end. - - * final.c, symout.c: Check DBX_DEBUGGING_INFO, not NO_DBX_FORMAT. - - * genemit.c (gen_expand): Notice a CALL inside a PARALLEL. - - * regclass.c (init_reg_sets_1): Part of init_reg_set is put in this - new fn which is called after options are scanned. - Now CONDITIONAL_REGISTER_USAGE can depend on the options. - (fix_register): Just alter the data that init_reg_sets_1 will look at. - - * reload1.c (reload): Don't complain if two different but tieable - modes require groups of the same regclass (assuming same size group). - - * cccp.c: Add 3rd arg to all `open' calls. - - * parse.y (check_newline): Typo prevented ignoring whitespace. - - * cccp.c (perror_with_name): fprintf had harmful extra arg. - - * cccp.c (main, trigraph_pcp): -Wtrigraphs means warn if any trigraphs. - - * emit-rtl.c (gen_sequence): If LEN is 1, avoid looking at PATTERN - of something that doesn't have one. - - * reload1.c (alter_frame_pointer_addresses): frame pointer can - occur by itself, not just inside a PLUS. - (reload): Call eliminate_frame_pointer before reload_as_needed. - Otherwise the latter can make reload insns that copy the frame ptr - to a data reg, but 68k can't copy sp+const to a data reg. - - * decl.c (implicitly_declare): Always save the implicit decl - permanently. Reuse an old one if it exists. - * tree.c (resume_temporary_allocation): Used after `end_temporary...' - to go back to temporary allocation. - - * stor-layout (layout_{type,decl}): Call variable_size. - (variable_size): Turn a size into a SAVE_EXPR and either compute - it right away or put it on a list to be computed later. - (get_pending_sizes): Return that list and clear it out. - * stmt.c (expand_start_function): Tell `variable_size' to compute - sizes right away, and compute those saved on the list. - (expand_end_function): Tell it to put them on a list. - - Fri May 27 00:02:34 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * dbxout.c (dbxout_symbol): For local static var, use 'V', not 'v'. - - * gcc.c (main): Don't handle SIGHUP or SIGTERM if shell ignored it. - - * Makefile, gcc.c: Propagate Make var `libdir' to gcc search path. - - * expr.c (expand_expr): a PARM_DECL with no rtl can occur in size of - `a' in `foo (a,i) int i; struct {int x[i];} a;', so report an error. - - * flow.c (insn_dead_p): insn that makes stack bigger is never dead. - * combine.c (try_combine): Don't splice out stores into stack ptr. - - * reload.c (find_equiv_reg): Test given regno for OVERLAPPING_REGNO_P. - - * varasm.c (assemble_variable): Use saveable_obstack for allocation. - - Thu May 26 01:17:00 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * integrate.c (save_for_inline): Clear unused slots in parmdecl_map. - (There may be some non-parm regs below max_parm_regno.) - * integrate.c (copy_for_inline): Don't crash if parmdecl_map elt is 0. - - * Don't fail to output a static inline function that was referenced - via a local extern decl before its definition. - * expr.c (expand_call): If need to mark a fcn decl addressable, - mark the identifier addressable also. - * typecheck.c (mark_addressable): If marking fcn addressable, - mark the identifier as well. - * decl.c (start_function): If identifier was marked addressable, - propagate it to the function. - - * parse.y (yylex): Check for ERANGE after atof is called. - (Sun doesn't report ERANGE.) - - * loop.c (may_trap_p): Any floating arithmetic may trap. - - Wed May 25 00:03:34 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * parse.y: Delete `noalias'. - (asm_operand): Don't allow this to be empty. - (asm_operands): Do allow this to be empty. - - * reload.c (operands_match_p): Don't let REG and SUBREG match - if the reg isn't a hard reg. - No longer nec. to check reg_renumber, now that reload - substitutes the hard regno. - - * reload1.c (reload): Counting existing spilled groups, - check HARD_REGNO_MODE_OK so we don't get fooled by an odd-even pair. - Spill entire need for new groups before spilling any solitary regs. - Reg already counted against max_nongroups can't become part of a group. - (new_spill_reg): Do bookkeeping associated with a new spill-reg. - (n_spills): This var is now static, no longer passed as arg - within the file. - - (reload_reg_class_lower): Handle all group-reloads before solitaries. - (choose_reload_targets): therefore #if 0 the special code for - finding solitary registers that aren't suitable for groups. - But fix two bugs in it: braino deciding whether a reload - is looking for 1 register (not a group). Use CLASS_MAX_NREGS. - Also braino deciding whether a spill reg can be in a group. - Did not fix bug that it fails to test HARD_REGNO_MODE_OK, - so it might split up an even-odd pair. - - * vax.md: Special patterns for 8 and 16-bit fields, to make - move-insns (like the ones for the 68k). - - * tree.c (convert_to_integer): Pass truncation down thru COND_EXPR - as through a binary operator. - - * typecheck.c (build_cond_expr): If unpromoted operand types match, - don't promote them--let containing expression promote (just once). - - Tue May 24 14:46:26 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) - - * combine.c (subst): Simplify (subreg (sign_extend X) 0). - - * tm-hp9k320.h: Delete NO_DBX_FORMAT. - * Most tm...h files: Define DBX_DEBUGGING_INFO. - * dbxout.c: Change conditional to DBX_DEBUGGING_INFO. - - * integrate.c (expand_inline_function): If inline fcn was declared to - return QI, but actually computes an SI, use SImode for INLINE_TARGET - but actually return a QI. - - * varasm.c (force_const_mem): Failed to determine alignment bdry - from machine mode. - - * jump.c (jump_optimize): Don't delete (move X Y) if X or Y is a - PRESERVE_DEATH_INFO_REGNO_P register. - - * final.c (output_addr_const): In PLUS, output constant term last. - - * final.c (final): Before outputting an insn, do FINAL_PRESCAN_INSN. - - * final.c (next_block_index): No longer static. - (final): Add SDB_DEBUGGING_INFO cases for outputing NOTEs - for beginning and end of a block. - (output_source_line): Add SDB_DEBUGGING_INFO case for line number. - * varasm.c (assemble_function): Add code for SDB symbol output. - - * gnulib.c: Allow config to override INTIFY. - New macro SFVALUE for data type to return a single-float in. - - * combine.c (remove_death): No longer `static'. - - * reload1. (choose_reload_targets): PRESERVE_DEATH_INFO_REGNO_P - selects hard regs for which death info should be updated for final. - - * reload1.c (reload_as_needed): Let INSN_CLOBBERS_REGNO_P - prevent inheritance of certain reloads. - - * reload.c (find_equiv_reg): Let OVERLAPPING_REGNO_P reject - an equiv reg. Needed for funny float regs on 80387. - - * cccp.c (do_ident): Define #ident as a no-op if IDENT_DIRECTIVE. - Warn if pedantic. - (do_sccs): Warn if pedantic. - - * emit-rtl.c (restore_reg_data): Set cur_insn_uid--prevent duplicates. See file OChangeLog. --- 1864,1867 ---- diff -rc2N gcc-1.34/INSTALL gcc-1.35/INSTALL *** gcc-1.34/INSTALL Thu Feb 23 16:03:14 1989 --- gcc-1.35/INSTALL Mon Apr 24 02:48:16 1989 *************** *** 53,62 **** Sun 3 running system version 2 or 3, with 68881. `sun3-nfp' Sun 3 running system version 2 or 3, without 68881. - `sun3-fpa' - Sun 3 running system version 2 or 3, with 68881 and fpa. - `sun4' Sun 4 running system version 2 or 3. --- 53,64 ---- Sun 3 running system version 2 or 3, with 68881. + Note there we do not provide a configuration file to use an + FPA by default because programs that establish signal + handlers for floating point traps inherently cannot work + with the FPA. + `sun3-nfp' Sun 3 running system version 2 or 3, without 68881. `sun4' Sun 4 running system version 2 or 3. *************** *** 71,77 **** Sun 3 running system version 4, without 68881. - `sun3-fpa-os4' - Sun 3 running system version 4, with 68881 and fpa. - `sun4-os4' Sun 4 running system version 4. --- 73,76 ---- *************** *** 86,89 **** --- 85,94 ---- GNU CC. + `mips' + Some variant of MIPS computer (but not the one from DEC). + Note that this machine description was written for GNU CC + version 1.32 and may require some updating to work with the + current version. + `convex-c1' Convex C1 computer. *************** *** 93,102 **** `hp9k320' ! HP 9000 series 300 using HPUX assembler. `hp9k320g' HP 9000 series 300 using GNU assembler, linker and debugger. ! This requires the HP-adapt package which is or will soon be ! available along with the linker. `isi68' --- 98,110 ---- `hp9k320' ! HP 9000 series 300 using HPUX assembler. Note there is no ! support in GNU CC for HP's debugger; thus, `-g' is not ! available in this configuration. `hp9k320g' HP 9000 series 300 using GNU assembler, linker and debugger. ! This requires the HP-adapt package, which is available ! along with the GNU linker as part of the ``binutils'' ! distribution. This is on the GNU CC distribution tape. `isi68' *************** *** 109,114 **** NeXT system. `3b1' ! AT&T 3b1, a.k.a. 7300 PC. `sequent-ns32k' --- 117,131 ---- NeXT system. + `altos' + Altos 3068. Note that you must use the GNU assembler, + linker and debugger, with COFF-encapsulation. Also, you + must fix a kernel bug. Details in the file `ALTOS-README'. + `3b1' ! AT&T 3b1, a.k.a. 7300 PC. Note that the current version of ! GNU CC cannot be compiled with the Unix compiler on this ! machine, due to bugs in the Unix comiler. GNU CC does work ! correctly, however, if you can compile it with older ! version of GNU CC or cross-compile it. `sequent-ns32k' *************** *** 131,136 **** information about the host machine. It includes `tm.h'. ! The file's name should be `xm-MACHINE.h', with these ! exceptions: `xm-vms.h' --- 148,153 ---- information about the host machine. It includes `tm.h'. ! The file is located in the subdirectory `config'. Its name ! should be `xm-MACHINE.h', with these exceptions: `xm-vms.h' *************** *** 163,168 **** * Make a symbolic link named `tm.h' to the ! machine-description macro file for your machine (its name ! should be `tm-MACHINE.h'). If your system is a 68000, don't use the file `tm-m68k.h' --- 180,186 ---- * Make a symbolic link named `tm.h' to the ! machine-description macro file for your machine. It should ! be in the subdirectory `config' and its name should be ! `tm-MACHINE.h'. If your system is a 68000, don't use the file `tm-m68k.h' *************** *** 172,178 **** for Sun 3 machines with 68881. - `tm-sun3-fpa.h' - for Sun 3 machines with floating point accelerator. - `tm-sun3-nfp.h' for Sun 3 machines with no hardware floating point. --- 190,193 ---- *************** *** 232,242 **** * Make a symbolic link named `md' to the machine description ! pattern file. Its name should be `MACHINE.md', but MACHINE ! is often not the same as the name used in the `tm.h' file ! because the `md' files are more general. * Make a symbolic link named `aux-output.c' to the output ! subroutine file for your machine (its name should be ! `output-MACHINE.c'). 4. Make sure the Bison parser generator is installed. (This is --- 247,258 ---- * Make a symbolic link named `md' to the machine description ! pattern file. It should be in the `config' subdirectory ! and its name should be `MACHINE.md'; but MACHINE is often ! not the same as the name used in the `tm.h' file because ! the `md' files are more general. * Make a symbolic link named `aux-output.c' to the output ! subroutine file for your machine. It should be in the ! `config' subdirectory and its name should be `out-MACHINE.c'. 4. Make sure the Bison parser generator is installed. (This is *************** *** 262,266 **** Bugs::.). ! 7. If you are using COFF-encapsulation, you must convert `gnulib' to a GNU-format library at this point. See the file `README-ENCAP' in the directory containing the GNU binary file --- 278,287 ---- Bugs::.). ! 7. Optionally, install the library functions for 64-bit integer ! arithmetic. You do this with the command `make gnulib2'. In ! the future this will happen automatically; for now, it is ! optional, until we are sure it works on all machines. ! ! 8. If you are using COFF-encapsulation, you must convert `gnulib' to a GNU-format library at this point. See the file `README-ENCAP' in the directory containing the GNU binary file *************** *** 267,271 **** utilities, for directions. ! 8. Move the first-stage object files and executables into a subdirectory with this command: --- 288,292 ---- utilities, for directions. ! 9. Move the first-stage object files and executables into a subdirectory with this command: *************** *** 276,280 **** with `rm -r stage1'. ! 9. Recompile the compiler with itself, with this command: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/" --- 297,301 ---- with `rm -r stage1'. ! 10. Recompile the compiler with itself, with this command: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/" *************** *** 286,291 **** make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -msoft-float" ! 10. If you wish to test the compiler by compiling it with itself one ! more time, do this: make stage2 --- 307,312 ---- make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -msoft-float" ! 11. If you wish to test the compiler by compiling it with itself one ! more time, do this (in C shell): make stage2 *************** *** 295,308 **** end - This will notify you if any of these stage 3 object files - differs from those of stage 2. Any difference, no matter how - innocuous, indicates that the stage 2 compiler has compiled GNU - CC incorrectly, and is therefore a potentially serious bug which - you should investigate and report (*note Bugs::.). - Aside from the `-B' option, the options should be the same as when you made stage 2. ! 11. Install the compiler driver, the compiler's passes and run-time support. You can use the following command: --- 316,341 ---- end Aside from the `-B' option, the options should be the same as when you made stage 2. ! The `foreach' command (written in C shell) will notify you if ! any of these stage 3 object files differs from those of stage 2. ! On BSD systems, any difference, no matter how innocuous, ! indicates that the stage 2 compiler has compiled GNU CC ! incorrectly, and is therefore a potentially serious bug which ! you should investigate and report (*note Bugs::.). ! ! On systems that use COFF object files, bytes 5 to 8 will always ! be different, since it is a timestamp. On these systems, you ! can do the comparison as follows (in Bourne shell): ! ! for file in *.o; do ! echo $file ! tail +10 $file > foo1 ! tail +10 stage2/$file > foo2 ! cmp foo1 foo2 ! done ! ! 12. Install the compiler driver, the compiler's passes and run-time support. You can use the following command: *************** *** 354,357 **** --- 387,391 ---- + ▶1f◀ File: gcc.info, Node: VMS Install, Prev: Installation, Up: Installation *************** *** 399,402 **** --- 433,440 ---- $ set command /table=sys$library:dcltables gnu_cc:gcc + 3. To install the help file, do the following: + + $ lib/help sys$library:helplib.hlb gcc.hlp + Now you can invoke the compiler with a command like `gcc /verbose file.c', which is equivalent to the command `gcc -v -c *************** *** 406,407 **** --- 444,451 ---- compatibly with the VMS C compiler; we don't know a way to get them to the linker properly. + + Note that GNU CC on VMS does not generate debugging information to + describe the program's symbols. It is not straightforward to + implement this, and we have no time to spend on it, but we might + consent to install a very modular implementation if you write it. + You will probably have to modify GAS as well as GNU CC. diff -rc2N gcc-1.34/Makefile gcc-1.35/Makefile *** gcc-1.34/Makefile Wed Feb 22 12:31:55 1989 --- gcc-1.35/Makefile Mon Apr 24 02:01:14 1989 *************** *** 19,41 **** ! CFLAGS = -g ! CC = cc ! # OLDCC should not be the GNU C compiler. ! OLDCC = cc ! BISON = bison ! BISONFLAGS = -v ! AR = ar ! SHELL = /bin/sh ! # on sysV, define this as cp. ! INSTALL = install -c ! ! # Directory in which to put the executable for the command `gcc' ! bindir = $(prefix)/usr/local/bin ! # Directory in which to put the subprograms used by the compiler. ! libdir = $(prefix)/usr/local/lib ! # Directory in which to put man pages. ! mandir = $(prefix)/usr/local/man/man1 ! # Number to put in man-page filename. ! manext = 1 # These are what you would need on HPUX: --- 19,23 ---- ! # Variables you should change for certain systems: # These are what you would need on HPUX: *************** *** 64,69 **** # MALLOC = malloc.o ! # If you are running GCC on an Apollo, you will need this: ! # CFLAGS = -g -O -M 3000 -U__STDC__ -DSHORT_ENUM_BUG # Change this to a null string if obstacks are installed in the --- 46,86 ---- # MALLOC = malloc.o ! # If you are running GCC on an Apollo (SR10.x), ! # go into a Berkeley environment and use this: ! # CFLAGS = -g -A nansi -A cpu,3000 -A runtype,bsd4.3 -A systype,any -DSHORT_ENUM_BUG ! # (Says vasta@apollo.com.) ! ! ! # Variables that exist for you to override. ! ! CFLAGS = -g $(XCFLAGS) ! CC = cc ! BISON = bison ! BISONFLAGS = -v ! AR = ar ! SHELL = /bin/sh ! # on sysV, define this as cp. ! INSTALL = install -c ! ! # Compiler to use for compiling gnulib. ! # OLDCC should not be the GNU C compiler. ! OLDCC = cc ! ! # CFLAGS for use with OLDCC, for compiling gnulib. ! CCLIBFLAGS= ! ! # Directory where sources are, from where we are. ! srcdir = . ! # Directory in which to put the executable for the command `gcc' ! bindir = $(prefix)/usr/local/bin ! # Directory in which to put the subprograms used by the compiler. ! libdir = $(prefix)/usr/local/lib ! # Directory in which to put man pages. ! mandir = $(prefix)/usr/local/man/man1 ! # Number to put in man-page filename. ! manext = 1 ! ! # Additional system libraries to link with. ! CLIB= # Change this to a null string if obstacks are installed in the *************** *** 81,84 **** --- 98,107 ---- DIR = ../gcc + # End of variables for you to override. + + # Always use -I$(srcdir)/config when compiling. + .c.o: + $(CC) -c $(CFLAGS) $(CPPFLAGS) -I$(srcdir)/config $< + # Language-specific object files for C. C_OBJS = c-parse.tab.o c-decl.o c-typeck.o c-convert.o *************** *** 114,117 **** --- 137,144 ---- _addsf3 _negsf2 _subsf3 _cmpsf2 _mulsf3 _divsf3 _varargs + # Library members defined in gnulib2.c. + LIB2FUNCS = _adddi3 _subdi3 _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \ + _div_internal + # Header files that are made available to programs compiled with gcc. USER_H = stddef.h stdarg.h assert.h varargs.h va-*.h limits.h *************** *** 124,130 **** CPLUS_TREE_H = $(TREE_H) cplus-tree.h c-tree.h ! all: gnulib gcc cc1 cpp # cc1plus ! lang-c: gnulib gcc cc1 cpp # lang-cplus: gnulib gcc cc1plus cpp --- 151,159 ---- CPLUS_TREE_H = $(TREE_H) cplus-tree.h c-tree.h ! all: gnulib gcc cc1 cpp # cc1plus gnulib2 ! # gnulib2 is commented out in 1.35 since it's too late for real testing. ! # Do `make gnulib2' explicitly if you want `long long' support. ! lang-c: gnulib gcc cc1 cpp # gnulib2 # lang-cplus: gnulib gcc cc1plus cpp *************** *** 139,143 **** gcc.o: gcc.c $(CONFIG_H) ! $(CC) $(CFLAGS) -c -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" gcc.c cc1: $(C_OBJS) $(OBJS) $(LIBDEPS) --- 168,174 ---- gcc.o: gcc.c $(CONFIG_H) ! $(CC) $(CFLAGS) -I$(srcdir)/config \ ! -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ ! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" -c gcc.c cc1: $(C_OBJS) $(OBJS) $(LIBDEPS) *************** *** 149,152 **** --- 180,184 ---- #Library of arithmetic subroutines # Don't compile this with gcc! + # (That would cause most arithmetic functions to call themselves.) gnulib: gnulib.c -mkdir libtemp *************** *** 158,162 **** rm -f $${name}.c; \ cp ../gnulib.c $${name}.c; \ ! $(OLDCC) $(CCLIBFLAGS) -O -I.. -c -DL$${name} $${name}.c; \ $(AR) qc gnulib $${name}.o; \ done --- 190,194 ---- rm -f $${name}.c; \ cp ../gnulib.c $${name}.c; \ ! $(OLDCC) $(CCLIBFLAGS) -O -I.. -I../config -c -DL$${name} $${name}.c; \ $(AR) qc gnulib $${name}.o; \ done *************** *** 170,173 **** --- 202,223 ---- # ../hp-bin/hpxt gnulib-hp gnulib + gnulib2: stamp-gnulib2 ; + stamp-gnulib2: gnulib2.c + -mkdir libtemp + cd libtemp; \ + cp ../gnulib .; \ + for name in $(LIB2FUNCS); \ + do \ + echo $${name}; \ + rm -f $${name}.c; \ + cp ../gnulib2.c $${name}.c; \ + ../gcc -B../ -fstrength-reduce -O -I.. -I../config -c -DL$${name} $${name}.c; \ + $(AR) qc gnulib $${name}.o; \ + done + mv libtemp/gnulib . + rm -rf libtemp + if [ -f /usr/bin/ranlib ] ; then ranlib gnulib ;fi + touch stamp-gnulib2 + # On HPUX, this might require some change; no one has tried it. # C language specific files. *************** *** 184,188 **** cplus-parse.o : cplus-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! $(CC) -c $(CFLAGS) -DPARSE_OUTPUT=\"$(PWD)/cplus-parse.output\" cplus-parse.c cplus-parse.h cplus-parse.c : cplus-parse.y --- 234,239 ---- cplus-parse.o : cplus-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h ! $(CC) -c $(CFLAGS) -I$(srcdir)/config \ ! -DPARSE_OUTPUT=\"$(PWD)/cplus-parse.output\" cplus-parse.c cplus-parse.h cplus-parse.c : cplus-parse.y *************** *** 202,206 **** # Language-independent files. ! tree.o : tree.c $(CONFIG_H) $(TREE_H) print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H) stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) --- 253,257 ---- # Language-independent files. ! tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H) stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) *************** *** 295,299 **** insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h real.h ! $(CC) $(CFLAGS) -c insn-emit.c insn-emit.c: stamp-emit.c ; --- 346,350 ---- insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h insn-config.h real.h ! $(CC) $(CFLAGS) -I$(srcdir)/config -c insn-emit.c insn-emit.c: stamp-emit.c ; *************** *** 304,308 **** insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h ! $(CC) $(CFLAGS) -c insn-recog.c insn-recog.c: stamp-recog.c ; --- 355,359 ---- insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h ! $(CC) $(CFLAGS) -I$(srcdir)/config -c insn-recog.c insn-recog.c: stamp-recog.c ; *************** *** 313,317 **** insn-extract.o : insn-extract.c $(RTL_H) ! $(CC) $(CFLAGS) -c insn-extract.c insn-extract.c: stamp-extract.c ; --- 364,368 ---- insn-extract.o : insn-extract.c $(RTL_H) ! $(CC) $(CFLAGS) -I$(srcdir)/config -c insn-extract.c insn-extract.c: stamp-extract.c ; *************** *** 322,326 **** insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h ! $(CC) $(CFLAGS) -c insn-peep.c insn-peep.c: stamp-peep.c ; --- 373,377 ---- insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h ! $(CC) $(CFLAGS) -I$(srcdir)/config -c insn-peep.c insn-peep.c: stamp-peep.c ; *************** *** 331,336 **** insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \ ! insn-config.h insn-flags.h output.h aux-output.c ! $(CC) $(CFLAGS) -c insn-output.c insn-output.c: stamp-output.c ; --- 382,387 ---- insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \ ! hard-reg-set.h insn-config.h insn-flags.h output.h aux-output.c ! $(CC) $(CFLAGS) -I$(srcdir)/config -c insn-output.c insn-output.c: stamp-output.c ; *************** *** 346,350 **** genconfig.o : genconfig.c $(RTL_H) - $(CC) $(CFLAGS) -c genconfig.c genflags : genflags.o rtl.o $(LIBDEPS) --- 397,400 ---- *************** *** 352,356 **** genflags.o : genflags.c $(RTL_H) - $(CC) $(CFLAGS) -c genflags.c gencodes : gencodes.o rtl.o $(LIBDEPS) --- 402,405 ---- *************** *** 358,362 **** gencodes.o : gencodes.c $(RTL_H) - $(CC) $(CFLAGS) -c gencodes.c genemit : genemit.o rtl.o $(LIBDEPS) --- 407,410 ---- *************** *** 364,368 **** genemit.o : genemit.c $(RTL_H) - $(CC) $(CFLAGS) -c genemit.c genrecog : genrecog.o rtl.o $(LIBDEPS) --- 412,415 ---- *************** *** 370,374 **** genrecog.o : genrecog.c $(RTL_H) - $(CC) $(CFLAGS) -c genrecog.c genextract : genextract.o rtl.o $(LIBDEPS) --- 417,420 ---- *************** *** 376,380 **** genextract.o : genextract.c $(RTL_H) - $(CC) $(CFLAGS) -c genextract.c genpeep : genpeep.o rtl.o $(LIBDEPS) --- 422,425 ---- *************** *** 382,386 **** genpeep.o : genpeep.c $(RTL_H) - $(CC) $(CFLAGS) -c genpeep.c genoutput : genoutput.o rtl.o $(LIBDEPS) --- 427,430 ---- *************** *** 388,392 **** genoutput.o : genoutput.c $(RTL_H) - $(CC) $(CFLAGS) -c genoutput.c # Making the preprocessor --- 432,435 ---- *************** *** 401,405 **** mv cexp.tab.c cexp.c cccp.o: cccp.c ! $(CC) $(CFLAGS) -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \ -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" -c cccp.c --- 444,449 ---- mv cexp.tab.c cexp.c cccp.o: cccp.c ! $(CC) $(CFLAGS) -I$(srcdir)/config \ ! -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \ -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" -c cccp.c *************** *** 421,436 **** -rm -f core # Get rid of every file that's generated from some other file (except INSTALL). ! realclean: clean -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs ! #-rm -f cplus-parse.tab.c cplus-parse.output -rm -f c-parse.tab.c c-parse.output ! -rm -f errs gnulib cexp.c TAGS -rm -f gcc.info* gcc.?? gcc.??s gcc.log gcc.toc gcc.*aux -rm -f gplus.info* gplus.?? gplus.??s gplus.log gplus.toc gplus.*aux ! ! # Like realclean but also delete the links made to configure gcc. ! cleanlinks: realclean ! -rm -f tm.h aux-output.c config.h md config.status # Copy the files into directories where they will be run. --- 465,482 ---- -rm -f core + # Like clean but also delete the links made to configure gcc. + cleanlinks: clean + -rm -f tm.h aux-output.c config.h md config.status + # Get rid of every file that's generated from some other file (except INSTALL). ! realclean: cleanlinks -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs ! # -rm -f cplus-parse.tab.c cplus-parse.output -rm -f c-parse.tab.c c-parse.output ! -rm -f gnulib cexp.c TAGS ! -rm -f cpp.info* cpp.?? cpp.??s cpp.log cpp.toc cpp.*aux -rm -f gcc.info* gcc.?? gcc.??s gcc.log gcc.toc gcc.*aux -rm -f gplus.info* gplus.?? gplus.??s gplus.log gplus.toc gplus.*aux ! -rm -f *.dvi # Copy the files into directories where they will be run. diff -rc2N gcc-1.34/OChangeLog gcc-1.35/OChangeLog *** gcc-1.34/OChangeLog Thu Sep 29 13:27:24 1988 --- gcc-1.35/OChangeLog Tue Mar 28 17:23:25 1989 *************** *** 1,3 **** --- 1,3650 ---- + Wed Dec 21 02:46:34 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.32 released. + + * toplev.c (main): Vax pcc enforces goto-less programming + with fatal error. + + * stmt.c (fixup_memory_subreg): New arg INSN says where to emit insns. + (walk_fixup_memory_subreg): Likewise. All callers changed. + + Tue Dec 20 01:26:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-decl.c (start_function): Don't clear TREE_PERMANENT in fn decl. + Make the result decl a permanent node. + (finish_function): Don't clear DECL_RESULT in an inline function. + (duplicate_decls): Don't lose DECL_RESULT or DECL_SAVED_INSNS + or old decl, when defn is followed by redeclaration. + Likewise DECL_ARGUMENTS and DECL_RESULT_TYPE. + + * stmt.c (expand_function_end): End any sequences left unterminated. + + * cse.c (predecide_loop_entry): If "loop" has no label, do nothing. + + * recog.c (asm_noperands): Now return -1 if not that kind of insn. + All callers changed. + * combine.c (check_asm_operands): Calling changes not quite trivial. + * final.c (final): Likewise. + * reload.c (find_reloads): Likewise. + * recog.c (asm_noperands): Other changes: + Loop computing # of SETs in a PARALLEL was off by 1. + Validate all elts of any PARALLEL, to block invalid combinations. + + * ns32k.md (andsi3, andhi3): Make new CONST_INTs; don't clobber old. + + * integrate.c (copy_rtx_and_substitute): When looking in `parm_map', + if our mode mismatches parm's mode, use change_address to extract part. + On BYTES_BIG_ENDIAN machines, adjust the offset. + + Mon Dec 19 23:50:14 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cexp.y ('/' and '%' ops): If divide by 0, print error, don't die. + + Sun Dec 18 14:03:02 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * toplev.c (main): Avoid shadowing I in inner block. + + * flow.c (propagate_block): The insn at the end of a libcall + may be dead, but the libcall might still be needed if the + hard return reg is used later. Detect this case. + (libcall_dead_p): New fn used to check that the libcall is dead. + + * output-m68k.c, tm-m68k.h (standard_sun_fpa_constant_p): Fn renamed. + + Sat Dec 17 13:23:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stmt.c (expand_end_bindings): error_with_file_and_line => ..._decl. + + * combine.o (try_combine): Accept combination making a valid + asm with operands. + (check_asm_operands): Recognize asm with operands that are valid. + + * loop.c (strength_reduce): Don't accept a reg as a giv + if the reg was made by loop-optimize. + + * stmt.c (balance_case_nodes): A list of 3 always splits in middle. + + Fri Dec 16 17:22:07 1988 Tiemann (rms at sugar-bombs.ai.mit.edu) + + * sparc.md (fetch from constant address): Split into two patterns, + one fixed point and one floating. + (store at constant address): Handle remembered hi-half differently. + Other bug fixes. + (fix_truncsfsi2): Use f1, not f0, as temp. + (fix_truncdfsi2): Don't clear CC_F1_IS_0. + + * output-sparc.c (singlemove_string): Changed handling of case + where op1 is not memory and op0 has varying address. + (output_fp_move_double): Avoid reloading high half address + in the ldd and std cases with constant address. + (make_f0_contain_0): Handle f0 and f1 individually. + + * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): CONST is now illegitimate. + + * rtl.c (note_stores): Pass entire SET rtx, not flag, as 2nd arg to FN. + * local-alloc.c (reg_is_set): New type for 2nd arg. + + * Makefile: Comment out cc1plus, since not ready for release. + + Thu Dec 15 16:39:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * local-alloc.c (reg_is_set): If a hard reg is clobbered, make it free + before and after the insn. + * stupid.c (stupid_mark_refs): Likewise. + * global-alloc.c (global_conflicts): Likewise. + Use note_stores to call mark_reg_{store,clobber}. + (mark_reg_store): Changed calling conventions + All work done on set/clobbered regs is now done here. + Ignore CLOBBERs. + (mark_reg_clobber): Similar fn, but ignore SETs and handle CLOBBERs. + (regs_set, n_regs_set): New static vars for comm. among the above. + + * stmt.c (expand_asm_operands): call protect_from_queue on operands. + This requires preexpanding the outputs into a vector of rtx's. + + * Makefile (install): cd to $(libdir) before ranlib. + + * c-typeck.c (c_expand_asm_operands): emit_queue at the end. + + * reload.c (find_reloads): Count # alternatives properly for + an asm insn, and check that all operands correspond. + + * loop.c (verify_loop): Reject loops containg setjmps. + * cse.c (cse_main): Don't cse across a call to setjmp. + + * expr.c (expand_expr): Permit any non0 DECL_RTL for a VAR_DECL. + + * stmt.c (balance_case_nodes): Count ranges double when balancing. + + Wed Dec 14 13:50:45 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * final.c (output_addr_const): Output just `-', not `+-'. + + * make-cc1.com: Update filenames changed to `c-'. + * make-cccp.com: Pass needed -D options when compiling cccp.c. + Use /nomap when linking. + + * loop.c (strength_reduce): Paraphrase setting NEW_REG, for Iris cc. + + * output-m68k.c (output_move_const_single): %'s must be doubled twice. + + * loop.c (record_giv): A giv can be replaceable if its uses are + all in the same basic block as its sole setting. + (last_use_this_basic_block): Subroutine to test that. + + Tue Dec 13 13:41:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (do_store_flag): Allow for COMPARISON to be a const_int. + + * c-decl.c (pushdecl): Warn if type mismatch with another external decl + in a global scope. + + * fixincludes: Fix typo in msg of deleting unchanged file. + + * Makefile (insn-*): Use two-step rules with a separate time-stamp file + to avoid rerunning gen* unless md has changed again. + + Mon Dec 12 13:32:05 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * i386.md (tstsf, tstdf, cmpsf, cmpdf): Use fnstsw, not fstsw. Faster. + + * tm-vax.h (ASM_OUTPUT_REG_POP): Use correct asm syntax for pop insn. + + * combine.c (subst): Handle (subreg (mem)) by making a changed mem. + This avoids producing any (subreg (mem))s except in the special + case they are supposed to be made here. + Also set undo_storage in a couple of cases that forgot to. + + * reload.c (push_reload): When handling (SUBREG (MEM)) for IN, + if there is an OUT, make that a separate reload. + Return its number in `output_reloadnum' + (find_reloads): When pushing matching-reloads, note that the + two operands can have different reload-numbers. + + * tm-3b1.h (ASM_OUTPUT_CASE_END): Test flag on TABLE, not its pattern. + (ASM_OUTPUT_CASE_LABEL): If /i flag set, don't output the dummy entry + since the fetcher-insn will not be off by 2 in this case. + * m68k.md (casesi_2 recognizer): For 3b1 syntax, compensate for that. + + Sun Dec 11 12:51:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * genrecog.c (try_merge_2): No longer put all explicit decompositions + before all predicates. Patterns are now tested in the order written. + * vax.md: Move the push-or-move-address patterns to the end. + * m68k.md: Move load-address pattern to end. + Rearrange the special-case movsi patterns. + * ns32k.md: Move special load-reg-17 pattern before movsi. + * i386.md: Move the QI and DI push patterns to logical places. + This should not actually change anything. + + * stmt.c: Add Andy Hitchins's binary-tree case statement code. + (struct case_stmt): case_list field is now a case_node chain. + Replace has_default field with default_label field. + (pushcase, pushcase_range): Build case_list in its new type, + and keep it sorted. + (expand_end_case): Use case_list in its new type. + Count a range of > 1 as two cases, when choosing strategy. + (group_case_nodes, balance_case_nodes): New fns, rearrange case_list. + (node_has_{low,high}_bound, node_is_bounded): New fns test + relationships of values of various case_list tree nodes. + (emit_jump_if_reachable): New fn. + (emit_case_nodes): Emit compares and jumps based on tree of case_list. + + * cccp.c (finclude): Handle nonordinary files (stat doesn't give size). + + * tm-3b1.h (PRINT_OPERAND_ADDRESS): Handle case of breg and no ireg. + + Sat Dec 10 16:30:32 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * sparc.md (movstrsi): Separate define_expand and define_insn; + clobber some pseudos to get temp regs to use in the output. + * output-sparc.c (output_block_move): Use those temp regs, + guaranteed to be free. + + * sparc.md (andcc patterns for bitfields from memory): + Test immed. arg for being in range. + (load DFmode constant): Use %m for output in one case. + * output-sparc.c (singlemove_string, output_move_double): Likewise. + + * output-sparc.c (singlemove_string): New case for mem-to-mem move. + + Fri Dec 9 11:42:15 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stupid.c (stupid_mark_refs): for CLOBBER of a pseudo, + it is born just before this insn and dies just after. + + * tm-vax.h (NOTICE_UPDATE_CC): For aob, sob insns, forget the cc's. + + * basic-block.h (REG_BLOCK_UNKNOWN, REG_BLOCK_GLOBAL): Move defn here. + * local-alloc.c: Use them. + + * c-decl.c (store_parm_decls): Additional explanatory message + for some prototype mismatches. + + * gnulib.c (SItype): New macro used instead of `int' + for SImode operands and values. Definition is `long int'. + + Thu Dec 8 18:45:48 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload.c (operands_match_p): Move the label `slow' so that + it doesn't cause a REG and a SUBREG to be compared wrong. + + * toplev.c (compile_file): Output a label `gcc_compiled.' for GDB. + If new macro ASM_IDENTIFY_GCC is defined, run that instead. + * tm-3b1.h (ASM_IDENTIFY_GCC): Define this as no-op. + + Wed Dec 7 12:20:42 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * i386.md (adddf3): Typo: paren was in a constraint. + + * c-decl.c (grokparms): Avoid duplicate msgs for incomplete type ptrs. + + * gnulib.c: Rename all fns to start with `__'. + * optabs.c, expr.c: Rename all references. + + * gnulib.c (__cmpdi2, __ucmpdi2): New fns. + * optabs.c (emit_cmp_insn): Use them. + + * Makefile (stage*): Ignore errors on the main `mv' (for cc1plus). + Run ranlib if we have to copy gnulib. + + * expmed.c (expand_divmod): Split `label' into several local vars. + + * jump.c (jump_back_p): Do nothing unless cc's were set from integers. + + Tue Dec 6 12:00:21 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-parse.y (extend_token_buffer): Use xrealloc, not realloc. + + * integrate.c (output_inline_function): fix args of expand_function_end + (expand_inline_function): Add missing arg to expand_end_bindings. + + * cse.c (cse_insn): Add missing MODE arg to canon_hash. + + * reload1.c (reload_as_needed): Del. extra arg of choose_reload_targets + (reload): Add missing MODE arg to immediate_operand. + + * expmed.c (expand_mult): Delete extra arg to expand_unop. + + * c-typeck.c (default_conversion): + Add missing NOCONVERT arg to build_unary_op. + + * c-decl.c (duplicate_decls, finish_struct): Add missing arg + KNOWN_ALIGMENT to layout_decl. + * stor-layout.c (layout_record): Likewise. + * varasm.c (assemble_variable): Likewise. + + * dbxout.c (dbxout_init): Add missing LOCAL arg to dbxout_symbol. + + * expr.c (clear_storage): Remove excess arg to emit_move_insn. + + * loop.c (consec_sets_invariant_p): Add parens in hairy if-condition. + + * fold-const.c (fold): Typo, missing `case'. + + * cccp.c (main): Typo handling `-I-' option. + + * tm-i386.h (NO_FUNCTION_CSE): Define this; cse is said to slow + things down with less than 7 calls. + + * stmt.c (fixup_var_refs_insn): When scanning the reg-notes, + don't touch other insns they point at. + + * expr.c (do_jump): Use invert_exp, not reverse_condition, + to invert sense of a jump. + * jump.c reverse_condition now static, invert_exp now global. + + Mon Dec 5 10:51:39 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-sun386.h (ASM_FILE_START): In the .file arg, exclude directories. + + * stmt.c (expand_expr_stmt): If -W, warn if stmt has no side effect. + + * cccp.c (monthnames): Capitalize each name. + + * rtl.def: New code MATCH_OPERATOR. + * genconfig.c (walk_insn_part): Handle it. + * genextract.c (walk_rtx): Handle it. + * genpeep.c (match_rtx): Handle it. + * genrecog.c (add_to_sequence): Handle it. + * genemit.c (max_operand_1, gen_exp, gen_expand): Handle it. + * genoutput.c (scan_operands): Handle it. + (insn_n_alternatives): New array in the output. + (struct data): New slots n_alternatives and op_n_alternatives. + (scan_operands, gen_insn, gen_peephole): + Record op_n_alternatives for each operand. + (output_epilogue): Verify that all operands have same # of alternatives + Also output insn_n_alternatives. + + * reload.c (find_reloads): use insn_n_alternatives to control + the loop over all alternatives. + An empty constraint or empty alternative in a constraint + is always satisfied. + * recog.c (constrain_operands): Likewise. + + * c-decl.c (lang_decode_option): For each -f option, recognize a form + with `no-' and a form without, as contraries. + + * toplev.c (main): Decode -f options using a table + so that each option automatically has a `no-' variant. + + * combine.c (try_combine): Give up if I1 or I2 follows a compare insn. + + Sun Dec 4 12:00:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * varasm.c (data_section): If flag_shared, use SHARED_SECTION_ASM_OP + if that is defined. + + * cccp.c (include_default): Add /usr/local/include. + + * Makefile (install): Install the makefile. + + * varasm.c (assemble_external): New fn to declare an external. + (assemble_variable): Output nothing for externals. + * c-parse.y (primary => identifier): Call assemble_variable on 1st use. + + * toplev.c (main): Print version info on stderr, not stdout. + * tm-*.h (TARGET_VERSION): Likewise. + + * tm-isi68.h, tm-news800.h: Rename __HAVE_FPU__ to __HAVE_68881__. + + * sparc.md (seq, etc): Entire page rewritten by Tiemann + to avoid incorrect use of PARALLEL. + * output-sparc.c (gen_scc_insn): Corresponding changes. + + Sat Dec 3 00:03:19 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * gcc.c (do_spec_1): %P is an ANSIfied form of %p: + put __ at beg and end of each predefined macro name. + + * tm-sun3.h (CPP_SPEC): Don't define -Dmc68010, etc., if -ansi. + * tm-sun2.h (CPP_SPEC): Likewise. + + * c-decl.c (shadow_tag): Don't complain if declare a new tag + at top level, or if redeclare a tag. + + * c-decl.c (grokparms): Warn if parm points to incomplete type. + (We already err if its own type is incomplete.) + + * stmt.c (fixup_var_refs_insns): Fix any (SUBREG (MEM)) in REG_NOTES. + (walk_fixup_memory_subreg): New subroutine used for this. + + * integrate.c (copy_rtx_and_substitute): Handle MEM refs to the middle + of a stack-parm--at least in the case of reading the parm. + + * rtl.c (rtx_equal_p): REG_FUNCTION_VALUE_P is significant + only until end of reload pass. + * toplev.c (rest_of_compilation): + Control that by setting new var rtx_equal_function_value_matters. + + * c-decl.c (init_decl_processing): Don't declare the builtins + that aren't really implemented. + + * output-sparc.c (output_move_double): "in structure" implies + 8-byte alignment only for DFmode, not for DImode. + + * final.c (output_operand_lossage): Cleaner text for error msg. + No longer need to write text into .s file, now that linenum is correct. + + * c-decl.c (pushdecl): -traditional stops warning + about "declared extern, later static". + + * c-typeck.c (build_indirect_ref): Don't handle flag_volatile here. + * expr.c (expand_expr): Handle it here, in INDIRECT_REF case. + This prevents -fvolatile from causing additional warnings. + + * output-sparc.c (output_load_address): Allow REG+REG for operands[3]. + + * m68k.md (movsi): If we output the label LIn, + set the RTL_INTEGRATED flag in the switch table's pattern. + * tm-3b1.h (ASM_OUTPUT_CASE_END): Define LD%n only if LI%n was output. + + * i386.md (push-and-add pattern): Comment it out. + It's said to result in slower code. + + * i386.md (tstqi, tsthi, tstsi): Output real `test' insn if op is reg. + + * i386.md (push for DI): Allow `oiF' for 2nd operand. + + Fri Dec 2 13:57:35 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * i386.md (movdi): Allow F constraint for 2nd operand. + + * i386.md (push for QI): define pattern to push a QImode + which really uses pushw and therefore really pushes a halfword. + * tm-i386.h (PUSH_ROUNDING): Round up to multiple of 2. + + * gcc.c (do_spec_1): Handle %e, which means report an error. + Use it to prohibit -pg with -fomit-frame-pointer. + + * tree.h (DECL_RESULT_TYPE): New field in FUNCTION_DECL holds the type + of the widened returned value (not nec. the declared return type). + * c-decl.c (start_function): Set DECL_RESULT_TYPE. + * integrate.c (expan_inline_function): Use that, not DECL_RESULT. + + Thu Dec 1 16:44:10 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cse.c (fold_rtx): When reordering constant args, insist on + manifest constants; regs with known contents won't do. + + * i386.md (mulsi3): Don't use rtx_equal_p to compare regs. + + * expr.c (move_by_pieces_1): Don't call change_address + if address is autoinc, since that may not be memory_address_p. + Subroutine-macro add_offset deleted. + + * optabs.c (bcc_gen_fctn, setcc_gen_fctn): Moved to this file. + (init_optabs): Init those tables here. + * expr.c (init_conditions): Not here. + + * stmt.c (assign_stack_local): Make a list of all stack slots. + * emit-rtl.c (unshare_all_rtl): Unshare all the stack slots. + + * final.c (final): Handle BARRIER with ASM_OUTPUT_ALIGN_CODE. + * tm-ns32k.h (ASM_OUTPUT_ALIGN_CODE): Align to 4-byte bdry. + ?? * tm-sequent.h (ASM_OUTPUT_ALIGN_CODE): Override: just 2-byte bdry. + + * tm-m68k.h (PRINT_OPERAND): use new macros to print floats. + (ASM_OUTPUT_FLOAT_OPERAND): New macro. + (ASM_OUTPUT_DOUBLE_OPERAND): New macro. + * tm-sun3.h: Override those macros, to check for infinities. + + Wed Nov 30 06:35:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-ns32k.h (FUNCTION_{PRO,EPI}LOGUE): if no frame pointer, + do explicit push or pop insns. + + * tm-genix.h (PRINT_OPERAND): Fix typo `file'. + Extedn decl for paren_base_reg_printed. + (MAIN_FUNCTION_PROLOGUE): Deleted. + (ASM_OUTPUT_EXTERNAL): Defined. + + * c-parse.y (yyerror): Better error msg for unprintable char in token. + (primary => identifier): Set TREE_USED if implicit decl made. + + * Makefile (cleanlinks): New target. + (INSTALL): New variable, has program used for installing files in sys. + + * output-ns32k.c (print_operand_address): If addr is sum of 2 consts, + output ADDR first, then OFFSET. + + * ns32k.md (addsi3): Allow adding const+reg with result in another reg. + + * tm-seq386.h (FUNCTION_PROFILER): Provide overriding definition. + + * tm-hp9k320.h: Alternate ASM_SPEC if using GAS. + Define STANDARD_STARTFILE_PREFIX if using GAS. + (FUNCTION_PROLOGUE): on 68020 for big stack frame use link.l. + + * gcc.c (STANDARD_STARTFILE_PREFIX): New cust. macro replaces `/lib/'. + + * va-sparc.h, va-spur.h: Prefix non-interface identifiers with `__'. + + * optabs.c (init_optabs): Don't set up libcalls for ftrunc_optab + because (1) they aren't supported and (2) they are never used. + + * gnulib.c (__builtin_saveregs): If not sparc, define the symbol anyway + to avoid a warning in ranlib. + + Mon Nov 28 01:46:12 1988 Michael Tiemann (mdt at choctaw) + + * c-parse.y (yylex): Typo, `=' for `==' making wide strings. + + * sparc.md (various places): make sure that all patterns which store + can store using const0_rtx (i.e., make all operands to `st' %rx). + + * output-sparc.c (various places): changed dispatches on SYMBOL_REF + to dispatches on CONSTANT_ADDRESS_P since we now recognize any CONST + (and not just SYMBOL_REFs). Don't recognize special case CONST for + output_block_move. Compiler doesn't have enough information to use + it. + + * stmt.c (expand_fixup): If the control stack is nested within the + nesting stack, then no fixup is needed. Otherwise, compiler must + check for possible fixups between the current nesting stack and the + nesting stack that immediately contains the control stack. + + * stmt.c (expand_function_start): functions which are nested use + DECL_CONTEXT. For these functions, test that their DECL_CONTEXT is + a LET_STMT node. + + * tree.h: declare `build_offset_type'. + + Sun Nov 27 10:34:53 1988 Richard Stallman (mdt at yahi) + + * output-sparc.c (output_move_double): + Don't try to use ldd/std if OP1 is a constant. + * sparc.md (movdi): Allow immediate args moved into general regs. + + * c-decl.c (grokparms): Reject incomplete parm types even if just + declarating, not defining. Change types to error_mark_node + in both the PARM_DECL and the list of types. + + * dbxout.c (dbxout_type): It's not a bug if a RECORD_TYPE + has a typedef as its TYPE_NAME. That happens in C++. + + * Make each `asm' with operands record its source file/line + with reg-notes. It doesn't work to emit a special note before the insn + because the insn can be moved by loop_optimize. + * stmt.c (expand_asm_operands): New args FILENAME, LINE. + Record them in the insn, in reg notes. + * c-typeck.c (c_expand_asm_operands): New args, passed along. + * c-parse.y: Pass those args. + (maybe_type_qual): Line #s for asm stmts emitted like all others. + * rtl.h (REG_ASM_FILE, REG_ASM_LINE): New kinds of reg notes. + * toplev.c (error_for_asm): Get the info from those notes. + + * reload.c (find_reloads): Don't clear BADOP for a reg letter + if the alternative ultimately doesn't allow any regs. + + * reload.c (find_reloads): If an `asm' insn gets an error, + change it to a USE to avoid duplicate error msgs or later trouble. + + * reload.c (find_reloads_address): Reloading a constant address, + specify Pmode as the mode for push_reloads, in case of CONST_INT. + + * expr.c (emit_push_insn): Fix calc. of space needed when PARTIAL > 0. + Both scalar case and BLKmode case needed fixing. + + * sparc.md (load/store constant address): + Moving DF from mem to cpu regs, don't go via %f0. + Don't use std/ltd if alignment is wrong or uncertain. + + Sun Nov 27 10:34:53 1988 Michael Tiemann (mdt at yahi) + + * reload.c (push_reload): Allow VOIDmode for INMODE, OUTMODE; + default the mode from the operand values. + + * sparc.md: remove patterns which generate annulled branch insns. + They are correct, but those insns confuse GDB. + + * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): + Treat any constant address like a SYMBOL_REF. + * sparc.md: Check for CONSTANT_ADDRESS_P rather than SYMBOL_REF. + + * sparc.md: Peepholes now accept SYMBOL_REF addresses. + The output routine can now split them properly even as delay insns. + + * print-tree.c (dump): added entry for METHOD_TYPE and + METHOD_CALL_EXPR. Also added entry for WITH_CLEANUP_EXPR. Suggest + that we make first_rtl of WITH_CLEANUP_EXPR 2 instead of 1. + + Sun Nov 27 00:15:33 1988 Michael Tiemann (mdt at yahi) + + * print-tree.c (dump): added entry for OP_IDENTIFIER. + + * tree.c (build_op_identifier): new function. Needed because + `build_nt' expects an "e" node, but OP_IDENTIFIER is an "x" node. + + * store_layout.c (layout_record): use DECL_FIELD_CONTEXT instead of + DECL_CONTEXT. + + * tree.h (DECL_FIELD_CONTEXT): new macro. Points to the type that a + FIELD_DECL is a member of. For C, this is just DECL_CONTEXT. + + * tree.c (build_method_type): typo used "==" to assign basetype to + TYPE_METHOD_BASETYPE with predictably poor results. + + Sat Nov 26 22:55:32 1988 Michael Tiemann (mdt at yahi) + + * output-sparc.c (output_sized_memop): new function to output a load + or store insn based on the size of the operand loaded or stored. + (make_f0_contain_0): use info from condition codes to decide whether + the register %f0 needs to have 0 loaded from memory or not in order + to contain zero. + (gen_scc_insn): new function used by define_expands for + set-on-condition-code insns. + (output_delay_insn): now knows how to handle load and store + scheduling when the load or store operation takes two insns instead + of one. The rewrite is now understands is this: + + sethi %hi(address),%g1 -> sethi %hi(address),%g1 + ld/st [%g1+%lo(address)],%reg -> b target + b target -> ld/st [%g1+%lo(address)],%reg + nop -> ;; gone + + * jump.c (reverse_condition): make this function publicly visible, + now needed in expr.c. + + * output-sparc.c (reg_or_0_operand): new function, returns nonzero + if operand is const0_rtx or a register of specified mode. + (hardreg): deleted. + + * expr.c, stmt.c: fixed random syntax errors. + + * tree.c (build_method_type): now corresponds to defn in tree.def + expr.c (expand_call): removed code to get FUNCTION_TYPE from + METHOD_TYPE. This should probably be looked at harder. + + * tree.def (METHOD_TYPE): Changed definition so that TREE_TYPE (m) + (where m is a METHOD_TYPE) is the type of the return value of the + method, not the FUNCTION_TYPE from which the METHOD_TYPE is derived. + + * Makefile: Changed target of BINDIR from /usr/local to + /usr/local/bin. + + Sat Nov 26 16:29:22 1988 Michael Tiemann (mdt at chickasaw) + + * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): Allow any SYMBOL_REF. + (NOTICE_UPDATE_CC): Remember high half of %g1 as a "condition code" + to avoid reloading it if it does not change. + (NOTICE_UPDATE_CC): Test SET_SRC, not SET_DEST, for a CALL rtx. + (PRINT_OPERAND): New code-letter `m' says output operand as an address. + + * toplev.c (flag_syntax_only): New flag variable. + * flags.h: Likewise. + + * toplev.c (error_with_decl): Extra arg, passed to fprintf. + (warning_with_decl): Likewise. + + * tree.c (build_offset_type): New function. + + * tree.h (TYPE_METHOD_BASETYPE): New name for TYPE_METHOD_CLASS. + Uses in tree.c and... renamed. + + * combine.c (SUBST_INT): New macro, for replacing an int. + (subst): Collapse nested SUBREGs even if SUBREG_WORDs are not 0. + + * expr.c (bcc_gen_fctn, setcc_gen_fctn): new tables, + initialized in init_comparisons. + Used in expand_expr, do_jump, do_store_flag + instead of explicit construction of a jump. + + * expr.c (save_noncopied_parts): New function. + + * expr.c (expand_expr): + ARRAY_REF: Special case for array of constants. + WITH_CLEANUP_EXPR: Handle it. + INIT_EXPR: Case deleted. + MODIFY_EXPR: Use save_noncopied_parts. + + * expr.c (expand_call): blkmode_parms_forced can be >0 + even when no stack arg space otherwise needed. + Don't use a hard reg as a target if there are cleanups. + + * stmt.c (struct block): New elt. outer_cleanups. + (struct case): New elt. num_ranges. + (struct fixup): Changed meaning of cleanup_list_list. + Changes in expand_fixup, fixup_gotos. + (expand_fixup): Detect some internal forward-jumps + that need no fixups--for speed. + (fixup_gotos): New arg THISBLOCK. + (expand_expr_stmt): Handle flag_syntax_only. + (use_variable): No longer static. + (use_variable_after): new fn. + (expand_end_bindings): handle cleanups like a stack level. + (expand_decl): Handle a cleanup with no decl. + (move_cleanups_up): Preserve relative order of cleanups. + (expand_anon_union_decl): New fn. + (pushcase): New fast clause if no ranges yet. + (pushcase_range): Turned on. + (expand_function_start): New temp var `fntype'. + Set TREE_USED for a parm we are ignoring. + (expand_function_end): Really use the `filename' arg. + Use use_variable_after for SAVE_EXPR regs. + + * dbxout.c (dbxout_type): Handle OFFSET_TYPE. + + * gnulib.c (__builtin_new, etc.): Support for C++. + + * emit-rtl.c (next_insn, prev_insn): New fns. + + Sat Nov 26 16:29:22 1988 Richard Stallman (mdt at chickasaw) + + * tree.h (TREE_LANG_FLAG_[1234]): New attributes. + (TYPE_METHOD_BASETYPE): New name for TYPE_METHOD_CLASS. + (TYPE_OFFSET_BASETYPE): New macro. + (NUM_TREE_CODE): New macro. + (TYPE_NONCOPIED_PARTS): new field in a type-node. + + * varasm.c (make_decl_rtl): Split out from assemble_variable. + (assemble_variable): No longer creates the rtl. + No longer handles policy of whether to output tentative decl yet. + (output_constant_def): Don't lose if wasn't temp allocation + when this was called. + (output_constant): Handle REFERENCE_EXPR. + + * Makefile (BISONFLAGS): new variable. + (prefix): New variable, used in bindir and libdir. + (C_OBJS, CPLUS_OBJS): New vars, split off from OBJS. + (LIBFUNCS): C++ support functions added. + (CPLUS_TREE_H): New variable. + (cc1plus): New target. + (lang_c, lang_cplus): Combines all targets for one language. + (gplus.info): New target. + (cplus-*.o): New targets. + (realclean): Handle new C++ files and recent renamings. + (install, TAGS): Likewise. + + * print-tree.c (prtypeinfo): Handle TREE_LANG_FLAG_[1-4]. + + * tm-sparc.h (ASM_OUTPUT_DOUBLE): Special case for infinity. + (ASM_OUTPUT_FLOAT): Likewise. + + * gcc.c: Don't define __GNU__. + For .cc files, pass -+ to cpp, and don't handle -ansi. + Use cc1plus as name of compiler for .cc files. + + * stor-layout.c (layout_type): abort if given a LANG_TYPE node. + (layout_union): Complain if union has basetypes or static members. + (layout_record): Handle anonymous union members. + + * tree.def (LANG_TYPE): New tree code for language-specific purposes. + (WITH_CLEANUP_EXPR): New tree code for expressions whose values + need to be cleaned up when they are deallocated. + (OP_IDENTIFIER): New tree code for certain C++ purposes. + + * toplev.c (rest_of_decl_compilation): Call make_var_rtl + before assemble_variable. + + Wed Nov 23 02:15:45 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * xm-sunos4.h: Rename included config files to xm-*. + * xm-*.h: Likewise. + + * fixincludes: Avoid altering args to names other than CTRL + that end in ...CTRL. + If a file isn't actually changed, delete the copy. + + Mon Nov 21 12:48:22 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * loop.c (move_movables): Never move a reg w/ # > old_max_reg. + (strength_reduce): For nonreplaceable giv, put insn to load it + after the insn that used to compute it, in case the latter + is the last of a libcall sequence. + + * stmt.c (expand_function_end): If returning BLKmode, also copy + address where value is returned to the place that GDB will + expect to see it after the return. + + * c-parse.y (readescape): Warn about hex constant out of range + for a target integer. + (yylex): Warn about escape out of range for non-wide char or string. + Use a buffer of ints to read a wide string. + + Sat Nov 19 02:18:02 1988 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * Version 1.31 released. + + * sparc.md: Change `K' to `I' in all constraints. + + * loop.c (gen_iv_mult): Handle TARGET==0. + + * c-decl.c (duplicate_decls): Undo last change. + + * c-decl.c (pushdecl): Instead of that change, + save old-decl's file/line before calling duplicate_decls, + and pass them later to warning_with_file_and_line. + * toplev.c (warning_with_file_and_line): New fn. + + Fri Nov 18 13:07:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stmt.c (fixup_var_refs_1): (SUBREG (MEM)) was slipping through + in case where a SET was writing in the variable being fixed. + + * recog.c (register_operand, nonmemory_operand, memory_operand): + Changes to handle new var reload_completed: 1 means that + (SUBREG (MEM)) now counts as a mem-ref, since alter_subreg + will make it one. + * toplev.c (rest_of_compilation): Set and clear reload_completed. + + * sparc.md (call patterns): If TARGET_SUN_ASM, and address in reg, + output a jmpl rather than a call. + * tm-sun4os3.h: Like tm-sparc.h but turn on TARGET_SUN_ASM. + + * reload.c (push_reloads): Reinstate handling of reg_equiv_constant. + + Thu Nov 17 09:48:14 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload1.c (constraint_accepts_reg_p): Name changed from + constraint_all_regs_p; new arg is reg we are concerned with, + and condition tested takes some advantage of that reg. + + * gcc.c (main): Rename var `error' to `error_count' for name conflict. + + * emit-rtl.c (emit_note): Output line #s even if no debug info wanted. + (emit_line_note): New fn, does what emit_note did. + (emit_line_note_force): New name for emit_note_force. + * stmt.c, c-parse.y: Call emit_line_note instead of emit_note. + + * c-parse.y (maybe_type_qual): Call emit_note instead of emit_line_note + Now we can find the line # of every `asm' from the RTL. + * toplev.c (error_for_asm): New fn, gets line # by searching for NOTE. + * reload.c (find_reloads): Use error_for_asm. + * reload1.c (choose_reload_targets): Likewise. + * final.c (output_operand_lossage): Likewise. + Variable this_is_asm_operands is now current insn if it's nonzero. + + * loop.c (move_movables): When a reg is moved, update regno_first_uid + and regno_last_uid; say life span includes entire loop. + * Decrement THRESHOLD per reg moved, not per insn moved. + + Wed Nov 16 08:41:32 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * gnulib.c (___builtin_saveregs): New fn, for sparc. + + * tm-sparc.h (GO_IF_LEGITIMATE_ADDRESS): Don't recognize + SYMBOL_REFs, except for the constants pool. + But do recognize REG+REG and SMALLINT+REG. + * sparc.md: New patterns for fetching and storing memory + whose address is symbolic and not "legitimate". + + * sparc.md (movsi): Add `f' to op1 constraint. + New output clause for result in fp reg. + (Floating point fetch patterns): Output sethi insns. + (call_value, related patterns): value-register has `register_operand'. + + * output-sparc.c (hardreg): New function. + (COMPATIBLE): Clause added for n_regs == 2. + (single_insn_src_p): Return 0 for MEM whose address is absolute. + + * tm-genix.h (GO_IF_LEGITIMATE_ADDRESS subroutines): + Redefine, to exclude any possibility of SB-referencing addresses. + + * loop.c (strength_reduce): Can't eliminate a biv if used before + start of the loop. Used before is same as used after, if contained + in another loop. + + * recog.c (asm_noperands, decode_asm_operands): + Handle case of no outputs, but some clobbers. + * stmt.c (expand_asm_operands): Generate right stuff for that case. + + * tm-sun3.h (CPP_SPEC): Don't define __HAVE_68881__ if using fpa. + + Tue Nov 15 00:10:26 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * loop.c (gen_iv_mult): Arg OP0 may not be a constant. + Pay attention to return value of expand_mult. + (eliminate_biv): Call changed. + + * output-m88k.c, output-sparc.c (output_move_double): + Fix typo `optype0' for `optype1'. + + * c-decl.c (duplicate_decls): Don't alter file, line of old decl. + + * c-parse.y (skip_white_space): Don't recognize comments; rely on cpp. + + * rtl.c (rtx_equal_p): Handle vectors. + + * loop.c (scan_loop): Change elts of n_times_set back to positive + for candidates that weren't moved, before doing strength reduction. + + * ns32k.md (movdi, movdf): Use `&' constraint for first operand. + + * reload1.c (reload): Initialize spill_indirect_ok here. + + * config-sun4.h: Recognize `-static' switch. + + * global-alloc.c (set_preference): Avoid using nonsense hard reg #s + that result from adding OFFSET. + + * sdbout.c (sdbout_end_function): Line # in .ef should be relative. + + * final.c (output_source_line): For SDB, don't output negative #s. + + * tm-encore.h (ASM_OUTPUT_LOCAL): Don't ignore SIZE arg. + + Mon Nov 14 11:03:16 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload.c: Don't declare refers_to_regno_p. + + * gcc.c (main): Warn if any input files are for the linker + but the linker is not being run. + + * jump.c (sets_cc0_p): Dumb bug fetching elts of a PARALLEL. + + * local-alloc.c: qty_birth, qty_death elements are now -1, not 0, + when the value is not known. + + * expmed.c (extract_bit_field): Bug computing xbitpos, xoffset + when changing units from bytes to words. + + * loop.c: Rename `times_used' field in `struct movable' to `savings'. + (scan_loop): When scanning the consecutive sets, for each libcall, + increment `savings'--leave `consec'. + When making movable for (SET (REG) 0) which is part of zero-extension, + set `savings' to 1 initially, since only 1 insn will be moved. + And don't let any other reg force that insn. + Reduce initial THRESHOLDs. + (move_movables): Don't add `consec' into `savings' + since the initial `savings' was proportional to `consec'. + Decrement THRESHOLD by 3 (not 2) for each move done. + + * reload1.c (choose_reload_targets): Strip subregs from OLD + before writing the output-reload move-insn. + + * reload1.c (reload): counted_for_groups and counted_for_nongroups + are now file-scope. Update them both when spilling. + (new_spill_reg): No need for counted_for_nongroups as arg. + (choose_reload_targets): Don't use for a group + any spill regs for which counted_for_nongroups is set. + + * dbxout.c (dbxout_symbol): Indirect-symbol case checked erroneously + for PARM_DECL. + + Sun Nov 13 08:13:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cse.c (fold_rtx): Don't alter MULT by -1 if arg mode != result mode. + + * loop.c (move_movables): If moving a CALL_INSN, make a new CALL_INSN. + * emit-rtl.c (emit_call_insn_before): New fn. + + * config-sun4.h (LINK_SPEC): Avoid shared libraries if -g. + + * expr.c (store_one_arg): Stabilize ARG->stack so it doesn't use SP + before computing the arg value. + + * combine.c (use_crosses_set_p): Moving a ref to stack ptr + is always forbidden if machine has push insns, since might cross one. + + * vax.md (movqi): Avoid out-of-range immed ops in mcomb. + + * expmed.c (extract_bit_field): Don't say `extzv' in the + clause for `extv'. + + * emit-rtl.c (copy_rtx_if_shared): Even if a MEM can be shared, + unshare its address from everything outside that MEM. + + * expr.c (expand_builtin): Fix omitted arg to `convert_to_mode'. + + * expr.c (store_expr): In case where will not return TARGET + and must do type conversion, don't fail to store into TARGET. + + * dbxout.c (FORCE_TEXT): New macro used before output `.stabs' + to go to the text section on targets that require it. + (DEBUG_SYMS_TEXT): Target macro which turns on that feature. + + * reload1.c (reload): Index in spill_regs was wrong + when checking counted_for_groups. + (choose_reload_targets): When calling find_equiv_reg looking for + a reload reg, reject all spill regs, even those not in use now. + + * tm-sun386.h, tm-sun386i.h, config-sun386i.h: New files. + + * cccp.c (main): Don't die if no output file arg given. + + * fixincludes: Tell `find' to find only ordinary files. + + * config.gcc: If symlink fails, make a hard link. + + Sat Nov 12 20:43:20 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Makefile (gnulib): Use cp to make the temporary .c files; + less likely to fail than ln. + + Sat Nov 5 12:46:39 1988 Randall Smith (randy at sugar-bombs.ai.mit.edu) + + * tm-m68k.h (HARD_REGNO_MODE_OK): Disallowed d7:a0 as an allowable + pair of registers to hold a double value. This is correct for the + fpa but incorrect for the 68881. It was, however, simpler than + defining a new regclass. + + Tue Oct 25 12:03:49 1988 Randall Smith (randy at gluteus.ai.mit.edu) + + * m68k.md: Added some thoughts (comments) on best method to allow + 68881 code with fpa code. + + Thu Oct 13 14:19:17 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.30 released. + + * stupid.c (stupid_life_analysis): Init last_call_suid with + largest possible value, not 0. + + Wed Oct 12 04:40:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * output-i386.c (output_asm_insn_double_reg_op): Compensate for + assembler bug that interchanges fsub and fsubr. + + * reload1.c (order_regs_for_reload): Undo 29 Sept change. + It breaks the 386. + + * varasm.c (decode_rtx_const): Don't example value->addr + if what was stored in was value->d. + + * toplev.c (set_float_handler): New fn, specify where to jump + on floating exception signal. + * fold-const.c (combine): Use that to handle overflow in arithmetic. + + * c-decl.c (grokdeclarator): Don't clear CONSTP, VOLATILEP + when making an array type. + + * dbxout.c (dbxout_symbol): Ignore VAR_DECLs in memory whose + addresses we can't represent. + + * fold-const.c (fold): don't convert >= to > if both args are constant. + When converting >= to >, don't fail to change CODE. + + Tue Oct 11 04:13:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * vax.md (movhi): Error in truncating mcomw, addh3 args to 16 bits. + + * final.c: Better error checking for %-specs in templates. + (output_operand_lossage): new fn to report errors. + (insn_noperands): new var: # operands in current fn. + (this_insn_asm_operands): new var: 1 for `asm', 0 otherwise. + (output_asm_insn): Check for operand # out of range. + (output_asm_label, output_operand): Call new fn to report errors. + + * reload.c (push_reloads): An input reload for (REG N) can match one + for (POST_INC (REG N)) or (PRE_INC (REG N)), since the value + reloaded is the same in any case. + + Mon Oct 10 06:19:05 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * recog.c (next_insns_test_no_inequality): Like next_insn_tests... + but check all insns that follow this one and can use it's cc's. + * output-m68k.c (output_btst): Use that. + + * vax.md (movsf, movdf): Undo last change; movq/movl set the cc wrong. + + * expr.c (expand_call): Set current_function_calls_setjmp if appro. + * stmt.c (setjmp_protect): New fn: move all vars into stack + unless declared `register'. + * c-decl.c (finish_function): Call it if -traditional and setjmp used. + + * cccp.c (main): Open output after the input. + Handle `-o -'. + + Sun Oct 9 00:28:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-sun3.h (CPP_SPEC): Define __HAVE_FPA__ if appropriate. + + * c-decl.c (pushdecl): After duplicate_decls, maybe warn about + "declared extern and later static". + + * expmed.c (store_bit_field): In insv case, avoid turning + VALUE into a subreg of a subreg. + + * loop.c (move_movables): When moving a libcall, + un-cse the function address; put it into the call insn. + + Sat Oct 8 01:48:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cse.c (equiv_constant): Subroutine to find the constant equivalent + of a reg. Now handles SUBREGs too. + (fold_rtx, fold_cc0): Use that function. + Don't handle SUBREGs like arithmetic. + + * reload1.c (choose_reload_targets): Don't call reg_overlap_mentioned_p + if arg is 0. + + Fri Oct 7 01:00:19 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * assert.h: Typo declaring __eprintf. + + * config.gcc: New file for making the links. + Fixed bugs for sun-[23]-os4. Added sun-[234] for sunos 3. + Added sequent-i386. + + * emit-rtl.c (gen_rtx): Return const0_rtx for 0 in DImode. + * varasm.c (immed_double_const): Don't be confused by this. + + * expmed.c (negate_rtx): New 1st arg MODE. + * expr.c (push_block): Calls changed. + * m68k.md, ns32k.md, vax.md: Calls changed. + + * c-decl.c (duplicate_decls): Don't discard DECL_BLOCK_SYMTAB_ADDRESS. + + * tree.c (staticp): INDIRECT_REF with constant address is static. + COMPONENT_REF may not be, if component offset isn't constant. + + * c-typeck.c (default_conversion): Converting array to ptr, if array + isn't a VAR_DECL, go through build_unary_op so that COMPONENT_REFs + will be simplified away. + + * ns32k.md (tbitd patterns): op 0 constraint: reject constants. + * ns32k.md (extzv for SImode and HImode): + Use adj_offsetable_operand; plus_constant was the wrong thing. + + Thu Oct 6 00:10:41 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.29 released. + + * loop.c (scan_loop): Don't think a `return' insn enters the loop. + + * ns32k.md (ashrsi3, etc): New define_expands for right shift. + + * reload1.c (choose_reload_targets): Change in the `force_group' + logic to avoid crashes. + + Wed Oct 5 04:09:19 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * expr.c (expand_expr, MINUS_EXPR): When negating integer op1, + truncate it to its mode. + + * expmed.c (extract_bit_field): SUBREG error check was wrong; + SImode SUBREGs are possible and ok in extzv, extv. + + * tm-ns32k.h (REGISTER_NAMES): Had two excess elements; deleted. + + Mon Oct 3 01:15:51 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * toplev.c (main, compile_file): If no files spec'd, use stdin, stdout. + + * flow.c (propagate_block): When checking for stack-adjust insns, + exclude non-SET patterns. + + * jump.c (jump_optimize): When changing jump=>return to return, + must rerecognize the insn. + + * toplev.c (compile_file): Allow `-' for main input or output filename. + + Sun Oct 2 10:30:09 1988 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * final.c (final): NOTICE_UPDATE_CC has extra arg, INSN. + * tm-*.h: Change definitions. + + * stmt.c (optimize_bit_field): Use gen_lowpart to make subregs. + + * stmt.c (assign_parms): Don't obey regdecls in inline function. + Don't lose existing REG_NOTES when adding one. + + * stmt.c (expand_function_start): Make return rtx before + marking parms live. + (expand_function_end): Use use_variable to emit USEs for SAVE_EXPRs. + + * stmt.c (expand_return): Handle TRUTH_AND_EXPR like ANDIF; OR also. + + * stmt.c (expand_end_stmt_expr): Always set TREE_VOLATILE, + sometimes TREE_THIS_VOLATILE. + + * jump.c (delete_insn): When finding PREV, skip deleted insns. + + * varasm.c (output_constant): WORDS_BIG_ENDIAN test was backwards. + + * emit-rtl.c (gen_lowpart): Allow MODE > 1 word if X is same size. + + * final.c (final): Don't delete no-op moves (jump did it if appro.). + + * final.c: Support prescan pass. + (final_start_function): init_recog and CC_STATUS_INIT mvd to `final'. + (final): New arg PRESCAN. Do no output if prescanning. + Don't alter conditionals if PRESCAN < 0 (prescan already done). + If jump becomes no-op, change it to a NOTE. + Remember to free the temp space for ASM_OPERANDS. + + * final.c (final): Altering store-flag must check STORE_FLAG_VALUE. + Don't try to do it if that isn't defined. + Don't try it if condition doesn't test CC0. + (alter_cond): No need to check COND != 0. + Handle CC_Z_IN_NOT_N and CC_Z_IN_N. + (m68k.md): Delete code that handled CC_Z_IN_NOT_N. + + * conditions.h: New flag CC_Z_IN_N. + * tm-*.h: Renumber all CC_... flags to make room. + + * combine.c (use_crosses_set_p): Loop start was 1 off. + + * local-alloc.c (reg_is_set): When a reg is CLOBBERed and dies in + one insn, make it live immediately before and after that insn. + + * global-alloc.c: Hard reg preferences for global pseudos. + Var allocno_preferred_reg deleted; new vars hard_reg_preferences + and regs_someone_prefers. + (global_alloc): Init those vars. Pass hard_reg_preferences elt + to find_reg. + (set_preference): New function makes entries in those vars. + (global_conflicts): new arg to mark_reg_store. Call set_preference. + (find_reg): Last arg now a preferred hard_reg_set. + Scan that set first of all. + (mark_reg_store): New arg is offset for renumbered regno. + But the code to use it is turned off. + + * global_alloc (check_frame_pointer_required): Handle reg_equiv_address + like reg_equiv_mem. Don't try to allocate pseudos with equiv mems + that don't use the frame pointer. + * reload1.c (reload): Call changed. + + * jump.c (sets_cc0_p): Tests whether rtx sets cc0, and whether + it does nothing but set cc0. + (find_cross_jump, delete_jump): Use that fn for these tests. + * loop.c (loop_skip_over): Likewise. + * reload.c (push_reload): Likewise. + + * genoutput.c: Output `const' before the data arrays. + Define it as nothing if not __STDC__. + + Sat Oct 1 02:19:29 1988 Richard Stallman (rms at apple-gunkies.ai.mit.edu) + + * expr.c (store_one_arg): 3rd arg to emit_block_move is in bytes. + + * cse.c (fold_rtx): Handling ZERO_EXTEND or SIGN_EXTEND of constant, + if the arg width is too wide to handle, return safely. + + * combine.c (FAKE_EXTEND_SAFE_P): Don't allow extend to > 1 word. + + * rtl.c (refers_to_regno_p): Moved from reload.c. Not static. + (reg_overlap_mentioned_p): New function, calls the above. + * output-*.c: Use that instead of reg_mentioned_p. + * tm-*.h (NOTICE_UPDATE_CC): Likewise. + * reload.c (push_reload, combine_reloads): Likewise. + * reload1.c (choose_reload_targets): Use it to check earlyclobbers. + + * reload1.c (choose_reload_targets): Elimination of previous + output-reload feeding our input now limited to pseudo-regs. + + * flow.c (life_analysis): Delete any insn copying reg to itself. + (propagate_block): Move update of OLD after special life and death + for CALL_INSNs. + + * vax.md (ashrsi3, ashrdi3, rotrsi3): define_expands to negate + the shift count. + * expmed.c (expand_shift): Eliminate negate-the-shift-count feature. + + * vax.md (and*i3): define_expands which use complement and bit-clear. + * expmed.c (expand_bit_and): Eliminate feature to do that. + This function could be eliminated. + + * expmed.c (store_bit_field): Handle nested subregs. + Allow gen_insv to fail; if it does, delete what we did and then + use store_fixed_bit_field. + (store_fixed_bit_field): Use gen_lowpart to make SUBREGs. + Do that for SUBREGs just as for REGs. + Error check OFFSET must be 0 for REGs. + (store_split_bit_field): Error check OP0 is a SUBREG when expected. + (extract_bit_field): Allow gen_ext{,z}v to fail. + Use gen_lowpart to make subregs. + (expand_shift): If a try fails, delete any insns it made. + + * expmed.c (expand_mult): Use expand_unop to negate. + When adding 2 powers of 2, do serial shifts, not parallel. + Handle absval==1 like other powers of 2. + + * explow.c (force_reg): Don't lose any existing reg notes. + + * stmt.c (expand_start_stmt_expr): Eliminate return value. + (expand_end_stmt_expr): No need for argument. + * c-parse.y (primary): Change calls. + + Fri Sep 30 01:50:22 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * integrate.c (copy_rtx_and_substitute, copy_address): + 'u' case erroneously returned the translated single element. + (copy_address): Special cases for frame-ptr and sums containing it. + MEM and LABEL_REF cases passed wrong arg to copy_rtx_and_substitute. + (copy_rtx_and_substitute): adjust mode of inline_target for context. + + * jump.c (true_regnum): For SUBREG of pseudo, use pseudo's # unchanged. + + Thu Sep 29 02:50:46 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * i386.md (movsi, mov{q,h}i): Use find_reg_note to look for REG_WAS_0. + * vax.md (movsi, movhi): Likewise. + + * varasm.c (decode_rtx_const): Was setting un.addr.base wrong + for a CONST. Should be symbol name, not the SYMBOL_REF. + + * rtl.c (rtx_equal_p): When comparing registers, check + REG_FUNCTION_VALUE_P. If there are `u'-slots in the rtx, ignore them. + + * rtl.c (reg_mentioned_p): Some rtx types were mistakenly treated + as uniquified (various constants). + + * rtl.c (read_rtx): Element type 'S' is string that may be omitted. + * rtl.def (define_insn, define_peephole): Add a last element, type 'S'. + * genoutput.c: Collect these optional last elements and output as + array `insn_machine_info' of structs `INSN_MACHINE_INFO'. + The last must be defined as a macro. + * recog.h (insn_machine_info): Declare it if appropriate. + + * regclass.c (record_address_regs): In PLUS case, look inside SUBREGs. + + * reload1.c (reload): Use reg_equiv_address for REG_EQUIVs with + invalid memory addresses. + When changing pseudos to mem refs at end, do FIX_FRAME_POINTER_ADDRESS + on their addresses. + (alter_reg): Check that with reg_equiv_mem. + (spill_hard_reg): If fp reg, spill regardless of basic_block_needs. + + * reload1.c (order_regs_for_reload): Don't put invalid regs into + potential_reload_regs at all. (They used to go at the end.) + + * reload.c (find_reloads): Store all earlyclobber operand in + reload_earlyclobbers (# in n_earlyclobbers): + * reload.1 (choose_reload_targets): Don't use value of find_equiv_reg + if it matches an earlyclobber operand. + + * reload.c (find_reloads_address for REG): + No need for explicitly excluding hard regs in these tests. + (find_reloads, find_reloads_address_1 for REG): likewise. + + * reload.c (push_reload): Code testing reg_equiv_constant should + be obsolete; add error check to verify this. + + * reload.c (hard_reg_set_here_p): Handle CLOBBERs, SUBREGs, overlap. + (refers_to_regno_p): Handle CLOBBERS. Handle overlap. + New arg ENDREGNO specs end of range to check for; + all callers changed (all in this file). + + * reload.c (find_reloads): SUBREG like REG in alternate recovery + for earlyclobber conflict. + The operands to unswap are those that are supposed to commute. + When operands match, copy the regclass of earlier one for later one. + + * stmt.c (optimize_bit_field): Don't use gen_extend_insn; + use convert_move, then reorder the insns. + * optabs.c (gen_extend_insn): Deleted. + + * optabs.c (emit_cmp_insn): Don't emit queue before recursion. + Don't convert size to SImode for cmpstrqi. + + * optabs.c (expand_binop): Keep any old REG_NOTES when adding them. + Always delete_insns_since if returning failure. + (expand_unop, emit_unop_insn): Keep any old REG_NOTES when adding them. + * spur.md (movhi): likewise. + + * RTL_EXPR_SEQUENCE is now a chain of insns, not a SEQUENCE. + * emit-rtl.c (emit_insns): New fn, emit a chain of insns. + * expr.c (expand_expr): Use that. + Also put const0_rtx in the RTL_EXPR_SEQUENCE (mark RTL_EXPR as output). + * stmt.c (expand_end_stmt_expr): Use get_insns to get the chain. + + * stmt.c (expand_end_stmt_expr): Put the RTL_EXPR on rtl_expr_chain. + (fixup_var_refs): Scan all waiting RTL_EXPRs not yet output. + Also scan all stacked sequences on sequence_stack. + + * genemit.c (gen_expand): Generate calls to {start,end}_sequence. + Use `emit' to handle a PARALLEL. + (FAIL, DONE): Change to fit gen_expand changes. + + * emit-rtl.c (change_address): abort if arg isn't a MEM. + + * emit-rtl.c: Sequences work now by saving and restoring first_insn + and last_insn. So these variables are used even when in a sequence. + emit_to_sequence has been deleted. + (start_sequence, end_sequence): Save and restore first_insn, last_insn. + (get_last_insn, add_insn): Sequences no longer need special treatment. + (delete_insns_since, reorder_insns): likewise. + (push_to_sequence): Set up to emit to a given existing insn chain. + + * emit-rtl.c (copy_rtx_if_shared): Don't copy INSNs. + Insert missing return stmt in MEM case (for MEMs ok to share). + (unshare_all_rtx): Now can copy the REG_NOTES simply. + Copy the LOG_LINKS too. + + * emit-rtl.c (make_safe_from): Treat SUBREG as X like a REG. + (delete_insns_since): Don't lose if FROM is the first insn. + (emit): Declare void, since no useful value. + Call simplejump_p properly. + (restore_reg_data_1): When a reg is an address, do mark_reg_pointer. + + * dbxout.c (dbxout_types): Call dbxout_symbol to do the work. + (dbxout_type_def): Deleted. + (dbxout_symbol): Set TREE_ASM_WRITTEN when a TYPE_DECL is output. + Don't output the same one twice. + + * cse.c (fold_cc0): LABEL_REF is not zero. + + * cse.c (cse_insn): Don't insert src, dest if they are the same place. + + * cse.c (lookup_as_function): Return entire rtx, not just operand. + (cse_insn): Caller changed. Also, copy the result before inserting it. + + * cse.c (fold_rtx): Put constant arg last if commutative op. + Handle idempotents and identities for mult, div, booleans, shifts. + + * cse.c (canon_hash): Parens were missing around shifts in "rotates". + + * c-convert.c (convert_to_integer): Truncate TRUTH_ANDIF_EXPR + like TRUTH_AND_EXPR; OR also. + + * c-typeck.c (build_binary_op_nodefault): Do truthvalue_conversion + for TRUTH_ANDIF, etc. + (build_unary_op): More simplifications for TRUTH_NOT_EXPR; + uses new fn `invert_truthvalue'. + + * recog.c (reg_fits_class_p): New name for reg_renumbered_fits_class_p + since it no longer needs to renumber. Also it now really assumes + arg is a REG. Callers changed. + * reload.c: Callers changed. + + * recog.c (general_operand): (SUBREG (MEM...)) need not alter mode. + (register_operand, nonmemory_operand): (SUBREG (MEM...)) is allowed. + (memory_operand): (SUBREG (MEM...)) is *not* allowed. + (mode_independent_operand): Operand names were backwards! + (No change in effect of this function.) + + * print-tree.c (dump): Some expr nodes contain rtx's. Print as rtx's. + + Wed Sep 28 18:51:12 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload1.c (choose_reload_targets): If a reload wanted a group, + don't allow a single register for it. + + Tue Sep 27 11:43:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * final.c (output_addr_const): Handle DImode CONST_DOUBLEs. + * tm-*.h (PRINT_OPERAND): Treat DImode CONST_DOUBLE like a CONST_INT. + + * vax.md (rotldi3): Insn deleted; it doesn't really exist. + + * toplev.c (report_error_function): Also mention the file name, + for parallel makes. New arg FILE; all callers changed. + + Mon Sep 26 15:44:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expmed.c (expand_shift): When using extzv, convert OP1 to SImode. + * c-typeck.c (build_binary_op_nodefault): Convert shift-count + to int regardless of result type. + + * output-spur.c (output_move_double): Fix typo, optype0=>optype1. + + * expr.c (expand_call): Avoid null deref on result of FUNCTION_ARG. + + * tm-i386.h (FUNCTION_PROFILER): Use correct assembler syntax. + + Sun Sep 25 12:13:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * fixincludes: Handle some files in netdnet, netdna, vaxif, vaxuba. + + * reload.c (find_reloads): Make no optional reloads if not -O. + + * loop.c (strength_reduce): Can't eliminate a biv if it's used + to compute a DEST_ADDR giv. Only DEST_REG givs are safe. + + * loop.c (general_induction_var): Shift & divide ops are linear + only in 1st operand; don't look for biv or giv in 2nd operand. + + * vax.md (fix_truncdfqi2): Use `%#'. + + Sat Sep 24 00:25:48 1988 Richard Stallman (rms at gluteus.ai.mit.edu) + + * loop.c (n_times_set, n_times_used): Now file-scope; + no longer passed as args to several functions. + + * loop.c (basic_induction_var): Accept reg as source value + only if it's invariant. + (strength_reduce): Benefit calculation and threshold changed. + Check reducibility of givs before trying to reduce them. + Check eliminability of biv before considering the givs; + let this affect the threshold. + (record_giv): New subroutine adds a giv to the chain. + + * ns32k.md (incrementing sp): Use cmpd insns to increment by 4 or 8. + + * integrate.c (expand_inline_function): Rename return_label + to local_return_label; avoid shadowing. + + Fri Sep 23 13:57:52 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * loop.c (loop_skip_over): Put the new label after the note that ends + the loop. + + * loop.c: New function strength_reduce and subroutines. + * toplev.c: New var flag_strength_reduce, set from -fstrength-reduce. + + * vax.md (sob insns): They were broken, with plus in one place + and minus in another. Use plus consistently. + + * rtl.h (REG_LIBCALL, REG_NONNEG): Two new kinds of reg-note. + * optabs.c (expand_binop, expand_unop): Make REG_LIBCALL notes. + * loop.c (scan_loop, move_movables): Move entire library calls. + Use m->set_src to get the expression, in case it's from a REG_EQUAL. + (consec_sets_invariant_p): Likewise. + + * loop.c (scan_loop): Start scan from loop_top, if entry is rearranged. + Watch out for pseudo regs created by strength_reduce; + they can't index regno_last_uid. + (replace_regs): # regs mapped is now an arg. + + * loop.c (count_loop_regs_set): Don't increment n_times_set past 127. + (consec_sets_invariant_p): Reject if N_SETS arg is 127. + + * toplev.c (rest_of_compilation): NREGS arg of loop_optimize deleted. + + * c-decl.c (store_parm_decls): Anything but an IDENTIFIER_NODE + in SPECPARMS indicates a parmlist, not an identifier list. + (get_parm_info): Use only PARM_DECLs when making the list of arg types. + + * combine.c (try_distrib): Boolean ops can't distribute through PLUS. + MULT can distribute through PLUS and only PLUS. + + Thu Sep 22 15:57:41 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * jump.c (jump_optimize): uncond jump to a return becomes a return. + + * integrate.c (copy_parm_decls, copy_decl_tree): Set TREE_USED. + Avoid inevitable "unused" warning for these decls. + + * c-typeck.c (comptypes): When comparing array types, + ignore qualifiers of element type. + + * tm-*.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Define new macros. + * final.c (final_start_function): Use them to protect around + the call to the profiling function. + * stmt.c (expand_function_start): Set current_function_needs_context + and current_function_returns_struct. + + * stmt.c (expand_null_return_1): If clear_pending_stack_adjust + doesn't clear it, do the adjust now. + * expr.c (clear_pending_stack_adjust): No-op if -finline-functions. + + * cccp.c (macarg1, skip_if_group): Backslash makes next char ordinary. + + * reload.c (find_reloads): Delete code to look for an equiv reg + for a reg being input-reloaded. This isn't safe. + * reload1.c (choose_reload_targets): Do it here. + + Wed Sep 21 00:36:22 1988 Richard Stallman (rms at hobbes.ai.mit.edu) + + * tm-sun3.h (CPP_SPEC): Define it based on TARGET_DEFAULT. + (STARTFILE_SPEC): Likewise. + + * reload1.c (choose_reload_targets): When redirecting prev insn + into this insn's reload-reg, check this doesn't break the prev insn + by giving it a reg it can't accept. Use new fn constraint_all_regs_p. + + * tm-sparc.h (ASM_OUTPUT_LOCAL): Use .reserve, not .common. + + * tree.h (TREE_USED): New attribute macro. + * c-parse.y (primary): Set TREE_USED in ..._DECL nodes. + * toplev.c, flags.h: Define and set warn_unused. + * stmt.c (expand_end_bindings): Warn if any var is unused. + * print-tree.c (prtypeinfo): Print this attribute. + + Tue Sep 20 15:29:01 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * assert.h: `assert' must expand to an expression. + Error message should show arg before expansion, not after. + + * c-decl.c (implicitly_declare): Make decl perm if !warn_implicit + since start_function needs to look inside it in that case. + + * toplev.c (announce_function): If we don't print, don't record we did. + + Mon Sep 19 15:21:11 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-parse.y (structsp): If pedantic, warn if comma at end of enumlist. + + * reload.c (find_reloads): Check insn_code_number >= 0 when + looking in insn_operand_strict_low. + + * tm-sun[23].h (CPP_SPEC): Rename __HAVE_FPU__ to __HAVE_68881__ + and put a space after that option. + + Sun Sep 18 01:12:56 1988 Richard Stallman (rms at hobbes.ai.mit.edu) + + * reload.c (find_reloads): Make optional reloads for explicit MEMs. + + * tm-m68k.h (MODES_TIEABLE_P): If no 68881, can tie fixed to floating. + * m68k.md (movdi): Allow F's (can be DImode now). + Don't allow f-regs (experiment). Don't preference x-regs. + (DImode push): Allow y-regs. + (DFmode push): Allow y-regs, not x-regs. + + * reload1.c (modes_equiv_for_class_p): New function. + (reload): Compare multiple modes for reg group with that function. + Allows differing modes in some cases when not tieable. + + * c-parse.y (check_newline): Let ASM_OUTPUT_IDENT override .ident. + * tm-3b1.h (ASM_OUTPUT_IDENT): Define this as no-op. + + * emit-rtl.c (reorder_insns): Update sequence_{first,last}_insn if nec. + (get_last_insn): If in a sequence, return last insn of sequence. + (delete_insns_since): If in a sequence, set sequence_last_insn. + + * spur.md (CONST_DOUBLE load insn): Use & for most dests. + (cond branches): pass additional args to output_compare. + (movdf, movdi): Use & loading reg from mem. + (trunc*): Enable these. + (add): New pattern for adding large immediate operand. + (shifts): A define_expand for each kind of shift, + plus a recognizer which outputs repeated insns if necessary. + (call*): Use r9 as temp, not r2. + + * output-spur.c (output_compare): New args NEG_{EXCHANGE_,}OPCODE. + (singlemove_string): Handle reg as operand 1. + (output_add_large_offset): Fake add insn with large immediate arg. + (big_immediate_operand): Match such an arg. + + * tm-spur.h (FUNCTION_PROLOGUE): Align the stack pointer. + Handle bigger frames. + (TARGET_LONG_JUMP, TARGET_EXPAND_SHIFT): New target flags. + + * va-spur.h: Track position in regs and stack separately. + + * c-decl.c (duplicate_decls): Warn if prototype follows + non-prototype definition. + + Sat Sep 17 14:30:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (expand_builtin): Avoid crash if arg isn't integer type. + + * c-decl.c (duplicate_decls): Just warn if redeclaring a builtin, + and leave it built in unless it is redefined. + + * vax.md (ashlsi3): Use addl3, moval or movad when useful. + (addsi3): Avoid pushab, movab for constants < 64. + Do use movab when > 64 when operands match. + (mov*i): Use mcom* rather than mneg*. + Use add*3 with two quick immediate args when useful. + (movhi): Don't use movzbw or cvtbw; said to be slow. + + * rtl.h: New macros MEM_VOLATILE_P, MEM_IN_STRUCT_P, + INSN_DELETED_P, REG_USER_VAR_P, RTX_UNCHANGING_P, RTX_INTEGRATED_P, + CONSTANT_POOL_ADDRESS_P. + Most places changed to use them. + + Fri Sep 16 11:50:15 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * jump.c (jump_optimize): Was testing volatil on non-MEMs erroneously + when looking for no-op move insns. + + * cccp.c (handle_directive): Ignore comments between # and directive. + + * integrate.c (copy_rtx_and_substitute): Stack-push memrefs need + to be copied. + + * tm-bsd386.h (ASM_OUTPUT_DOUBLE): Undef previous def. + + * reload1.c (alter_reg): Don't reuse spill_stack_slot + if it isn't big enough for this reg's mode. + + * expr.c (emit_move_insn): After force_const_mem, ensure + mem address is valid. + (move_block_to_reg, move_block_from_reg): Likewise. + + * expr.c (expand_call): Spurious TREE_VALUE on args[i].tree_value. + + * m68k.md (zero_extend*): Require register_operand for operand 0. + + * stdarg.h (va_start): Alternate defn for sparc. + + Thu Sep 15 11:39:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-parse.y (yylex): When atof gives ERANGE, check for "0.0", etc. + + * assert.h (__assert): Alternative definition for -traditional. + + * output-sparc.c (output_block_move): Initialize xoperands. + + * combine.c (try_combine): Never subst for a reg that is incremented. + + * m68k.md (cmpm pattern): Make the match_operands match memrefs + and check that they are pushes in the extra condition. + This makes reloading handle the pushes properly. + + * expr.c (MOVE_RATIO): Make it 15. Allow overriding it. + + Wed Sep 14 09:50:08 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-decl.c (build_enumerator): Use saveable_tree_cons. + + * vax.md (movdf): Use movq when safe. + + * Version 1.28 released. + + * tm-sparc.h (FIRST_PARM_CALLER_OFFSET): Defined. + + Tue Sep 13 00:11:37 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * tree.c (saveable_tree_cons): New function. + * c-decl.c (pushtag): Use it; lists of tags needed for inlining. + (get_parm_info): Likewise. + + * print-tree.c (dump): Handle each kind of statement node individually. + + * integrate.c (copy_decl_tree): Don't pass DECL_RTL through + copy_rtx_and_substitute if it's a memref with constant address. + + * sdbout.c (sdbout_symbol): Don't output garbage when DECL_RTL + has a form we don't understand. + + * reload.c (find_reloads_address_1): Don't reload an autoincrement + if it has a suitable hard reg already. + + * c-typeck.c (process_init_constructor): Error check after digest_init. + + * c-parse.y (is_reserved_word): Now static. + + Mon Sep 12 19:19:28 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * i386.md (all push insns): Use `<' for the constraint, + since a push_operand won't fit an `m' constraint on this machine. + + * expr.c (expand_call): If fn name is `__builtin_alloca', + it may be alloca. This case arises if the user redeclares + `__builtin_alloca'. + + Sun Sep 11 01:47:01 1988 Richard Stallman (rms at gluteus.ai.mit.edu) + + * Eliminate MAX_SETS_PER_INSN. + * cse.c (cse_insn): Combine all the tables and dynamically allocate. + (cse_main): Count the actual number of SETs; don't estimate. + * genconfig.c: Don't calculate MAX_SETS_PER_INSN. + * stmt.c (expand_asm_operands): No limit on # of output operands. + + * expr.c (expand_call): + Store all non-reg parms first, then store all partially-in-reg + parms, then all the (precomputed) wholly-in-reg parms. + Special hair for BLKmode parms which must be passed entirely + in memory; also for BLKmode parms initialized from function calls, + for which it is best to allocate the space before computing value. + Use macro FIRST_PARM_CALLER_OFFSET to handle machines where reg + parms "take up space" on the stack below the stack pointer. + (store_one_arg): Handle case of preallocated stack loc for BLKmode. + Update current_args_size here, not in caller. + + Sat Sep 10 19:58:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * output-sparc.c (output_scc_insn): Changed asm templates. + Use common code to emit the move insns and label at the end of fn. + (output_mul_by_constant): Use %g1 as temporary reg. + + * sparc.md (indexed load pattern): Deleted. + (fix_truncdfsi2): Don't ignore value of output_fp_move_double. + (cse'd multiply): Operand 1 predicate is general_operand. + (return peepholes): Conditionalize on ! TARGET_EPILOGUE. + + * tm-sparc.h (INIT_CUMULATIVE_ARGS,FUNCTION_ARG...): + Use partial regs for args that start in regs but won't entirely fit. + + * tm-sparc.h (CONST_COSTS): 0 for args that can be immediate. + (STRUCTURE_SIZE_BOUNDARY): Now 8. + (STRUCT_VALUE_OFFSET): Defined as symbolic name for `64'. + + * expr.c (struct arg_data): New component `stack' says where in the + stack to put a BLKmode arg (if it's nonzero). + (store_one_arg): Handle case where it's nonzero. + (target_for_arg): New fn, precompute stack locn for BLKmode arg. + + Fri Sep 9 01:41:13 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * cse.c (fold_rtx): Misnested ifs screwed SUBREG case. + + * reload.c (find_reloads_toplev): Special case for (SUBREG REG) + where REG is equivalent to a CONST_INT. + (find_reloads): Don't ignore the value returned by find_reloads_toplev. + Treat a (SUBREG constant) like a (SUBREG MEM): set force_reload. + + * reload.c (push_reload): Abort if memory subreg is not + paradoxical; the MEM mode should be narrower than the SUBREG. + + * stmt.c (fixup_var_ref_1): Fixup memory subregs in an insn + copying VAR to or from a register. + + * m68k.md (movdi, movdf): the x-reg constraint accidentally allowed + moving rm to rm with no &. + + * vax.md (call_value): Typo. + + * expr.c (emit_block_move, emit_push_insn): prefer movstrqi to movstrsi + + * m68k.md (FPA multiply): bad opcodes for 3-operand multiply insns. + + Thu Sep 8 18:22:14 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-parse.y: Use YYERROR instead of synonym YYFAIL. + BISON VERSIONS PRIOR TO THIS DATE WON'T WORK! + + * c-typeck.c (digest_init): Use TYPE_MAIN_VARIANT of array elt type. + + * tm-sun[23].h (CPP_SPEC, ASM_SPEC): Let -m(c|)680[12]0 control + options for CPP and assembler. + + Wed Sep 7 13:44:59 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * New handling of reloading of PRE_DEC, etc. + Now reload_in is the PRE_DEC, etc, and reload_inc is always positive. + * reload.c (push_reloads): Old code to set reload_inc deleted. + (find_reloads_address_1): Call push_reload the new way. + (find_inc_amount): Value always positive. + * reload1.c (choose_reload_targets): Detect this case. + (inc_for_reload): New fn; does the real work for this case. + * m68k.md (call, call_value): Fn address must be offsetable. + + * combine.c (try_distrib): Reject strange cases such as if + result of PREV1 or PREV2 is used in a memory address in INSN. + + * vax.md (movsf): Generate movl instead of movf. + + * expr.c (expand_call): If have regparms, store all BLKmode args + before all the other args. + (store_one_arg): New subroutine broken out. + + * output-sparc.c (output_block_move): Complete rewrite. + + * sparc.md (cse'd multiply insn): Typo in asm-output code. + + Tue Sep 6 20:05:48 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-parse.y (yylex, etc.) Install Schmidt's perfect hash table. + + * gcc.c: handle extension `.cc'. + + Mon Sep 5 12:09:58 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.27 released. + + * tm-i386.h (PREFERRED_RELOAD_REG): When reloading a QImode, + make sure the class doesn't include %esi or %edi. + * i386.md (movqi): Eliminate only use of the class `x', + for which PREFERRED_RELOAD_REG cannot work. + (In next version, get rid of INDEX_CLASS). + Also use `*' to cause preferencing of Q_REGS. + * tm-m68k.h (PREFERRED_RELOAD_REG): When reloading a QImode, + use DATA_REGS. + + * reload.c (push_reloads): Braino in last change when IN == 0. + + * flow.c (mark_used_regs, mark_set_1): Bug if HARD_REGNO_NREGS + returns 0 for VOIDmode reg (inside a CLOBBER). + + * c-parse.y (asm_operand): Handle `("REGNAME")' as an operand. + * recog.c (decode_asm_operands, asm_noperands): Ignore any CLOBBERs. + * regclass.c (reg_names): Variable now global. + * stmt.c (expand_asm_operands): Generate CLOBBERS when appropriate. + + * stmt.c (assign_parms): Ignore parms that aren't PARM_DECLs. + + * varasm.c (assemble_variable): Do ASM_OUTPUT_EXTERNAL for functions. + + * c-parse.y (yylex): floatflag is now an enum. + Detect invalid use of decimal points (> 1, or in exponent) + and multiple exponent letters. + + * expr.c (expand_call): If inlining fails, set TREE_ADDRESSABLE. + + Sun Sep 4 00:36:30 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * c-decl.c (grokdeclarator): A const array becomes an array of consts. + * c-typeck.c (build_array_ref): Array ref is const if array elts are. + + * output-sparc.c (output_move_double): Change criteria for ldd, std. + (output_fp_move_double): New alternatives avoid ldd, std for + stack refs that aren't aligned. + (output_block_move): Use %g1 as temp reg. + + * sparc.md (floating point load from constant mem address): + Use %g1 as temp reg. Use output_move_double in DF case, not ldd. + (movsf): Asm insn typo in FPreg to FPreg case. + (floatsi{s,d}f2): Constraint changed. + Also new special case pattern in front of it. + (fix_truncdfsi2): Use output_move_double, not ldd. + (addsi3, subsi3): Use %g1 as temp reg. + (cse-optimized multiply): Constraint now `g'; output generalized. + (andsi3, orsi3, xorsi3): Use %g1 as temp reg. + + * reload.c (find_reloads): Force int constants into memory just + like floating ones, if memory is allowed and no regs are. + + * expr.c (expand_call): Don't treat structure_value_addr like a parm + if the first parm would be passed in a register. + Also, write comments for all local vars. + + * tm-386v.h (START_SPEC): Use {g,m}crt1.o, not {g,m}crt0.o. + (LIB_SPEC): Always use crtn.o. + + Sat Sep 3 13:05:50 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * explow.c (plus_constant): Don't put CONST around lone SYMBOL_REF. + + * combine.c (subst): Simplify zero- or sign-extend of a constant. + + * expr.c (expand_expr): for REAL_CST, etc., check for invalid + memory addresses and copy into registers. + + * integrate.c (expand_inline_function): If incoming struct value addr + is in memory, map it like a memory parameter. + + * tm-*.h (FIRST_PARM_OFFSET): Now takes fndecl as argument. + * integrate.c (expand_inline_function): Calc., use and save + this fns value of FIRST_PARM_OFFSET. + (copy_rtx_and_substitute): Use that value. + * stmt.c (assign_parms): Likewise. + + * tm-sparc.h (FIRST_PARM_OFFSET): Make it 64 if value is BLKmode. + (STRUCT_VALUE{,_INCOMING}): Put the value in 64(fp). + + * tm-sparc.h (PRINT_OPERAND_ADDRESS): Print offsets in decimal. + Avoid excess `+' before a negative offset. + + * stmt.c (expand_function_start): Create the return value rtl + before making the tail-recursion loop point. + + * combine.c (gen_lowpart_for_combine): Generate a paradoxical subreg + rather than a wider memref. + + * reload.c (push_reload): Extend last change to case where OUT != 0. + + Fri Sep 2 11:43:20 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stmt.c (fixup_var_refs): Adjust last_parm_insn when deleting insns. + + * expr.c (emit_push_insn): calling memcpy, bump TEMP 2 pointers worth. + + Thu Sep 1 16:39:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload1.c (choose_reload_targets): Test for canceled reload + before looking inside reload_out. + + * jump.c (jump_optimize): Bug in last change. + + * m68k.md (return): Pattern disabled; confuses Aug 29 stmt.c change. + * ns32k.md, i386.md: likewise. + + * emit-rtl.c (emit_note_force): New, like emit_note but always do it. + * stmt.c (expand_function_end): Use emit_note_force. + + Wed Aug 31 11:34:08 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload1.c (alter_reg): New arg FROM_REG is hard reg that the pseudo + was spilled from. Works with spill_stack_slot. Callers changed. + Now all pseudos spilled from one hard reg get the same slot. + (reload): Initialize new variable spill_stack_slot. + + * cse.c (cse_insn): Don't insert floating point mems if -ffloat-store. + + * reload.c (find_equiv_reg): Allow no equivs for volatile memrefs. + Also none for floating mem refs if -ffloat-store. + + * output-sparc.c (output_mul_by_constant): make `p' and `log' unsigned. + + Tue Aug 30 13:47:12 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * jump.c (jump_optimize): Ignore other NOTEs while looking for + a NOTE_INSN_FUNCTION_END. + + * integrate.c (save_for_inline): Flush extra call to max_reg_num. + Don't copy NOTEs that are NOTE_INSN_FUNCTION_END. + (copy_for_inline): Don't copy NOTEs that are NOTE_INSN_FUNCTION_END. + + * stmt.c (optimize_bit_field): If bit field is SRC, strip subregs + from the DEST. + + * expmed.c (expand_mult): Special case for -1 as one operand. + + Mon Aug 29 12:14:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stmt.c (expand_goto_internal, expand_fixup): New arg LAST_INSN. + (expand_return): Pass that arg in tail-recursive case. + (other callers): Pass 0 for that arg. + (expand_null_return): Handle HAVE_return nonzero w/ FUNCTION_EPILOGUE. + (expand_null_return_1): New fn, has guts of old expand_null_return. + (expand_return): Call expand_null_return_1 to pass LAST_INSN arg. + (expand_return): Handle HAVE_return nonzero w/ FUNCTION_EPILOGUE. + (expand_function_{start,end}): Likewise. + (expand_cleanups): Fix typo in recursive-list case. + (move_cleanups_up): New fn. + + * expr.c (expand_call): Execute cleanups_of_this_call on exiting. + Notice calls to __builtin_new (but don't do anything about them yet). + + * reload.c (push_reload): If reloading a (SUBREG (MEM ...) ...), + really reload just the MEM in the MEM's own mode. + + * sparc.md: Define patterns for insns that set the ccs. + Define set-flag insns. + New patterns for indexed load, and for optimizing signed bit fields. + (mulsi3, umulsi3): Give "r" constraint to operand 0. + Peephole optimizers recognize some cases where delay insns are safe. + Changed patterns for call and return insns as well. + + * output-sparc.c (single_insn_src_p): New fn. + (output_delay_insn): New fn. + + * tm-sparc.h (TARGET_EPILOGUE): New target flag. + (NOTICE_UPDATE_CC): New clause for funny PARALLEL with a REG in it. + + * m68k.md (movqi): Use *'s to ensure preferencing d-regs. + + * c-parse.y (datadef): If traditional, no warning about no specs. + + Sun Aug 28 14:34:33 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-i386.h: Define PROMOTE_PROTOTYPES. + POINTER_BOUNDARY now 32. + + * regclass.c (reg_scan): Compute `max_parallel', max # of sets and + clobbers in any insn in this function. + * global-alloc.c (global_conflicts): Use that, not MAX_SETS_PER_INSN. + + * stmt.c (expand_asm_operands): MAX_SETS_PER_INSN limits # output ops. + + * emit-rtl.c (init_emit_once): Make elt 2 of {f,d}const0_rtx nonzero. + + * c-decl.c (lang_decode_option): Handle -Wwrite-string. + * c-parse.y (combine_strings): If that flag, make array of const char. + + * expr.c (expand_expr): for INTEGER_CST, always use immed_double_const; + never do output_constant_def (it didn't work). + Also heed WORDS_BIG_ENDIAN. + + * varasm.c (output_constant): Handle integer CONST_DOUBLEs. + (output_constant_def): Abort if arg is an INTEGER_CST. + + * emit-rtl.c (gen_rtx): Don't return {f,d}const0_rtx for DImode. + + Sat Aug 27 12:37:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-decl.c (pushdecl): Global extern decls set TREE_PUBLIC + like local ones. + + * integrate.c (expand_inline_function): Handle parms that were + passed in registers but whose homes are on the stack. + + * varasm.c (force_const_mem): Output ints according to spec'd mode. + ({record,compare}_constant_rtx,const_hash_rtx,decode_rtx_const): + Take mode as argument; pass it along. + + * c-parse.y (read_escape): No warning for `\{' or `\['. + + Fri Aug 26 12:23:07 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stmt.c (fixup_memory_subreg): Typo calculating big-endian adjust. + + * vax.md (call_value): Handle >255 args as in `call'. + + Thu Aug 25 16:00:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * jump.c (delete_jump): Don't delete the cc-setter if it has autoinc. + + Wed Aug 24 16:33:37 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (expand_expr): For sun with a COND_EXPR, use SUBTARGET + if validate_subtarget says ok. + + * tree.c (build_index_type): make_index_type moved here and renamed. + + * combine.c (move_deaths_2): New function. + (try_distrib): Use that, not move_deaths. + + * tm-sparc.h (SHIFT_COUNT_TRUNCATED, STORE_FLAG_VALUE): Define them. + + * tm-sparc.h: FUNCTION_{PRO,EPI}LOGUE: Save room for ins and + locals to spill to the frame if any ins *or* locals are live. + + * tm-sparc.h (NOTICE_UPDATE_CC): Delete the clause that always + cleared the cc's for unrecognized insns. + + * reload1.c (reload_as_needed): Don't try to use a spill-reg + in a basic block that wasn't spilled: ignore optional reloads. + + Tue Aug 23 09:45:05 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * output-sparc.c (output_scc_insn): New function. + + * expr.c (expand_builtin, alloca): Round result of alloca + up to a multiple of STACK_BYTES. + + * toplev.c (compile_file): Default main_input_filename is cc1 input. + + * tm-i386.h (FUNCTION_BOUNDARY): 32 avoids extra prefetch. + + * i386.md (movdi, movdf): Add `&' where needed in constraints. + + Mon Aug 22 11:57:51 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * symout.c (symout_finish): Allocate typevector after the symout_types. + + Sun Aug 21 16:10:54 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-3b1.h (ASM_FORMAT_PRIVATE_NAME): Use a `_' as well as `%'. + + * expr.c (expand_expr): Typo setting MODE for MAX_EXPR. + + * Makefile (stage*): If ln fails, copy gnulib to stage*. + (realclean): Do `clean' and then some. + (install): new var USER_H specifies headers to copy. + + * c-typeck.c (build_binary_op_nodefault): LT_EXPR, etc. + on ptr vs int failed to set result_type. + (build_conditional_expr): Don't replace nonzero int + with null_pointer_node. + + * combine.c (remove_links, try_distrib): New fns. + (subst): New simplifications for ZERO_EXTEND, SIGN_EXTEND. + (combine_instructions): Call try_distrib. + (FAKE_EXTEND_SAFE_P): Allow SUBREGs. + + * m68k.md (non-FPA pattern for floatsisf2): Typo, had DF for SF. + + Sat Aug 20 12:04:37 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * integrate.c (copy_address): Variant of copy_rtx_and_substitute. + (copy_rtx_and_substitute): Use copy_address for MEM address that + doesn't satisfy memory_address_p. + + * reload.c (find_reloads): If force_reload set, don't set WIN + for a MEM even if `m', `o' or `g' in constraint. + + * i386.md (expendqihi2): Typo in asm template. + + * toplev.c (rest_of_compilation): Call clear_const_double_mem. + * varasm.c (init_const_rtx_hash_table): Don't call it here. + (immed_real_const): Don't record the rtx in the REAL_CST node. + (force_const_double_mem, clear_const_double_mem): Use cc0_rtx, not 0, + as flag for a CONST_DOUBLE not on the chain. + + * cccp.c (handle_directive): If traditional, do scan strings + but accept unterminated ones. + (collect_expansion): -traditional: Don't recognize comments in strings. + Stringify arguments that appear within strings. + (skip_quoted_string): -traditional: Always exit at newline. + (macroexpand): -traditional: Don't put `"'s around stringified arg. + (macarg): Set stringified_length accordingly. + + * c-decl.c (duplicate_decls): Avoid error redeclaring fcn after + implicit decl if -traditional. + + * toplev.c (announce_function, report_error_function): + Change communication logic between these fcns. + + * c-decl.c (lang_decode_options): Handle -Wall here. + * toplev.c (main): not here. + + * tm-bsd386.h: Don't include tm-i386.h--be like tm-att386.h + + Fri Aug 19 11:08:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * config-sun4.h: If sparc, include config-sparc.h. + Never include alloca.h. + + * tm-m68k.h (TARGET_SWITCHES): Define `-mc68020', `-mc68000'. + + * c-decl.c (init_decl_processing): If traditional, use signed sizetype. + + * gcc.c (main): Use stderr for printing version. + + Thu Aug 18 14:42:36 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.26 released. + + * m68k.md (movsi): Constraint change for fpa regs. + + * reload1.c (choose_reload_targets): Clear reg_reloaded_contents + for all regs of a multi-reg group. + + * reload.c (find_equiv_reg): HARD_REGNO_NREGS wants mode, not size. + Check properly for overlap against multiword reload regs. + + Tue Aug 16 14:54:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * varasm.c, expr.c (immed_double_const): immed_real_const_2 renamed. + + * tm-i386.h (SFVALUE): Should be `double'. + * tm-i386v.h (SFVALUE): Don't override it. + + * tm-i386.h (ASM_OUTPUT_ASCII): Don't define it. + * tm-att386.h: Definition moved here. + + * tm-bsd386.h: New file, for Sequent. + * tm-seq386.h: New file, for Sequent. + * config-i386.h: New file, for Sequent. + + * expr.c (push_block): Take account of STACK_POINTER_OFFSET. + (expand_call): Therefore need not do so here. + + * optabs.c (expand_fix): Typo if going via DImode. + + * reload1.c (choose_reload_targets): Don't * reload_reg_rtx if 0. + + Mon Aug 15 01:11:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * integrate.c (copy_for_inline): Don't try copying 0-length vector. + (copy_rtx_and_substitute): Likewise. + + * m68k.md (andsi3): use clrw instead of andw #0. + + * print-tree.c (walk): Don't omit permanent nodes reach from temps. + + * m68k.md (zero_extend...): Reinstall the old zero-extend insns + without names, so they can help the combiner. + + * expr.c (expand_expr): Don't use hard regs as subtargets. + * combine.c (FAKE_EXTEND_SAFE_P): Always consider MEMs safe. + * reload.c (find_reloads): For (SUBREG (MEM ...)) set force_reload. + + * c-parse.y (redescape): Don't warn for `\('. + + * reload.c (find_reloads_address): #if was backwards. + + Sun Aug 14 16:52:22 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-typeck.c (shorten_compare): Change switch to chain of ifs. + + * tm-ns32k.h (PRINT_OPERAND): CONST_DOUBLE contains a double + even if it's SFmode. + (FUNCTION_PROLOGUE): If MAIN_FUNCTION_PROLOGUE defined, run it. + + * cccp.c (file_buf): Rename field `free' to `free_ptr'. + + * Makefile (ALLOCA, MALLOC, LIBDEPS): New variables for easier + customization. Executables depend on LIBDEPS instead of OBSTACK1. + (cccp): Deps and libs now work like the others. + + * output-i386.c (notice_update_cc): Rewritten for clarity. + + * tm-i386.h (OUTPUT_JUMP): If CC_IN_OVERFLOW, abort. + + * recog.c (push_operand): Test for stack_pointer_rtx. + + * integrate.c (copy_rtx_and_substitute): Don't submit push-operands + to `memory_address'--it would lose on machines where pushing is + a special insn, not an addressing mode. + + * output-i386.c (top_dead_p): No more redundancy--that didn't work. + Now one method if optimized, one for call_insns if noopt, one for + other insns if noopt. + (call_top_dead_p): fp_top_dead_p renamed + and only the call-insn clause remains. + + * i386.md (cmpsf, cmpdf): Output was backwards. + (", tstsf, tstdf): Set CC_IN_80387. + (incb pattern): Restrict allowable registers. + (movsf, movdf): Call top_dead_p only when absolutely necessary. + (call_value): Use top_dead_p, not subroutine. + + Sat Aug 13 15:19:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stupid.c (stupid_life_analysis): If only 1 reg class, + call stupid_find_reg only once. + + * stmt.c (expand_function_start): + Clear current_function_pretend_args_size. + + * expr.c (store_constructor): If target is hard reg, go via a pseudo. + + * varasm.c (real_constant_chain): Now static in this file. + (force_const_double_mem): Put R on chain if not already on. + (clear_const_double_mem): Set XEXP (,2) to 0; + also clear real_constant_chain and the chain links. + * emit-rtl.c (init_emit_once): Put 0 in XEXP (,2) of {d,f}const0_rtx. + * cse.c (canon_hash): For CONST_DOUBLE, ignore elts other than 0,1. + + Fri Aug 12 11:48:38 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload1.c (order_regs_for_reload): Handle REG_ALLOC_ORDER more spots. + + * global-alloc.c (find_reg): error handling REG_ALLOC_ORDER; + also error skipping regs known to be hopeless. + * local-alloc.c (find_free_reg): error skipping hopeless regs. + * stupid.c (stupid_find_reg): likewise. + + * local-alloc.c (qty_compare_1): typo, had q1 for q2. + + * expr.c (expand_expr): Don't use supplied target when optimizing + arithmetic using a comparison or conditional; that target could be + needed for the result of the comparison. + + * reload1.c (reload): Don't set reg_equiv_constant for hard regs. + + * stupid.c (stupid_life_analysis): Ignore reg R if regno_reg_rtx[R]==0. + + * symout.c (symout_finish): Use perm. links in permanent_fwd_refs. + + * i386.md (movhi, movqi): Check no_labels_between_p. + + Thu Aug 11 10:44:46 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * c-parse.y (yylex): Out-of-range float is just a warning. + + * tm-gnx-v3.h: New file for Genix. + * ns32k.md (movsi, call, call_value): GNX_V3 conditionals. + * tm-ns32k.h (PRINT_OPERAND_ADDRESS): Changes for Genix. + + * ns32k.md (insv patterns): Operand 0 is read-write. + + * i386.md (tstsf, tstdf): Don't push the arg if already in st(0). + + * varasm.c (output_constant_def): If EXP is permanent, the rtl is too. + + * tm-*.h (ASM_OUTPUT_{LOCAL,COMMON}): New 4th arg, rounded size + vs unrounded size. + * varasm.c (assemble_variable): Pass new arg. + * symout.c (symout_init): Likewise. + + * cccp.c (rescan): Don't let char const cross lines. + (skip_quoted_string, macarg1, discard_comments): Likewise. + + * expr.c (expand_expr, VAR_DECL case): handle flag_force_addr. + + * tm-i386v.h (TAREGT_DEFAULT): Assume 80387. + * config-i386v.h (alloca): Use __builtin_alloca under GNU C. + + Wed Aug 10 11:23:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload.c (find_reloads): Alternative loses + if it has no regs for a reg operand. + + * tm-sun3.h (STARTFILE_SPEC): Define, for fpa's sake. + * tm-m68k.h: New hard regs, reg classes, reg class letters, + target flag and switch, operand syntax and CC handling for fpa. + * m68k.md: Add fpa insn patterns. + * output-m68k.c (standard_SunFPA_constant_p): New fn. + (output_move_const_{single,double}): Handle fpa regs. + (singlemove_string): Handle fpa regs. + + * stmt.c (fixup_memory_subreg): Result had wrong mode. + + * ns32k.md (insv patterns): Adjust bit-number along with address. + + * sparc.md (negdf2, absdf2): Order of the words was backwards. + + * reload1.c (new_spill_reg): End confusion about meaning of 1st arg. + Arg counted_for_nongroups had wrong type. + + * tm-m68k.h (FUNCTION_{PRO,EPI}LOGUE): Round frame size to word bdry. + + Tue Aug 9 07:53:59 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-i386.h (ASM_OUTPUT_ASCII): Don't lose the sign bit. + + * tm-i386v.h (STARTFILE_SPEC, LIB_SPEC): Use crt1.o, crtn.o. + + * stmt.c (fixup_var_refs_1): fixup all memory subregs. + + * reload1.c (choose_reload_targets): Don't strip paradoxical + subregs from values to be reloaded. + + * cccp.c: Comment out text after #endif. + + * c-parse.y (init): Allow empty braces as init; warn if pedantic. + + * c-decl.c: Move C-specific options from toplev.c. + * c-tree.h: Move their externs from flags.h. + * c-decl.c (lang_decode_option): New fn called by `main'. + * toplev.c (sorry, really_sorry): New error reporting fns. + * c-decl.c (language_string): New var, name of this language. + + * c-parse.y: Don't include flags.h. + * dbxout.c: Do include it. + + * dbxout.c (dbxout_type): Handle function fields and static fields + and basetypes. Handle METHOD_TYPE and REFERENCE_TYPE. + Abort on unexpected tree code. + (dbxout_args): New fn to output prototype arg types. + (everywhere): Use IDENTIFIER_LENGTH instead of strlen. + (dbxout_type_name): Cleanup; avoid strlen. + + * local-alloc.c (reg_is_set): Don't call {post_,}mark_life for pseudos. + + * tree.h (TYPE_BASECLASSES): New field in type nodes. + + * ns32k.md (insv patterns): Was adjusting the address wrong. + + * c-decl.c (grokdeclarator): Just a warning for inline varargs fn. + + Mon Aug 8 08:16:46 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * varasm.c (immed_real_const_2): Guts of creating a CONST_DOUBLE. + * expr.c (expand_expr): Use that for 64-bit int constants. + + * loop.c (invariant_p): Don't check x->unchanging; it's not safe. + + * c-typeck.c (build_indirect_ref): Handle flag_volatile here + so that it propagates to component_refs. + * expr.c (expand_expr): No need to handle it here. + + * integrate.c (save_for_inline, expand_inline_function): + Set up insn_map to record mapping of old uids to copied insns. + (copy_for_inline, copy_rtx_and_substitute): Map 'u' refs via insn_map. + + * emit-rtl (emit_label, emit_barrier): Return what was emitted. + + * sdbout.c (sdbout_filename): Split off from sdbout_init. + * tm-encore.h, tm-3b1.h, tm-vaxv.h, tm-att386.h (ASM_FILE_START): + Call sdbout_filename. + + * toplev.c: Better messages for invalid options. + + * tm-m68k.h (PRINT_OPERAND_ADDRESS): Handle labelref+basereg. + + * tm-3b1.h (PUT_SDB_DIM): Override sdbout's definition. + (ASM_FORMAT_PRIVATE_NAME): Override tm-hp...s definition. + (PUT_SDB_PLAIN_DEF): Prepend `~' to specified name. + (SDB_GENERATE_FAKE): Prepend `~'. + + * gcc.c: Include config.h before obstack.h. + + Sun Aug 7 11:17:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stor-layout.c (layout_decl): Do nothing with CONST_DECL. + Treat FRIEND_DECLs like variables. + (layout_record): Handle VAR_DECLs and FUNCTION_DECLs in the fieldlist. + Handle basetypes (almost like fields). + (layout_type): Handle REFERENCE_TYPE and METHOD_TYPE. + + * tree.c (temp_tree_cons): New fn. + (array_type_nelts, simple_cst_equal): New fns. + (lvalue_p): CALL_EXPR is an lvalue if it returns REFERENCE_TYPE. + () Manage TYPE_REFERENCE_TO. + (TYPE_HASH_SIZE): Bigger. + (type_list_equal): Compare the TREE_PURPOSE fields. + (build_reference_type, build_method_type): New fns. + + * stmt.c (block_stack): Add field `cleanups' to each element. + (expand_{start,end}_bindings, expand_decl): Update that field. + (stack_block_stack): Now includes blocks that have cleanups. + (goto_fixup_chain): Add field `cleanup_list_list'. + (expand_goto_internal): Execute cleanups for blocks being exited. + (expand_fixup): Make a fixup if any block has cleanups. + (fixup_gotos): New args CLEANUPS and DONT_JUMP_IN. + Execute cleanups for blocks being exited, or add to cleanup_list_list. + (expand_end_bindings): New arg DONT_JUMP_IN. Execute any cleanups. + (expand_decl): New arg CLEANUP. + (expand_cleanups, fixup_cleanups): New functions. + * c-decl.c: Calls to expand_decl pass new arg. + * c-parse.y: Calls to expand_end_bindings pass new arg. + + * stmt.c (expand_return): Handle INIT_EXPR, or bare RESULT_DECL. + + * stmt.c (case_stack): Add field `has_default' to each element. + (pushcase,expand_end_case): Maintain and use that field. + + * stmt.c (pushcase): Handle RANGE_EXPR cases. + (pushcase_range): Create RANGE_EXPR cases. + + * final.c (final): Always pass 3 args to ASM_OUTPUT_CASE_END. + * tm-3b1.h: Delete offending spaces. + + Fri Aug 5 16:17:16 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * integrate.c (copy_rtx_and_substitute): Don't make fp+reg+const + without an intermediate temporary reg. + + * print-tree.c (dump): Don't print an identifier's chain. + + * toplev.c (compile_file): Treat `.i' suffix like `.co'. + + * gcc.c: New config macro CC1_SPEC: extra switches for cc1. + Make a new spec for `.i' files. + + * c-decl.c (pushdecl, finish_decl): Delete duplicate tests. + + * varargs.h: Maybe include va-sparc.h or va-spur.h. + * va-sparc.h: New file. + * va-spur.h: renamed file. + + * tree.h ({TYPE,DECL}_LANG_SPECIFIC): Types and decls can point to + language-specific structures containing other info. + * print-tree.c (dump): Hooks for printing the language-specific + data in types and decls. + + Thu Aug 4 08:54:30 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tree.def: Add some tree codes for C++. + + * Rename files: parse.[yh] -> c-parse.[yh], decl.c -> c-decl.c, + typecheck.c -> c-typeck.c. + Part of tree.c split out to c-convert.c. + + * expr.c (push_block): No longer static. + (expand_expr): Handle REFERENCE_EXPR and INIT_EXPR. + (expand_call): Turn a METHOD_TYPE to a FUNCTION_TYPE. + This is probably not all that is required. + + * parse.y (yylex): Use p->rid to check for `signed' and `inline'. + + * tm-sparc.h (ASM_OUTPUT_SOURCE_LINE): typo. + + * sparc.md: Add a pattern for andcc. + (cmpsf): Clobber reg 32 in DFmode. + (branches): There are no unsigned floating branches; abort. + (bgt): Correct name of floating variant. + (mov?i): Load small constants via mov. + (movdf for constants): Use mov, not add, to move regs. + (movsf, floatsi*, fix*): Simplify reg-to-reg-via-mem move generation. + (trunc*): Use mov, not or, to move regs. + (negsi2, one_cmplsi2): Avoid "neg" and "not" assembler syntax. + (call...): Generate "call" insns; handle #-reg-parms value. + * Define some peepholes for return insns. + + * tm-sparc.h (TARGET_SUN_ASM): New target flag. + (TARGET_DEFAULT): Now 1. + (FRAME_POINTER_REQUIRED): Now 1. + (STARTING_FRAME_OFFSET): Now -16. + (LEGITIMATE_CONSTANT_P): Only CONST_DOUBLEs fail. + (FUNCTION_{PROLOGUE,EPILOGUE}): Rewritten. + + * output-sparc.c (small_int): Test for int that mov can load. + (singlemove_string): Use mov, not add. + (output_move_double): Changes for overlap and for use of ldd, std. + (output_fp_move_double): Use ldd, std when safe. + (make_f0_contain_0): Simplify. + + * integrate.c (expand_inline_function): Some special CALL_INSN + handling no longer needed due to REG_FUNCTION_VALUE_P. + + * m68k.md (movqi): Constraints allow moving areg to areg. + + Wed Aug 3 08:29:31 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.25 released. + + * integrate.c (expand_inline_function): Don't let MEM be inline_target. + + Tue Aug 2 09:13:37 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * integrate.c (INTEGRATE_THRESHOLD): New macro, default dfn here. + (function_cannot_inline_p): Use it. + + * rtl.h (REG_FUNCTION_VALUE_P): New macro. + * stmt.c (expand_function_start): Set that flag in the return reg. + * integrate.c (expand_inline_function, copy_rtx_and_substitute): + Test that flag to test for the return value. + * expmed.c (expand_fixed_bit_field, expand_mult, expand_divmod): ditto. + FUNCTION_VALUE_OUTGOING_REGNO_P no longer needed. + + Mon Aug 1 02:46:08 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * integrate.c (copy_rtx_and_substitute): If NO_FUNCTION_CSE, + don't break out constant fcn addresses here. + + * expmed.c (expand_fixed_bit_field): Tests of FUNCTION_VALUE_REGNO_P + were backwards. + + Sun Jul 31 13:10:07 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * recog.c (indirect_operand): New function. + + * output-i386.c (print_operand): define %*. eliminate %s. + (fp_top_dead_p): In nonopt case, skip stack-adjusts while looking + for the insn that uses the function value. + + * varasm.c (text_section, data_section): New functions. + Replaced explicit printfs elsewhere with calls to them. + * final.c (final_start_function): Use these fns. + * sdbout.c (sdbout_one_type): Use text_section. + * tm-att386.h (ASM_OUTPUT_LOCAL): Use data_section. + + * expr.c (prepare_call_address): Don't pass const via reg if no -O. + + * tm-sparc.h (FUNCTION_{PROLOGUE,EPILOGUE}) Round the size of saved + registers. Fix bug counting saved registers. + + * tm-sparc.h (ASM_OUTPUT_SOURCE_LINE): Define this macro. + + * tm-sparc.h (DEFAULT_SIGNED_CHAR): Now 1. + + * expr.c (expand_builtin, alloca case): Adding stack offset needs + special code if TARGET is a MEM. + + * dbxout.c (dbxout_init): Define Ltext: after the reference to it. + + * tm-3b1.h (ASM_OUTPUT_CASE_LABEL): `short 0' triggers assembler bug; + `short L%nn-L%nn' supposedly works. + + Sat Jul 30 00:25:52 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * sparc.md (floatsidf2): Minor change in output. + (fix_trunc{sf,df}si2): Similar. + + * output-sparc.c (output_fp_move_double): Minor change in output. + + * stmt.c (assign_parms): Don't count stack space for struct value + address if the function does not have one. + + * sdbout.c: Output .dim's and total size for arrays. + Detect bit-fields properly. + Changed handling of structure tags. + + * reload1.c (new_spill_reg): counted_for_nongroups is a new arg; + store 1 in it if this reg is needed for max_nongroups. + + * reload1.c (choose_reload_targets): Allow inheritance of DFmode + if it needs only one register. + + * reload1.c (choose_reload_targets): Delete the death-note from the + store-insn of an inherited reload if PRESERVE_DEATH_INFO_REGNO_P. + + * reload.c (push_reload): Crash if PREFERRED_RELOAD_CLASS is NO_REGS. + (find_reloads): Smarter handling of forcing CONST_DOUBLE into mem. + Check PREFERRED_RELOAD_CLASS & do this if it says NO_REGS. + + * reload.c (subst_indexed_address): Handle case with 2 regs + and no constant term. + + * local-alloc.c: New variable qty_n_refs, set from reg_n_refs + and tested in qty_compare{,_1}. + (combine_regs): Update qty_n_refs. + Update qty_preferred_or_nothing more intelligently. + + * regclass.c (regclass, reg_class_record, record_address_regs): + Count the number of refs to each reg along with the costs, + and use it when computing the preferred_or_nothing flag. + (Can't use reg_n_refs since that is weighted by loop depth). + + * global-alloc.c (global_alloc): Enable test of OVERLAPPING_REGNO_P + for setting no_global_alloc_regs. + + * expr.c (prepare_call_address): Use force_reg, so it gets a REG_EQUIV. + + * optabs.c (can_{fix,float}_p): Return enum insn_code, not a function. + (init_{fix,float}_tab): Store enum insn_code's in fixtab and floattab. + (expand_{fix,float}): Change calls to can_{fix,float}_p. + Also, use emit_unop_insn to make the actual insns. + + Fri Jul 29 02:42:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cccp.c (initialize_char_syntax): If dollars_in_identifiers is 0, + set entries for `$' to 0. + Set entries to 1 rather than incrementing them. + + Tue Jul 26 11:14:22 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * varasm.c (assemble_variable): Make SDB output only if top-level. + + * local-alloc.c (reg_is_set): Arg to mark_life is regno, not qty. + + * output-ns32k.c (print_operand_address): New flag SEQUENT_BASE_REGS + * tm-sequent.h: Define that flag. + + * Makefile: add some missing deps. + + * tm-encore.h (ASM_FILE_START): Changed to do nothing. + + * sdbout.c (sdbout_init): Fix two dumb errors. + + * sdbout.c (sdbout_end_epilogue): No longer takes arg. + Examine current_function_decl here, not in caller. + * final.c: Call changed. + + Mon Jul 25 01:32:54 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stor-layout.c (layout_record): Handle PCC_BITFIELD_TYPE_MATTERS. + + * tm-3b1.h (__PTR_TO_INT, __INT_TO_PTR): Define these, to alter + parts of obstack.h. + + Sun Jul 24 17:56:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Padding for an arg may now go below or above it; new macro + FUNCTION_ARG_PADDING can now choose which, or can inhibit padding. + This makes for compatibility with PCC. + * expr.h: Default definition of that macro. + * expr.c (emit_push_insn): Put the padding above or below. + (expand_call): Don't count the padding if none wanted. + * stmt.c (assign_parms): Adjust parm stack addr if padded below. + Don't count the padding if none wanted. + * tm-3b1.h: Define FUNCTION_ARG_PADDING: no padding for > 4 bytes. + + * final.c (alter_subreg): Now returns the altered value + (but may still modify the original structure). + Handles (SUBREG:DI (CONST_DOUBLE:DF...)) by returning the CONST_DOUBLE. + + * m68k.md (DImode push): now allows `F'. + * ns32k.md (movdi): now allows `F'. + + * tm-m68k.h (FIX_FRAME_POINTER_ADDRESS): + Handle indexed references to frame pointer. + * tm-i386.h, tm-m88k.h, tm-sparc.h: Likewise. + + * cse.c (predecide_loop_entry): Must search for the loop top label. + + Sat Jul 23 08:53:01 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * parse.y (yylex): typo in wide strings. + + * tm-vaxv.h, config-vaxv.h: New files for sysV on vax. + + * config-sun4.h: If sparc and not compiling with GCC, include alloca.h. + + Fri Jul 22 02:38:02 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * tree.c (build_real_from_int_cst): CHECK_FLOAT_VALUE at proper place. + + * tm-hp9k320.h ({TEXT,DATA}_SECTION_ASM_OP): Should not include a tab. + * final.c (final_start_function): Don't output a tab before those. + + * sdbout.c (PUT_SDB_EPILOGUE_END): New macro. + * sdbout.c (sdbout_end_epilogue): New function to output the C_EFCN. + Like former sdbout_mark_end_function. Uses that macro. + * final.c (final_end_function): Call that function. + * tm-3b1.h: Override PUT_SDB_EPILOGUE_END like the other PUT_SDB... + + * tm-3b1.h (PRINT_OPERAND_ADDRESS, ASM_OUTPUT_INTERNAL_LABEL, + ASM_OUTPUT_CASE_{LABEL,END}): Put a % in names of internal labels. + (ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_ADDR_{VEC,DIFF}_ELT): + New macros, for same reason. + (FUNCTION_PROFILER): New macro, for % and also to put addr in a0. + + * final.c (output_source_line): For fcn's first line, use lineno 1. + * sdbout.c (sdbout_end_function): Clear sdb_begin_function_line + so can recognize first line of next function. + + * sdbout.c (sdbout_init): Output the .file pseudo here. + * tm-3b1.h, tm-att386.h (ASM_FILE_START): Don't do it here. + + * sdbout.c (PUT_SDB_VAL): Output leading tab, like the other macros. + * tm-3b1.h (PUT_SDB_VAL): Likewise. + + * regclass.c (regclass): Cast enums to int, not char. + * varasm.c (record_constant): Likewise. Avoids 3b1 PCC bug. + + * decl.c (pushdecl): Better choice of error message for extern/static. + + * emit-rtl.c: Do look for STRUCT_VALUE_INCOMING_REGNUM. + + Thu Jul 21 02:13:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cse.c (canon_hash): CONST_INT case failed to add to prev. value + of HASH; was inconsistent with cse_insn mem address hashing. + + * m68k.md (divide insns): Alternate 3B1 syntax for `swap' insn. + + Wed Jul 20 18:27:10 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * m68k.md: In shift-by-24 patterns, rejects autoincrement memrefs + since they are mode-dependent. + + Tue Jul 19 13:01:38 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * parse.y (check_newline): Handle #ident by writing .ident to output. + * cccp.c: Don't handle #ident; delete IDENT_DIRECTIVE conditionals. + + * stmt.c (expand_end_case): In compares, put constant arg second. + + * jump.c (jump_optimize): Delete conditional jump if followed by + an unconditional jump to the same place. + + Mon Jul 18 17:49:13 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * emit-rtl.c (init_emit_once): Now STRUCT_VALUE_INCOMING is an + expression for an rtx. It can make a MEM. Likewise STRUCT_VALUE + for outgoing structure value addresses. + + * stmt.c (assign_parms): If incoming struct addr on stack, leave room. + * expr.c (expand_call): If outgoing addr on stack, push it like an arg. + + * PROMOTE_PROTOTYPES means if proto says `char', pass `int'. + * decl.c (get_parm_info): Alter DECL_ARG_TYPE to do this. + * typecheck.c (actualparameterlist): Convert value for this. + * tm-m68k.h: Define PROMOTE_PROTOTYPES. + + Sun Jul 17 14:25:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * jump.c (jump_optimize): peephole can delete insns following INSN. + Set NEXT after peephole. + + * decl.c (finish_decl): Always restart perm alloc if global. + + * stmt.c (assign_parms): When a float is passed as double, store the + float in low-numbered word. Avoids trouble with parm_map in integrate. + + * vax.md: New pattern for decrement and compare against -1. + + Sat Jul 16 14:18:00 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * decl.c (pushdecl): Ignore previous decl if it's really an error_mark. + + * stmt.c (expand_start_case): Make sure case_stmt.start is a NOTE. + + * combine.c (subst): In the simplification for + (set (zero_extract ...) (and/or/xor (zero_extract ...) const)), + require same memory location in both extracts. + + * *386*: New files. + + * cse.c (fold_rtx): Save time in memory address if it didn't change. + Don't replace cheaper expression with coslier one. + (cse_insn): Reenable generation of REG_WAS_0. It wasn't obsolete. + + * cccp.c: `ident' has 5 letters. + + * final.c (output_source_line): SDB can't handle multiple source + files, so ignore line-NOTEs for other files. + + * hard-reg-set.h: New var reg_class_size (# regs in the class). + * regclass.c (init_reg_class): Set it up. + + * reload.c (find_reloads): If an earlyclobber is in a class of size 1 + as an output, reload it as input instead of as output. + + * reload1.c (choose_reload_targets): Improve elimimation of spilled + pseudos made dead by reloading: if pseudo is limited to one block + and that block contains just stores, delete all the stores. + + * reload1.c (choose_reload_targets): reg_has_output_reload is now + static and survives through reload pass. + (forget_old_reloads): Don't cancel data on spilled regs of output + reloads of the insn just made. + + * sdbout.c (sdbout_one_type): Go to .text before defining a type. + (sdbout_block): Test against do_block was backwards. + + * stmt.c (expand_end_function): New args to make a NOTE for last line. + * decl.c (finish_function): Pass the args. + + * rtl.c (no_labels_between): New function. + * vax.md (movsi): Call it. + + * print-tree.c (dump): Don't follow chain of a decl. + + * rtl.c (volatile_refs_p): Moved from flow.c. + + Fri Jul 15 13:36:20 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * sdbout.c (PUT_SDB...): Allow config to override any of them. + * sdbout.c (PUT_SDB_{BLOCK,FUNCTION}_{START,END}): New macros. + * tm-3b1.h: Override all of them. + * sdbout.c (SDB_GENERATE_FAKE): New macro to create dummy tag name. + (gen_fake_label): Use SDB_GENERATE_FAKE. + * tm-3b1.h: Override its defn. + + * sdbout.c (sdbout_mark_function_end): Unused; deleted. + + * tm-3b1.h: Define SDB_DEBUGGING_INFO. + + Thu Jul 14 01:55:15 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * config-sunv4.h: New file for Sunos version 4. + + * tm-sun3.h (CPP_SPEC): Define mc68010 or mc68020, depending. + + Tue Jul 12 15:31:30 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stmt.c (expand_fixup, expand_goto_internal): New functions to + emit a jump that can restore the stack level, even without tree node. + (expand_null_return, expand_exit_loop, etc.): Use expand_goto_internal. + (expand_end_function): Do fixup_gotos after emitting return_label. + + * cse.c (predecide_loop_entry): Avoid using JUMP_LABEL. + * flow.c (find_basic_blocks): Avoid using JUMP_LABEL. + + * flow.c (insn_dead_p): Delete special case for stack-adjust insns. + (life_analysis): Mark those insns with INSN_VOLATILE here. + (mark_used_regs): a SET of a hard reg, in a volatile insn, + always makes its source live. + + Mon Jul 11 10:46:26 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * ns32k.md (floatqidf2): Commented out since assemblers warn about it. + + Sun Jul 10 11:49:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * decl.c (xref_tag): Default the TYPE_MODE of enum xrefs + to avoid making MEM and REG with VOIDmode. + + * vax.md (call): If > 255 args, pop them explicitly. + + Sat Jul 9 10:53:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * symout.c (symout_types): Fix up forward refs to previously + undefined structure types. + (filter_undefined_types): New function. + (symout_finish, symout_function_end): Output any never-defined structs. + * toplev.c (rest_of_compilation): call symout_function_end. + + * parse.y: Don't declare errno if it's a macro. + + * tm-hp9k320 (FUNCTION_PROFILER): Pass ptr in a0, not d0. + + * typecheck.c (truthvalue_conversion): Flush unnec recursive call. + (build_cond_expr): Bug testing zeroness of IFEXP with TREE_LITERAL. + + * cse.c (fold_cc0): Constants not CONST_INT are certainly nonzero. + * fold-const.c (fold): ADDR_EXPR is not equal to zero. + + * cccp.c (macroexpand): Disable the macro even if traditional. + (rescan): Error if use a disabled macro. + + * combine.c (try_combine): Don't substitute a different reg into + an auto-increment. Handle multiple REG_INC notes in I1 or I2. + + * decl.c (implicitly_declare): Don't reuse old implicit decl. + + * varasm.c (assemble_variable): Avoid syntax err if no DBX and no SDB. + * final.c (output_source_line): likewise. + + * fold-const.c (fold): PLUS/MINUS_EXPR: in case of cancellation, + convert result to original type. + + * regclass.c (reg_class_record): Changed arguments include address + of entire vector of constraints. + + Fri Jul 8 07:59:00 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload1.c (reload): Find groups of more than 2 registers. + + Thu Jul 7 08:33:07 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (emit_push_insn): Typo adjusting arg for bcopy + if not STACK_GROWS_DOWNWARD. + + * gnulib.c (_cmpsf2): Value is int, not SFVALUE. + + Wed Jul 6 11:53:46 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tm-encore.h, tm-3b1.h: Replace ASM_FILE_START; output a .file. + + * *m88*: New files for Motorola 88000. They don't really work. + + Tue Jul 5 14:40:03 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * local-alloc.c (combine_regs): Don't tie a reg to itself. + + * finxincludes: Make a variable LIB for the target dir. + + * m68k.md (movhi, addhi3, addsi3): Micro-optimize choice of asm insns. + + * expr.c (expand_expr): Use new macros NO_DEFER_POP, OK_DEFER_POP + in several places, to keep stack predictable. + + Mon Jul 4 09:50:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * integrate.c (function_cannot_inline_p): Increase threshold size. + + * flags.h (use_gdb_dbx_extensions): New variable. + * toplev.c: + + * sdbout.c (PUT_SDB_TAG): Delete duplicate defn. + + * expr.c (expand_expr): For FIX_TRUNC_EXPR to unsigned short/char, + REALLY go via signed int. + + * loop.c (may_trap_p): Was detecting floating arithmetic incorrectly. + + * tm-news800.h (CPP_PREDEFINES): Add sony and sony_news. + + * parse.y (check_newline): Avoid infinite loop at eof. + + Sat Jul 2 10:35:17 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.24 released. + + * stmt.c (expand_asm_operands): Produce proper no-outputs insn. + * recog.c (asm_noperands): Detect no-outputs insns. + (decode_asm_operands): Likewise. + * reload.c (find_reloads): Likewise (add case ASM_OPERANDS:). + + * local-alloc.c (block_alloc): Tests of qty_compare were backwards. + + * flow.c (life_analysis): Turn off code that finds regs live at + function start and marks them not local to any basic block. + + * cse.c (insert_regs): Fix typo (UNITS_PER_WORD). + + * cccp.c: Define max. + + * expr.c (expand_expr): Put each SAVE_EXPR's reg on save_expr_regs, + if not optimizing. + * stmt.c (expand_function_end): Mark each of those regs live + at the end and also retroactively at the beginning of the function. + + * output-vax.c (print_operand_address): New function from old macro. + * tm-vax.h (PRINT_OPERAND_ADDRESS): Call that function. + + * config-vms.h: If not under GNU C, define X_OK, etc. + + * expr.c (move_by_pieces_1): Use * to call GENFUN. + (expand_expr): Compare DECL_FUNCTION_CODE against an enum const. + (preexpand_calls): Likewise. + * genrecog.c (write_tree): Likewise. + * final.c (final): Use * to call the output function. + * reload.c (push_reload): Rename `noshare' to `dont_share'. + + * genoutput.c (output_epilogue): Put more newlines in insn_outfun. + * genemit (gen_exp): Put in more newlines. + + Fri Jul 1 00:23:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * global-alloc.c (allocno_compare): Avoid comparisons of floats + since that is sensitive to roundoff errors. + + Thu Jun 30 09:25:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * sdbout.c (PUT_SDB_{DEF,TAG}): Use ASM_OUTPUT_LABELREF. + (PUT_SDB_PLAIN_DEF): New name for old defn of PUT_SDB_DEF + (sdbout_one_type): Use PUT_SDB_PLAIN_DEF for `.eos'. + + * tree.c (allocation_temporary_p): New fcn. + (all_types_permanent): New variable. + (make_node): If that's set, make each ...TYPE node permanent. + * decl.c (grokdeclarator): If traditional, make decl data permanent. + (finish_decl): Make the rtl permanent too. + * stor-layout.c (layout_type): If type is permanent, + make its layout data permanent too. + + * cccp.c: Choose C++ or C at run time via var `cplusplus'. + Separate cplusplus_include_default from include_default. + Get GNU-specific include directory names from macros + GCC_INCLUDE_DIR and GPLUSPLUS_INCLUDE_DIR. + (main): Initialize based on CPLUSPLUS; `-+' sets it. + * Makefile: Set *_INCLUDE_DIR based on $(libdir). + + Tue Jun 28 09:25:49 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * tree.c (copy_node): Round LENGTH up to multiple of sizeof (int). + + * expr.c (emit_push_insn): Avoid using PUSH_ROUNDING if not defined. + + * sparc.md (floatsisf2): Insert missing brace. + (mulsi3): Replace reg_o0_rtx, reg_o1_rtx. + + * tm-sparc.h: Define DBX_DEBUGGING_INFO. + + * parse.y (yylex): If traditional, no error for out-of-range float. + + * Makefile: Comment saying how to compile on an Apollo. + + * tm-sparc.h (ASM_FILE_START): Switch to new calling convention. + + * decl.c (init_decl_processing): Create type nodes for 64-bit ints. + (grokdeclarator): use them for `long long'. Warn only if pedantic. + + * optabs.c (init_optabs): Add missing DImode insn names. + + * expr.c (emit_block_move, emit_push_insn): Use movstrqi if appro. + + * expr.c (convert_move): use extendsidi if appropriate. + + * cccp.c (initialize_builtins): Don't install __STDC__ if traditional. + (main): Call initialize_builtins after option processing. + + * integrate.c (output_inline_function): Set current_function_decl. + + * cse.c (fold_rtx): Typo in avoiding 32-bit shifts. + + * cccp.c: Add forward-decl. + + Mon Jun 27 18:06:42 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * hard-reg-set.h (reg_alloc_order): New variable + based on REG_ALLOC_ORDER, a new machine-description macro. + * regclass.c (reg_alloc_order): Define it. + * local-alloc.c (find_free_reg): Handle reg_alloc_order. + * global-alloc.c (find_reg): Likewise. + * stupid.c (stupid_find_reg): Likewise. + + Sun Jun 26 10:47:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Version 1.23 released. + + * tm-3b1.h: Define IDENT_DIRECTIVE. + + * tm-encore.h: Define SDB_DEBUGGING_INFO. + Define SCCS_DIRECTIVE and IDENT_DIRECTIVE. + + * output-ns32k.c: Decl of paren_base_reg_printed must be outside fcns. + + * tm-encore.h (ASM_OUTPUT_DOUBLE): Do 0f, not 0l. + (CPP_PREDEFINES): No -Dns32032. + + * sdbout.c: Include syms.h, not storclass.h. + (unnamed_struct_member): Decl was missing. + (PUT_SDB_INT_VAL, PUT_SDB_VAL): Fix typos. + (sdbout_types, sdbout_one_type, sdbout_parms): Fix typos. + + * Makefile: Add file sdbout.o. + Changed comments pertaining to sysV. + Make a separate target `doc' to make the info files. + + * m68k.md (bit-field insns): Use nonimmediate_operand for the thing + to extract from. + * vax.md (QImode bit-field insns): Likewise. + + * recog.c (nonimmediate_operand): Accept any nonconst general operand. + + Sat Jun 25 07:54:42 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cse.c (lookup_as_function): arg to exp_equiv_p was missing. + + Fri Jun 24 09:14:47 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * recog.c (memory_operand): Allow (subreg (mem...)). + + Thu Jun 23 07:34:07 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * decl.c (finish_enum): Compute minimum value like maximum. + If minimum is negative, install it in the type and make it signed. + + * stor-layout.c (layout_record): STRUCTURE_SIZE_BOUNDARY is minimum. + (layout_type): A RECORD_TYPE or UNION_TYPE must be BLKmode if + any member is BLKmode. This is to prevent putting it in a register. + (layout_decl): If decl's type is BLKmode, the decl *must* be BLKmode. + + * local-alloc.c (find_free_reg): Never allocate the frame pointer reg. + + * tm-sequent.h (PRINT_OPERAND): Bug in SFmode CONST_DOUBLE. + * tm-encore.h: Likewise. + + * flow.c (flow_analysis): Bug in n_basic_blocks error check. + + * stmt.c (expand_asm_operands): Emit no insn if an arg is erroneous. + + Tue Jun 21 08:34:24 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload.c (find_reloads_address): Write back *loc even if + subst_reg_equivs makes no change, in case subst_index_address did. + + * flow.c: Define macros for -1 and -2 as values of reg_basic_block. + (mark_used_regs): Add an `else'; no change in behavior. + (mark_label_ref): Abort if LABEL_REF doesn't contain a CODE_LABEL. + (find_basic_blocks): Extra error check. + + * output-ns32k.c (print_operand_address): Changes in handling of + register-indirect, and of indexing by sb register. + + Mon Jun 20 04:55:38 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cccp.c (collect_definition): Compute needed space more accurately. + Abort if use more space than was allocated. + (rescan) [USE_C_ALLOCA]: Do alloca (0) after handle_directive. + + * genflags.c (gen_insn): Put parens around defns of HAVE_... macros. + + Sun Jun 19 02:52:53 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (emit_push_insn): Consider PARM_BOUNDARY when compensating + for size of a pushed arg to bcopy. + + Sat Jun 18 07:20:54 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * New files sparc.md, tm-sparc.h, config-sparc.h, output-sparc.c. + + * final.c (final): After an ADDR_{,DIFF_}VEC, do ASM_OUTPUT_CASE_END. + * tm-3b1.h: Define ASM_OUTPUT_CASE_END. + (PRINT_OPERAND_ADDRESS): Ref the case tables via an intermediate symbol + `LDnnn' whose def. is output by ASM_OUTPUT_CASE_END. + (ASM_OUTPUT_CASE_LABEL): Add missing newline. + + * reload.c (find_equiv_reg): Reject a MEM containing an autoincrement. + + Fri Jun 17 06:58:37 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * genpeep.c (main): Write `extern' in the decl for `peep_operand'. + + * flow.c (propagate_block): When a dead insn has a REG_RETVAL note, + call mark_set_regs anyway, so that `significant' is updated. + + * jump.c (follow_jumps): New arg IGNORE_LOOPS. If 0, don't follow + the insn at the beginning of a loop that enters the loop; this avoids + interference with loop optimizer. + (jump_optimize, tension_vector_labels): Pass that arg. + + * loop.c (loop_optimize): Mention invalid multiple-entry loops in log. + + * m68k.md (extv, extzv): Fix # of alternatives mismatch in constraints. + + Thu Jun 16 03:06:48 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * genrecog.c (change_state): Was mishandling printing XVECEXP indices + greater than 9. + + * combine.c (subst, simplify_and_const_int): Avoid making SUBREG + of a non-REG. + + * expr.c (expand_expr): For FIX_TRUNC_EXPR to unsigned short/char, + go via signed int. + + * optabs.c (expand_fix): Copy hard_libcall_value reg only once. + + * reload1.c (order_regs_for_reload): Init all elements + of potential_reload_regs to -1. + + * Prevent generation of (set (reg) (plus ... (label_ref ...))). + * explow.c (memory_address_noforce): Like `memory_address' but + never force it into a register. + * expr.c (do_tablejump): Use that. + * m68k.md (casesi): Use that. + + * rtl.h (struct rtx_def, GET_CODE, PUT_CODE): If SHORT_ENUM_BUG, + define the `code' field as a short. + + Wed Jun 15 01:25:57 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * gcc.c (CPP_SPEC): New spec set by config.h gives flags to cpp. + * tm-*.h for m68k: Define CPP_SPEC to define __HAVE_FPU__ on + appropriate conditions. + + * combine.c (subst): Simplify (not (minus x 1)) and (neg (minus x y)). + + Mon Jun 13 02:22:43 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * typecheck.c (build_array_ref): Avoid duplicate errmsg if index + is an error-mark. + + Sun Jun 12 23:04:39 1988 Richard Stallman (rms at corn-chex.ai.mit.edu) + + * cccp.c (handle_directive): If -traditional, quotes aren't special. + (rescan): Assume newline ends a string constant. + + * cccp.c, cexp.y: Make all fcns non-static; add some forward decls. + + * various: add static forward-decls for various functions. + + Fri Jun 10 00:25:18 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload1.c (choose_reload_targets): When writing back an incremented + value (handling reload_inc), write back to the real place, not to + OLDEQUIV (a register that holds the same value). + + * tm-m68k.h (LEGITIMIZE_ADDRESS): Don't give force_operand a target. + This can cause the use of multiple insns with same output reg, + which can confuse cse. + + * loop.c (consec_sets_invariant_p): + If invariant_p ever returns 2, we return 2. + New arg is # of consecutive sets to look for, + since this info is no longer in n_times_set at move_movables. + (scan_loop): If consec_sets_invariant_p returns 2, set m->cond. + (move_movables): check consecutive insns if m->consec && m->cond. + + * tm*.h: ASM_DECLARE_FUNCTION_NAME now takes 3rd arg, + the FUNCTION_DECL node. + * varasm.c (assemble_function): Pass this arg. + + * expr.c (expand_call, expand_builtin [alloca]): + If STACK_POINTER_OFFSET is defined, add it to stack pointer contents + before using it as address of actual data on the stack. + * stmt.c (expand_decl): Likewise. + + * stmt.c (assign_parms): If 1st parm named `__builtin_va_alist' + came in regs, pretend it came on stack. + Handle pretending a BLKmode var came on the stack. + If REG_PARM_STACK_SLOT, count stack space for each parm + even if the parm came in a register; and use that stack space + if the parm needs to be addressable or is BLKmode. + Rearrange to simplify conditionals. + + Thu Jun 9 01:21:29 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * local-alloc.c: + `qty_...' vectors' elements for hard-reg-numbers now aren't used. + `reg_qty' elements for hard-reg numbers now aren't used, + and the element for a pseudo is never a hard-reg number. + (local_alloc): No need to reset those elements. + No need to reset elements out of range of prev block's NEXT_QTY. + (reg_is_born, reg_is_set, wipe_dead_reg): + Divide labor in same way for hard regs and pseudos; + simplify using fact that locality-to-basic-block has been precomputed + and recorded in reg_qty; avoid refs to reg_qty[HARDREG]. + (reg_is_born, wipe_dead_regs): Block-number arg no longer needed. + + * local-alloc.c (combine_regs): Remove old code for tying hard regs + to pseudos; great simplification results. + Use find_regno_note, not regno_dead_p. + + Wed Jun 8 00:18:04 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * reload.c (subst_reg_equivs): Set a flag if anything is changed. + (find_reloads_address): Check that flag to avoid extra work. + Also check early for safe reg+const address and avoid work. + + * reload.c (find_reloads): Use loops instead of bcopy. + Check early for insn with no real constraints, and return. + Also check for move from hard reg to hard reg and return. + + * cse.c (canon_reg): Rewrite for speed; use a switch. + (cse_insn): Don't call find_reg_note if REG_NOTES is 0. + + * cse.c (cse_insn): Store modified SET_SRC even if there's a REG_EQUIV. + Inhibition was needed when the SET_SRC was the only place to find the + equivalent value; now it is in the REG_EQUIV note. + + * stmt.c (expand_asm_operands): If NINPUTS is 0, make vec of no elts. + * regclass.c (reg_scan_mark_refs): Don't lose if XVEC (x,i) is 0. + + Tue Jun 7 03:51:28 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * stmt.c (assign_stack_local): If big-endian and MODE is narrow, + the bytes actually used are the least significant. + + * parse.y (skip_white_space): Accept char as arg; let caller read it. + (yylex): Change call. + (check_newline): Return 1st nonwhite char after skipping lines. + (skip_white_space): Change call. + * toplev.c (compile_file): Change call. + + * gcc.c: Pass -traditional to cc1. + + * cse.c (cse_insn): Return very early for (set (reg) (call...)). + Mainly to save time. + (cse-insn) Old code to add REG_WAS_0 note wasted time but did nothing. + + * expr.c (clear_pending_stack_adjust): Really do clear it, + if current fcn doesn't want to be inline. + + * cse.c (cse_insn): Speedup: instead of safe_hash, use canon_hash + or HASHREG. + + Mon Jun 6 21:47:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * jump.c (rtx_renumbered_equal_p): Reject ADDR_VEC fast. + + * cse.c (cse_insn): Ignore a REG_EQUIV or REG_EQUAL note if the + equivalent value is the same as the SET_SRC of the insn. + + * flow.c (life_analysis): Don't call volatile_refs_p for a CALL_INSN; + just assume value is 1. + (propagate_block): Don't call mark_{used,set}_regs for a stack-pop + since if it isn't dead it has no effect on any useful life data. + (mark_set_1): Return quickly if setting stack-ptr, and almost as + quickly if setting any hard reg. + (mark_used_regs): Likewise for refs. + Also don't scan the vector of an ADDR_VEC or ADDR_DIFF_VEC. + (volatile_refs_p): Likewise. + + * varasm.c (output_constant): Discard NOP_EXPR and CONVERT_EXPR + in integer case (they were for casting a pointer). + + * parse.y (compstmt_or_error): Parse a compstmt after ignoring error. + Use this for fctn body so that an error after store_parm_decls + won't recover to xdecls and call store_parm_decls again. + Typical cause was missing semi at end of last parmdecl. + + * parse.y: Add missing semicolons in actions. + (yylex): Don't use yylloc. + + Sun Jun 5 16:14:40 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * typecheck.c (build_array_ref): Check arg types here, to make + error message more accurate (not about "addition"). + + Thu Jun 2 02:41:40 1988 Richard Stallman (rms at rice-krispies.ai.mit.edu) + + * cccp.c (collect_expansion): `#' isn't special if -traditional. + + * dbxout.c (dbxout_parms): Don't output a regparm symbol + unless the parm got a hard reg assigned. + + * tm-encore.h (ASM_OUTPUT_DOUBLE): Use 0f... not 0d... + + * tm-vax.h (CHECK_FLOAT_VALUE): Define this. + + Wed Jun 1 17:13:00 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expr.c (expand_call): Have sequence points between args. + + Tue May 31 00:27:06 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * expmed.c (store_fixed_bit_field): Avoid shifting by 32. + * cse.c (fold_rtx): + * symout.c (subrange_p): likewise. + + * local-alloc.c (block_alloc): If operands 1 and 2 commute, + try tying output to operand 2 if operand 1 won't do. + + * toplev.c (compile_file): Pass main_input_file to symout_init. + + * tree.c (build_real, build_real_from_int_cst): + Call CHECK_FLOAT_VALUE if it's defined, to report out-of-range values. + + * tree.c (build_real, build_real_from_int_cst): New 1st arg TYPE. + * parse.y (yylex): Pass this arg; requires parsing suffixes first. + * fold-const.c (fold, combine, fold_convert): Pass this arg. + Handling of float binops in `combine' simplified. + + * tm-encore.h (CPP_PREDEFINES): Remove -Dencore since CC lacks it. + + * final.c (output_source_line): Let ASM_OUTPUT_SOURCE_LINE + be used for SDB also. + + Mon May 30 00:21:15 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * cse.c (insert): Was inserting in wrong place in list. + (exp_equiv_p): Was failing to check validity when x == y. + + * tree.c (build_pointer_type): Handle saveable_obstack + like current_obstack. + + * decl.c (finish_decl): Error in test for zero-size array warning. + + * reload.c (find_equiv_reg): New arg MODE specifies mode in which + an equivalent value is needed. Equivalence must be good in that mode. + In addition, notice overlap with multiword register modes. + Simplify, knowing that registers have already been renumbered. + It was invalidating memory-goals too easily; setting a reg + only invalidates memory-goal if its address varies. + * reload.c, reload1.c, jump.c: Calls pass the new argument. + + * cccp.c: For correct ANSI, must reject `$' in identifiers. + (dollars_in_ident): Variable says whether to allow them. + (rescan): Handle `$' as randomchar if that's 0. + (main): dollars_in_ident is set to 0 by -$, to 1 by -traditional. + (rescan, do_define): Delete former pedantic warnings for `$'. + (initialize_char_syntax, initialize_builtins): Inits split to two + functions; former is called after options are scanned + so `$' is in is_idchar conditionally. + * gcc.c: For -ansi, pass -$ to cccp. + * toplev.c, flags.h: Define dollars_in_ident. + * parse.y (yylex): Treat $ as punctuation unless dollars_in_ident. + Delete old pedantic warning about $. + * tm-vms.h: Define DOLLARS_IN_IDENTIFIERS as 1. + + * cccp.c (rescan): Preprocessing numbers can have signs, after `e'. + + * integrate.c (expand_inline_function): Abort, don't return failure, + if max_regno is too low. I believe this can't happen. + + * typecheck.c (build_binary_op_nodefault): + For ordered comparisons, no pedantic warning about void *. + For MAX, MIN, ditto, and also don't allow pointer vs 0. + + * typecheck.c (build_unary_op): Don't allow pointer for +. + + * typecheck.c (convert_for_assignment): + Add missing warning for case of unrelated pointer types. + Change criteria for new ANSI C draft. + + * optabs.c (expand_binop): Don't set unused target_is_not_an_operand. + + * fold-const.c (fold_convert): Don't set unused inprec, outprec. + + * emit-rtl.c, parse.y: Delete unused var. + + * stor-layout.c (add_vc_sizes): Unused function deleted. + * loop.c (constant_high_bytes): #if 0 this unused function. + + * gcc.c (fatal): Add missing arg to delete_temp_files. + + * cccp.c (dump_defn_1): Add missing arg to skip_quoted_string. + + * reload.c (find_reloads): If constraints don't fit in an `asm', + print error instead of aborting. + + * regclass.c (reg_class_record): Ignore `&' in constraint. + + Sun May 29 00:20:23 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * Makefile: Run ranlib only if /usr/bin/ranlib exists. + Add comment saying what to do on system V. + + * tree.c (suspend_momentary): Switch to the saveable_obstack + for the sake of inline functions. + + * flags.h (enum debugger): New enum for write_symbols. + * toplev.c, varasm.c, final.c: Use the enum constants where appro. + Add calls to sdbout paralleling the calls to dbxout; + put each in the appropriate conditional {SDB,DBX}_DEBUGGING_INFO. + + * toplev.c (main): Delete -noreg option; it's now the default. + Make -O an alias for -opt. Rename -g to -gg. -g is alias for -G. + Accept and ignore -Wtrigraphs. + * gcc.c: Simplify the specs. + + * toplev.c (compile_file), tm-*.h: + ASM_FILE_START is now a statement, not just a string to be output. + Output it *after* determining the real source file name. + + * fold-const.c (fold): Simplify x >= CST to x > CST-1 (CST positive). + To simplify this, canonicalize relationals to put constat last. + + * decl.c (duplicate_decls): Make a 2nd errmsg to show previous decl. + + * cccp.c (file_size_and_mode): Delete temporary VMS bootstrap patch. + + * tm-att386.h: New file. + + * decl.c (pushdecl): Warn if a local `extern' decl precedes + a file-scope `static' decl. + + * expr.c (expand_call): No warning for failure to inline. + + * expmed.c (extract_bit_field): copy operand 1 of extv or extzv + into register if memory isn't allowed. + + Sat May 28 02:10:56 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu) + + * gnulib.c, Makefile: Delete va_end. + + * final.c, symout.c: Check DBX_DEBUGGING_INFO, not NO_DBX_FORMAT. + + * genemit.c (gen_expand): Notice a CALL inside a PARALLEL. + + * regclass.c (init_reg_sets_1): Part of init_reg_set is put in this + new fn which is called after options are scanned. + Now CONDITIONAL_REGISTER_USAGE can depend on the options. + (fix_register): Just alter the data that init_reg_sets_1 will look at. + + * reload1.c (reload): Don't complain if two different but tieable + modes require groups of the same regclass (assuming same size group). + + * cccp.c: Add 3rd arg to all `open' calls. + + * parse.y (check_newline): Typo prevented ignoring whitespace. + + * cccp.c (perror_with_name): fprintf had harmful extra arg. + + * cccp.c (main, trigraph_pcp): -Wtrigraphs means warn if any trigraphs. + + * emit-rtl.c (gen_sequence): If LEN is 1, avoid looking at PATTERN + of something that doesn't have one. + + * reload1.c (alter_frame_pointer_addresses): frame pointer can + occur by itself, not just inside a PLUS. + (reload): Call eliminate_frame_pointer before reload_as_needed. + Otherwise the latter can make reload insns that copy the frame ptr + to a data reg, but 68k can't copy sp+const to a data reg. + + * decl.c (implicitly_declare): Always save the implicit decl + permanently. Reuse an old one if it exists. + * tree.c (resume_temporary_allocation): Used after `end_temporary...' + to go back to temporary allocation. + + * stor-layout (layout_{type,decl}): Call variable_size. + (variable_size): Turn a size into a SAVE_EXPR and either compute + it right away or put it on a list to be computed later. + (get_pending_sizes): Return that list and clear it out. + * stmt.c (expand_start_function): Tell `variable_size' to compute + sizes right away, and compute those saved on the list. + (expand_end_function): Tell it to put them on a list. + + Fri May 27 00:02:34 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * dbxout.c (dbxout_symbol): For local static var, use 'V', not 'v'. + + * gcc.c (main): Don't handle SIGHUP or SIGTERM if shell ignored it. + + * Makefile, gcc.c: Propagate Make var `libdir' to gcc search path. + + * expr.c (expand_expr): a PARM_DECL with no rtl can occur in size of + `a' in `foo (a,i) int i; struct {int x[i];} a;', so report an error. + + * flow.c (insn_dead_p): insn that makes stack bigger is never dead. + * combine.c (try_combine): Don't splice out stores into stack ptr. + + * reload.c (find_equiv_reg): Test given regno for OVERLAPPING_REGNO_P. + + * varasm.c (assemble_variable): Use saveable_obstack for allocation. + + Thu May 26 01:17:00 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * integrate.c (save_for_inline): Clear unused slots in parmdecl_map. + (There may be some non-parm regs below max_parm_regno.) + * integrate.c (copy_for_inline): Don't crash if parmdecl_map elt is 0. + + * Don't fail to output a static inline function that was referenced + via a local extern decl before its definition. + * expr.c (expand_call): If need to mark a fcn decl addressable, + mark the identifier addressable also. + * typecheck.c (mark_addressable): If marking fcn addressable, + mark the identifier as well. + * decl.c (start_function): If identifier was marked addressable, + propagate it to the function. + + * parse.y (yylex): Check for ERANGE after atof is called. + (Sun doesn't report ERANGE.) + + * loop.c (may_trap_p): Any floating arithmetic may trap. + + Wed May 25 00:03:34 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * parse.y: Delete `noalias'. + (asm_operand): Don't allow this to be empty. + (asm_operands): Do allow this to be empty. + + * reload.c (operands_match_p): Don't let REG and SUBREG match + if the reg isn't a hard reg. + No longer nec. to check reg_renumber, now that reload + substitutes the hard regno. + + * reload1.c (reload): Counting existing spilled groups, + check HARD_REGNO_MODE_OK so we don't get fooled by an odd-even pair. + Spill entire need for new groups before spilling any solitary regs. + Reg already counted against max_nongroups can't become part of a group. + (new_spill_reg): Do bookkeeping associated with a new spill-reg. + (n_spills): This var is now static, no longer passed as arg + within the file. + + (reload_reg_class_lower): Handle all group-reloads before solitaries. + (choose_reload_targets): therefore #if 0 the special code for + finding solitary registers that aren't suitable for groups. + But fix two bugs in it: braino deciding whether a reload + is looking for 1 register (not a group). Use CLASS_MAX_NREGS. + Also braino deciding whether a spill reg can be in a group. + Did not fix bug that it fails to test HARD_REGNO_MODE_OK, + so it might split up an even-odd pair. + + * vax.md: Special patterns for 8 and 16-bit fields, to make + move-insns (like the ones for the 68k). + + * tree.c (convert_to_integer): Pass truncation down thru COND_EXPR + as through a binary operator. + + * typecheck.c (build_cond_expr): If unpromoted operand types match, + don't promote them--let containing expression promote (just once). + + Tue May 24 14:46:26 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) + + * combine.c (subst): Simplify (subreg (sign_extend X) 0). + + * tm-hp9k320.h: Delete NO_DBX_FORMAT. + * Most tm...h files: Define DBX_DEBUGGING_INFO. + * dbxout.c: Change conditional to DBX_DEBUGGING_INFO. + + * integrate.c (expand_inline_function): If inline fcn was declared to + return QI, but actually computes an SI, use SImode for INLINE_TARGET + but actually return a QI. + + * varasm.c (force_const_mem): Failed to determine alignment bdry + from machine mode. + + * jump.c (jump_optimize): Don't delete (move X Y) if X or Y is a + PRESERVE_DEATH_INFO_REGNO_P register. + + * final.c (output_addr_const): In PLUS, output constant term last. + + * final.c (final): Before outputting an insn, do FINAL_PRESCAN_INSN. + + * final.c (next_block_index): No longer static. + (final): Add SDB_DEBUGGING_INFO cases for outputing NOTEs + for beginning and end of a block. + (output_source_line): Add SDB_DEBUGGING_INFO case for line number. + * varasm.c (assemble_function): Add code for SDB symbol output. + + * gnulib.c: Allow config to override INTIFY. + New macro SFVALUE for data type to return a single-float in. + + * combine.c (remove_death): No longer `static'. + + * reload1. (choose_reload_targets): PRESERVE_DEATH_INFO_REGNO_P + selects hard regs for which death info should be updated for final. + + * reload1.c (reload_as_needed): Let INSN_CLOBBERS_REGNO_P + prevent inheritance of certain reloads. + + * reload.c (find_equiv_reg): Let OVERLAPPING_REGNO_P reject + an equiv reg. Needed for funny float regs on 80387. + + * cccp.c (do_ident): Define #ident as a no-op if IDENT_DIRECTIVE. + Warn if pedantic. + (do_sccs): Warn if pedantic. + + * emit-rtl.c (restore_reg_data): Set cur_insn_uid--prevent duplicates. + Sun May 22 12:25:06 1988 Richard Stallman (rms at frosted-flakes.ai.mit.edu) diff -rc2N gcc-1.34/PROJECTS gcc-1.35/PROJECTS *** gcc-1.34/PROJECTS Tue Feb 21 04:08:49 1989 --- gcc-1.35/PROJECTS Tue Apr 18 13:32:13 1989 *************** *** 1,2 **** --- 1,9 ---- + 0. Improved efficiency. + + * Parse and output array initializers an element at a time, freeing + storage after each, instead of parsing the whole initializer first and + then outputting. This would reduce memory usage for large + initializers. + 1. Better optimization. *************** *** 170,173 **** --- 177,187 ---- still be able to allocate a junk register? + * For the 80387 floating point, perhaps it would be possible to use 3 + or 4 registers in the stack to hold register variables. (It would be + necessary to keep track of how those slots move in the stack as other + pushes and pops are done.) This is probably very tricky, but if + you are a GCC wizard and you care about the speed of floating point on + an 80386, you might want to work on it. + 2. Simpler porting. *************** *** 279,296 **** JNC@lcs.mit.edu has some ideas on this subject also. ! 6. Other possibly nice features. ! ! * cpp could have a #provide directive. ! #provide would have the same syntax as #include, ! and it would nullify any future #include directive ! with the same argument. Thus, the file foo.h ! could contain #provide <foo> to prevent itself from ! being included twice. ! ! This is much cleaner than the alternative sometimes implemented, ! which is to require the user to use something other than #include ! in order to ensure inclusion only once. ! ! 7. Better documentation of how GCC works and how to port it. Here is an outline proposed by Allan Adler. --- 293,297 ---- JNC@lcs.mit.edu has some ideas on this subject also. ! 6. Better documentation of how GCC works and how to port it. Here is an outline proposed by Allan Adler. diff -rc2N gcc-1.34/README gcc-1.35/README *** gcc-1.34/README Fri Feb 24 10:57:28 1989 --- gcc-1.35/README Wed Apr 26 14:40:21 1989 *************** *** 1,3 **** ! This directory contains the version 1.34 test release of the GNU C compiler. All bugs reported for previous test releases have been fixed. Some bugs surely remain. --- 1,3 ---- ! This directory contains the version 1.35 test release of the GNU C compiler. All bugs reported for previous test releases have been fixed. Some bugs surely remain. diff -rc2N gcc-1.34/X11.README gcc-1.35/X11.README *** gcc-1.34/X11.README Wed Dec 31 19:00:00 1969 --- gcc-1.35/X11.README Mon Mar 13 20:00:46 1989 *************** *** 0 **** --- 1,108 ---- + Our setup: + + Sun 3/60 with cgfour + SunOS 4.0 (plus what Sun calls their "general hygiene" patch tape) + XV11R3 + MIT fixes 1 through 8 + "Purdue enhancements" + one local + "ANSIfication" fix (previously reported to MIT, + and attached below) + + I installed gcc 1.34 (plus the expr.c fix) and also ran the "fixincludes" + script. + + I built the X stuff with with the "CC" line in the "Sun.macros" file set to: + + CC = gcc -fcombine-regs -fstrength-reduce -finline-functions -fpcc-struct-return -DPURDUE -Dinline=INLINE -DNOSTDHDRS + + where -fcombine-regs, -fstrength-reduce, and -finline-functions specify desired + optimizations, -fpcc-struct-return makes things compatible with the dbm library, + -DPURDUE buys the Purdue speedups, -Dinline=INLINE avoids a problem with a + variable named "inline" in the X file "fonts/bdftosnf/fontutil.c", and + -DNOSTDHDRS avoids a problem with multiple (and conflicting) typedef'ing of + "size_t" in the gcc-provided STDDEF_H and Sun's "sys/types.h". + + The ANSIfication fix: + + > From ado Mon Dec 26 10:55:28 1988 + > To: xbugs@expo.lcs.mit.edu + > Subject: Xlibint and __STDC__ don't mix + > + > + > X Window System Bug Report + > xbugs@expo.lcs.mit.edu + > + > + > + > + > VERSION: + > R3 + > + > CLIENT MACHINE and OPERATING SYSTEM: + > Sun 3/60 running SunOS 4.0 + > + > DISPLAY: + > Sun CG4 + > + > WINDOW MANAGER: + > uwm + > + > AREA: + > Xlib + > + > SYNOPSIS: + > Xlibint.h and __STDC__ don't mix + > + > DESCRIPTION: + > If __STDC__ is defined (and UNIXCPP is not defined), + > code that uses the GetReqExtra macro defined in Xlibint.h + > is uncompilable. + > + > REPEAT BY: + > Script started on Mon Dec 26 10:52:58 1988 + > elsie$ cd lib/X + > elsie$ rm Xbackgnd.o + > rm: Xbackgnd.o: No such file or directory + > elsie$ rm XBackgnd.o + > elsie$ make XBackgnd.o CC=/usr/local/bin/gcc + > rm -f XBackgnd.o + > /usr/local/bin/gcc -c -O -I. -I../../. -I../.././X11 -DTCPCONN -DUNIXCONN XBackgnd.c + > XBackgnd.c: In function XSetWindowBackground: + > XBackgnd.c:16: undeclared variable `sz_' (first use here) + > *** Error code 1 + > make: Fatal error: Command failed for target `XBackgnd.o' + > elsie$ exit + > + > script done on Mon Dec 26 10:53:51 1988 + > + > SAMPLE FIX: + > *** 1.1/Xlibint.h Mon Dec 26 10:39:37 1988 + > --- 1.2/Xlibint.h Mon Dec 26 10:39:37 1988 + > *************** + > *** 122,133 **** + > #if defined(__STDC__) && !defined(UNIXCPP) + > #define GetReqExtra(name, n, req) \ + > WORD64ALIGN\ + > ! if ((dpy->bufptr + SIZEOF(*req) + n) > dpy->bufmax)\ + > _XFlush(dpy);\ + > req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ + > req->reqType = X_##name;\ + > ! req->length = (SIZEOF(*req) + n)>>2;\ + > ! dpy->bufptr += SIZEOF(*req) + n;\ + > dpy->request++ + > #else + > #define GetReqExtra(name, n, req) \ + > --- 122,133 ---- + > #if defined(__STDC__) && !defined(UNIXCPP) + > #define GetReqExtra(name, n, req) \ + > WORD64ALIGN\ + > ! if ((dpy->bufptr + SIZEOF(x##name##Req) + n) > dpy->bufmax)\ + > _XFlush(dpy);\ + > req = (x##name##Req *)(dpy->last_req = dpy->bufptr);\ + > req->reqType = X_##name;\ + > ! req->length = (SIZEOF(x##name##Req) + n)>>2;\ + > ! dpy->bufptr += SIZEOF(x##name##Req) + n;\ + > dpy->request++ + > #else + > #define GetReqExtra(name, n, req) \ + > -- + > Arthur David Olson ado@ncifcrf.gov ADO is a trademark of Ampex. + diff -rc2N gcc-1.34/alloca.c gcc-1.35/alloca.c *** gcc-1.34/alloca.c Wed Dec 31 19:00:00 1969 --- gcc-1.35/alloca.c Thu Oct 16 21:46:31 1986 *************** *** 0 **** --- 1,191 ---- + /* + alloca -- (mostly) portable public-domain implementation -- D A Gwyn + + last edit: 86/05/30 rms + include config.h, since on VMS it renames some symbols. + Use xmalloc instead of malloc. + + This implementation of the PWB library alloca() function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + + It should work under any C implementation that uses an + actual procedure stack (as opposed to a linked list of + frames). There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca()-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. + */ + #ifndef lint + static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */ + #endif + + #ifdef emacs + #include "config.h" + #ifdef static + /* actually, only want this if static is defined as "" + -- this is for usg, in which emacs must undefine static + in order to make unexec workable + */ + #ifndef STACK_DIRECTION + you + lose + -- must know STACK_DIRECTION at compile-time + #endif /* STACK_DIRECTION undefined */ + #endif static + #endif emacs + + #ifdef X3J11 + typedef void *pointer; /* generic pointer type */ + #else + typedef char *pointer; /* generic pointer type */ + #endif + + #define NULL 0 /* null pointer constant */ + + extern void free(); + extern pointer xmalloc(); + + /* + Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. + + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ + + #ifndef STACK_DIRECTION + #define STACK_DIRECTION 0 /* direction unknown */ + #endif + + #if STACK_DIRECTION != 0 + + #define STACK_DIR STACK_DIRECTION /* known at compile-time */ + + #else /* STACK_DIRECTION == 0; need run-time code */ + + static int stack_dir; /* 1 or -1 once known */ + #define STACK_DIR stack_dir + + static void + find_stack_direction (/* void */) + { + static char *addr = NULL; /* address of first + `dummy', once known */ + auto char dummy; /* to get stack address */ + + if (addr == NULL) + { /* initial entry */ + addr = &dummy; + + find_stack_direction (); /* recurse once */ + } + else /* second entry */ + if (&dummy > addr) + stack_dir = 1; /* stack grew upward */ + else + stack_dir = -1; /* stack grew downward */ + } + + #endif /* STACK_DIRECTION == 0 */ + + /* + An "alloca header" is used to: + (a) chain together all alloca()ed blocks; + (b) keep track of stack depth. + + It is very important that sizeof(header) agree with malloc() + alignment chunk size. The following default should work okay. + */ + + #ifndef ALIGN_SIZE + #define ALIGN_SIZE sizeof(double) + #endif + + typedef union hdr + { + char align[ALIGN_SIZE]; /* to force sizeof(header) */ + struct + { + union hdr *next; /* for chaining headers */ + char *deep; /* for stack depth measure */ + } h; + } header; + + /* + alloca( size ) returns a pointer to at least `size' bytes of + storage which will be automatically reclaimed upon exit from + the procedure that called alloca(). Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. + */ + + static header *last_alloca_header = NULL; /* -> last alloca header */ + + pointer + alloca (size) /* returns pointer to storage */ + unsigned size; /* # bytes to allocate */ + { + auto char probe; /* probes stack depth: */ + register char *depth = &probe; + + #if STACK_DIRECTION == 0 + if (STACK_DIR == 0) /* unknown growth direction */ + find_stack_direction (); + #endif + + /* Reclaim garbage, defined as all alloca()ed storage that + was allocated from deeper in the stack than currently. */ + + { + register header *hp; /* traverses linked list */ + + for (hp = last_alloca_header; hp != NULL;) + if (STACK_DIR > 0 && hp->h.deep > depth + || STACK_DIR < 0 && hp->h.deep < depth) + { + register header *np = hp->h.next; + + free ((pointer) hp); /* collect garbage */ + + hp = np; /* -> next header */ + } + else + break; /* rest are not deeper */ + + last_alloca_header = hp; /* -> last valid storage */ + } + + if (size == 0) + return NULL; /* no allocation required */ + + /* Allocate combined header + user data storage. */ + + { + register pointer new = xmalloc (sizeof (header) + size); + /* address of header */ + + ((header *)new)->h.next = last_alloca_header; + ((header *)new)->h.deep = depth; + + last_alloca_header = (header *)new; + + /* User storage begins just after header. */ + + return (pointer)((char *)new + sizeof(header)); + } + } + diff -rc2N gcc-1.34/c-convert.c gcc-1.35/c-convert.c *** gcc-1.34/c-convert.c Wed Feb 22 11:50:26 1989 --- gcc-1.35/c-convert.c Tue Apr 11 13:43:45 1989 *************** *** 220,224 **** build_binary_op_nodefault (ex_form, convert (typex, arg0), ! convert (typex, arg1))); } } --- 220,225 ---- build_binary_op_nodefault (ex_form, convert (typex, arg0), ! convert (typex, arg1), ! ex_form)); } } diff -rc2N gcc-1.34/c-decl.c gcc-1.35/c-decl.c *** gcc-1.34/c-decl.c Wed Feb 22 11:50:25 1989 --- gcc-1.35/c-decl.c Wed Apr 26 02:44:58 1989 *************** *** 219,222 **** --- 219,231 ---- int warn_cast_qual; + /* Nonzero means warn about sizeof(function) or addition/subtraction + of function pointers. */ + + int warn_pointer_arith; + + /* Nonzero means warn for all old-style non-prototype function decls. */ + + int warn_strict_prototypes; + /* Nonzero means `$' can be in an identifier. See cccp.c for reasons why this breaks some obscure ANSI C programs. */ *************** *** 266,271 **** --- 275,286 ---- else if (!strcmp (p, "-Wcast-qual")) warn_cast_qual = 1; + else if (!strcmp (p, "-Wpointer-arith")) + warn_pointer_arith = 1; + else if (!strcmp (p, "-Wstrict-prototypes")) + warn_strict_prototypes = 1; else if (!strcmp (p, "-Wcomment")) ; /* cpp handles this one. */ + else if (!strcmp (p, "-Wcomments")) + ; /* cpp handles this one. */ else if (!strcmp (p, "-Wtrigraphs")) ; /* cpp handles this one. */ *************** *** 276,279 **** --- 291,295 ---- warn_return_type = 1; warn_unused = 1; + warn_switch = 1; } else *************** *** 533,536 **** --- 549,555 ---- define_label (input_filename, 1, DECL_NAME (TREE_VALUE (link))); } + else if (warn_unused && !TREE_USED (TREE_VALUE (link))) + warning_with_decl (TREE_VALUE (link), + "label `%s' defined but not used"); IDENTIFIER_LABEL_VALUE (DECL_NAME (TREE_VALUE (link))) = 0; } *************** *** 597,655 **** } \f ! /* Handle when a new declaration NEW has the same name as an old one OLD ! in the same binding contour. Prints an error message if appropriate. ! If safely possible, alter OLD to look like NEW, and return 1. Otherwise, return 0. */ static int ! duplicate_decls (new, old) ! register tree new, old; { ! int types_match = comptypes (TREE_TYPE (new), TREE_TYPE (old)); /* If this decl has linkage, and the old one does too, maybe no error. */ ! if (TREE_CODE (old) != TREE_CODE (new)) { ! error_with_decl (new, "`%s' redeclared as different kind of symbol"); ! error_with_decl (old, "previous declaration of `%s'"); } else { ! if (flag_traditional && TREE_CODE (new) == FUNCTION_DECL ! && IDENTIFIER_IMPLICIT_DECL (DECL_NAME (new)) == old) /* If -traditional, avoid error for redeclaring fcn after implicit decl. */ ; ! else if (TREE_CODE (old) == FUNCTION_DECL ! && DECL_FUNCTION_CODE (old) != NOT_BUILT_IN) ! warning_with_decl (new, "built-in function `%s' redeclared"); ! else if (TREE_CODE (old) == FUNCTION_DECL ! && DECL_INITIAL (old) != 0 ! && TYPE_ARG_TYPES (TREE_TYPE (old)) == 0 ! && TYPE_ARG_TYPES (TREE_TYPE (new)) != 0) ! { ! /* Prototype decl follows defn w/o prototype. */ ! warning_with_decl (new, "prototype for `%s'"); ! warning_with_decl (old, "follows non-prototype definition here"); ! } else if (!types_match) { ! error_with_decl (new, "conflicting types for `%s'"); /* Check for function type mismatch involving an empty arglist vs a nonempty one. */ ! if (TREE_CODE (old) == FUNCTION_DECL ! && comptypes (TREE_TYPE (TREE_TYPE (old)), ! TREE_TYPE (TREE_TYPE (new))) ! && ((TYPE_ARG_TYPES (TREE_TYPE (old)) == 0 ! && DECL_INITIAL (old) == 0) || ! (TYPE_ARG_TYPES (TREE_TYPE (new)) == 0 ! && DECL_INITIAL (new) == 0))) { /* Classify the problem further. */ ! register tree t = TYPE_ARG_TYPES (TREE_TYPE (old)); if (t == 0) ! t = TYPE_ARG_TYPES (TREE_TYPE (new)); for (; t; t = TREE_CHAIN (t)) { --- 616,667 ---- } \f ! /* Handle when a new declaration NEWDECL ! has the same name as an old one OLDDECL ! in the same binding contour. ! Prints an error message if appropriate. ! If safely possible, alter OLDDECL to look like NEWDECL, and return 1. Otherwise, return 0. */ static int ! duplicate_decls (newdecl, olddecl) ! register tree newdecl, olddecl; { ! int types_match = comptypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl)); /* If this decl has linkage, and the old one does too, maybe no error. */ ! if (TREE_CODE (olddecl) != TREE_CODE (newdecl)) { ! error_with_decl (newdecl, "`%s' redeclared as different kind of symbol"); ! error_with_decl (olddecl, "previous declaration of `%s'"); } else { ! if (flag_traditional && TREE_CODE (newdecl) == FUNCTION_DECL ! && IDENTIFIER_IMPLICIT_DECL (DECL_NAME (newdecl)) == olddecl) /* If -traditional, avoid error for redeclaring fcn after implicit decl. */ ; ! else if (TREE_CODE (olddecl) == FUNCTION_DECL ! && DECL_FUNCTION_CODE (olddecl) != NOT_BUILT_IN) ! warning_with_decl (newdecl, "built-in function `%s' redeclared"); else if (!types_match) { ! error_with_decl (newdecl, "conflicting types for `%s'"); /* Check for function type mismatch involving an empty arglist vs a nonempty one. */ ! if (TREE_CODE (olddecl) == FUNCTION_DECL ! && comptypes (TREE_TYPE (TREE_TYPE (olddecl)), ! TREE_TYPE (TREE_TYPE (newdecl))) ! && ((TYPE_ARG_TYPES (TREE_TYPE (olddecl)) == 0 ! && DECL_INITIAL (olddecl) == 0) || ! (TYPE_ARG_TYPES (TREE_TYPE (newdecl)) == 0 ! && DECL_INITIAL (newdecl) == 0))) { /* Classify the problem further. */ ! register tree t = TYPE_ARG_TYPES (TREE_TYPE (olddecl)); if (t == 0) ! t = TYPE_ARG_TYPES (TREE_TYPE (newdecl)); for (; t; t = TREE_CHAIN (t)) { *************** *** 665,669 **** if (type == float_type_node || (TREE_CODE (type) == INTEGER_TYPE ! && TYPE_PRECISION (type) < TYPE_PRECISION (integer_type_node))) { error ("An argument type that has a default promotion"); --- 677,682 ---- if (type == float_type_node || (TREE_CODE (type) == INTEGER_TYPE ! && (TYPE_PRECISION (type) ! < TYPE_PRECISION (integer_type_node)))) { error ("An argument type that has a default promotion"); *************** *** 673,690 **** } } ! error_with_decl (old, "previous declaration of `%s'"); } else { ! char *errmsg = redeclaration_error_message (new, old); if (errmsg) { ! error_with_decl (new, errmsg); ! error_with_decl (old, "here is the previous declaration of `%s'"); } } } ! if (TREE_CODE (old) == TREE_CODE (new)) { /* Copy all the DECL_... slots specified in the new decl --- 686,714 ---- } } ! error_with_decl (olddecl, "previous declaration of `%s'"); } else { ! char *errmsg = redeclaration_error_message (newdecl, olddecl); if (errmsg) { ! error_with_decl (newdecl, errmsg); ! error_with_decl (olddecl, ! "here is the previous declaration of `%s'"); } + else if (TREE_CODE (olddecl) == FUNCTION_DECL + && DECL_INITIAL (olddecl) != 0 + && TYPE_ARG_TYPES (TREE_TYPE (olddecl)) == 0 + && TYPE_ARG_TYPES (TREE_TYPE (newdecl)) != 0) + { + /* Prototype decl follows defn w/o prototype. */ + warning_with_decl (newdecl, "prototype for `%s'"); + warning_with_decl (olddecl, + "follows non-prototype definition here"); + } } } ! if (TREE_CODE (olddecl) == TREE_CODE (newdecl)) { /* Copy all the DECL_... slots specified in the new decl *************** *** 693,723 **** if (types_match) { ! tree oldtype = TREE_TYPE (old); /* Merge the data types specified in the two decls. */ ! TREE_TYPE (new) ! = TREE_TYPE (old) = commontype (TREE_TYPE (new), TREE_TYPE (old)); /* Lay the type out, unless already done. */ ! if (oldtype != TREE_TYPE (new)) { ! if (TREE_TYPE (new) != error_mark_node) ! layout_type (TREE_TYPE (new)); ! if (TREE_CODE (new) != FUNCTION_DECL ! && TREE_CODE (new) != TYPE_DECL ! && TREE_CODE (new) != CONST_DECL) ! layout_decl (new, 0); } else { ! /* Since the type is OLD's, make OLD's size go with. */ ! DECL_SIZE (new) = DECL_SIZE (old); ! DECL_SIZE_UNIT (new) = DECL_SIZE_UNIT (old); } /* Merge the initialization information. */ ! if (DECL_INITIAL (new) == 0) ! DECL_INITIAL (new) = DECL_INITIAL (old); /* Keep the old rtl since we can safely use it. */ ! DECL_RTL (new) = DECL_RTL (old); } /* If cannot merge, then use the new type --- 717,748 ---- if (types_match) { ! tree oldtype = TREE_TYPE (olddecl); /* Merge the data types specified in the two decls. */ ! TREE_TYPE (newdecl) ! = TREE_TYPE (olddecl) ! = commontype (TREE_TYPE (newdecl), TREE_TYPE (olddecl)); /* Lay the type out, unless already done. */ ! if (oldtype != TREE_TYPE (newdecl)) { ! if (TREE_TYPE (newdecl) != error_mark_node) ! layout_type (TREE_TYPE (newdecl)); ! if (TREE_CODE (newdecl) != FUNCTION_DECL ! && TREE_CODE (newdecl) != TYPE_DECL ! && TREE_CODE (newdecl) != CONST_DECL) ! layout_decl (newdecl, 0); } else { ! /* Since the type is OLDDECL's, make OLDDECL's size go with. */ ! DECL_SIZE (newdecl) = DECL_SIZE (olddecl); ! DECL_SIZE_UNIT (newdecl) = DECL_SIZE_UNIT (olddecl); } /* Merge the initialization information. */ ! if (DECL_INITIAL (newdecl) == 0) ! DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl); /* Keep the old rtl since we can safely use it. */ ! DECL_RTL (newdecl) = DECL_RTL (olddecl); } /* If cannot merge, then use the new type *************** *** 724,785 **** and discard the old rtl. */ else ! TREE_TYPE (old) = TREE_TYPE (new); /* Merge the storage class information. */ ! if (TREE_EXTERNAL (new)) { ! TREE_STATIC (new) = TREE_STATIC (old); ! TREE_EXTERNAL (new) = TREE_EXTERNAL (old); /* For functions, static overrides non-static. */ ! if (TREE_CODE (new) == FUNCTION_DECL) { ! TREE_PUBLIC (new) &= TREE_PUBLIC (old); /* This is since we don't automatically ! copy the attributes of NEW into OLD. */ ! TREE_PUBLIC (old) = TREE_PUBLIC (new); /* If this clears `static', clear it in the identifier too. */ ! if (! TREE_PUBLIC (old)) ! TREE_PUBLIC (DECL_NAME (old)) = 0; } else ! TREE_PUBLIC (new) = TREE_PUBLIC (old); } else { ! TREE_STATIC (old) = TREE_STATIC (new); ! TREE_EXTERNAL (old) = 0; ! TREE_PUBLIC (old) = TREE_PUBLIC (new); } /* If either decl says `inline', this fn is inline, unless its definition was passed already. */ ! if (TREE_INLINE (new) && DECL_INITIAL (old) == 0) ! TREE_INLINE (old) = 1; /* If redeclaring a builtin function, and not a definition, it stays built in. */ ! if (TREE_CODE (new) == FUNCTION_DECL ! && DECL_INITIAL (new) == 0) ! DECL_SET_FUNCTION_CODE (new, DECL_FUNCTION_CODE (old)); ! /* Don't lose track of having output OLD as GDB symbol. */ ! DECL_BLOCK_SYMTAB_ADDRESS (new) = DECL_BLOCK_SYMTAB_ADDRESS (old); /* If fn was already defined, don't lose its DECL_RESULT. */ ! if (TREE_CODE (new) == FUNCTION_DECL ! && DECL_RESULT (new) == 0) ! DECL_RESULT (new) = DECL_RESULT (old); /* If fn was already defined, don't lose its DECL_SAVED_INSNS. */ ! if (TREE_CODE (new) == FUNCTION_DECL ! && DECL_SAVED_INSNS (new) == 0) { ! DECL_SAVED_INSNS (new) = DECL_SAVED_INSNS (old); ! DECL_RESULT_TYPE (new) = DECL_RESULT_TYPE (old); ! DECL_ARGUMENTS (new) = DECL_ARGUMENTS (old); } ! bcopy ((char *) new + sizeof (struct tree_common), ! (char *) old + sizeof (struct tree_common), sizeof (struct tree_decl) - sizeof (struct tree_common)); --- 749,811 ---- and discard the old rtl. */ else ! TREE_TYPE (olddecl) = TREE_TYPE (newdecl); /* Merge the storage class information. */ ! if (TREE_EXTERNAL (newdecl)) { ! TREE_STATIC (newdecl) = TREE_STATIC (olddecl); ! TREE_EXTERNAL (newdecl) = TREE_EXTERNAL (olddecl); /* For functions, static overrides non-static. */ ! if (TREE_CODE (newdecl) == FUNCTION_DECL) { ! TREE_PUBLIC (newdecl) &= TREE_PUBLIC (olddecl); /* This is since we don't automatically ! copy the attributes of NEWDECL into OLDDECL. */ ! TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl); /* If this clears `static', clear it in the identifier too. */ ! if (! TREE_PUBLIC (olddecl)) ! TREE_PUBLIC (DECL_NAME (olddecl)) = 0; } else ! TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl); } else { ! TREE_STATIC (olddecl) = TREE_STATIC (newdecl); ! TREE_EXTERNAL (olddecl) = 0; ! TREE_PUBLIC (olddecl) = TREE_PUBLIC (newdecl); } /* If either decl says `inline', this fn is inline, unless its definition was passed already. */ ! if (TREE_INLINE (newdecl) && DECL_INITIAL (olddecl) == 0) ! TREE_INLINE (olddecl) = 1; /* If redeclaring a builtin function, and not a definition, it stays built in. */ ! if (TREE_CODE (newdecl) == FUNCTION_DECL ! && DECL_INITIAL (newdecl) == 0) ! DECL_SET_FUNCTION_CODE (newdecl, DECL_FUNCTION_CODE (olddecl)); ! /* Don't lose track of having output OLDDECL as GDB symbol. */ ! DECL_BLOCK_SYMTAB_ADDRESS (newdecl) ! = DECL_BLOCK_SYMTAB_ADDRESS (olddecl); /* If fn was already defined, don't lose its DECL_RESULT. */ ! if (TREE_CODE (newdecl) == FUNCTION_DECL ! && DECL_RESULT (newdecl) == 0) ! DECL_RESULT (newdecl) = DECL_RESULT (olddecl); /* If fn was already defined, don't lose its DECL_SAVED_INSNS. */ ! if (TREE_CODE (newdecl) == FUNCTION_DECL ! && DECL_SAVED_INSNS (newdecl) == 0) { ! DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl); ! DECL_RESULT_TYPE (newdecl) = DECL_RESULT_TYPE (olddecl); ! DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl); } ! bcopy ((char *) newdecl + sizeof (struct tree_common), ! (char *) olddecl + sizeof (struct tree_common), sizeof (struct tree_decl) - sizeof (struct tree_common)); *************** *** 941,956 **** TREE_PUBLIC (name) = 1; } ! /* Warn if shadowing an argument. */ ! if (oldlocal != 0 && TREE_CODE (oldlocal) == PARM_DECL && current_binding_level->level_chain->parm_flag) ! warning ("shadowing parameter `%s' with a local variable", IDENTIFIER_POINTER (name)); /* If storing a local value, there may already be one (inherited). If so, record it for restoration when this binding level ends. */ if (oldlocal != 0) ! b->shadowed ! = tree_cons (name, oldlocal, ! b->shadowed); } --- 967,999 ---- TREE_PUBLIC (name) = 1; } ! ! /* Warn if shadowing an argument at the top level of the body. */ ! if (oldlocal != 0 && !TREE_EXTERNAL (x) && TREE_CODE (oldlocal) == PARM_DECL + && TREE_CODE (x) != PARM_DECL && current_binding_level->level_chain->parm_flag) ! warning ("declaration of `%s' shadows a parameter", IDENTIFIER_POINTER (name)); + + /* Maybe warn if shadowing something else. */ + else if (warn_shadow && !TREE_EXTERNAL (x)) + { + char *warnstring = 0; + + if (oldlocal != 0 && TREE_CODE (oldlocal) == PARM_DECL) + warnstring = "declaration of `%s' shadows a parameter"; + else if (oldlocal != 0) + warnstring = "declaration of `%s' shadows previous local"; + else if (IDENTIFIER_GLOBAL_VALUE (name) != 0) + warnstring = "declaration of `%s' shadows global declaration"; + + if (warnstring) + warning (warnstring, IDENTIFIER_POINTER (name)); + } + /* If storing a local value, there may already be one (inherited). If so, record it for restoration when this binding level ends. */ if (oldlocal != 0) ! b->shadowed = tree_cons (name, oldlocal, b->shadowed); } *************** *** 978,982 **** /* Save the decl permanently so we can warn if definition follows. */ ! if (flag_traditional || !warn_implicit) end_temporary_allocation (); --- 1021,1026 ---- /* Save the decl permanently so we can warn if definition follows. */ ! if (flag_traditional || !warn_implicit ! || current_binding_level == global_binding_level) end_temporary_allocation (); *************** *** 1006,1010 **** IDENTIFIER_IMPLICIT_DECL (functionid) = decl; ! if (flag_traditional || ! warn_implicit) resume_temporary_allocation (); --- 1050,1055 ---- IDENTIFIER_IMPLICIT_DECL (functionid) = decl; ! if (flag_traditional || ! warn_implicit ! || current_binding_level == global_binding_level) resume_temporary_allocation (); *************** *** 1012,1017 **** } ! /* Return zero if the declaration NEW is valid ! when the declaration OLD (assumed to be for the same name) has already been seen. Otherwise return an error message format string with a %s --- 1057,1062 ---- } ! /* Return zero if the declaration NEWDECL is valid ! when the declaration OLDDECL (assumed to be for the same name) has already been seen. Otherwise return an error message format string with a %s *************** *** 1019,1029 **** static char * ! redeclaration_error_message (new, old) ! tree new, old; { ! if (TREE_CODE (new) == TYPE_DECL) ! return "redefinition of `%s'"; ! else if (TREE_CODE (new) == FUNCTION_DECL) { /* Declarations of functions can insist on internal linkage but they can't be inconsistent with internal linkage, --- 1064,1078 ---- static char * ! redeclaration_error_message (newdecl, olddecl) ! tree newdecl, olddecl; { ! if (TREE_CODE (newdecl) == TYPE_DECL) { + if (flag_traditional && TREE_TYPE (newdecl) == TREE_TYPE (olddecl)) + return 0; + return "redefinition of `%s'"; + } + else if (TREE_CODE (newdecl) == FUNCTION_DECL) + { /* Declarations of functions can insist on internal linkage but they can't be inconsistent with internal linkage, *************** *** 1030,1034 **** so there can be no error on that account. However defining the same name twice is no good. */ ! if (DECL_INITIAL (old) != 0 && DECL_INITIAL (new) != 0) return "redefinition of `%s'"; return 0; --- 1079,1083 ---- so there can be no error on that account. However defining the same name twice is no good. */ ! if (DECL_INITIAL (olddecl) != 0 && DECL_INITIAL (newdecl) != 0) return "redefinition of `%s'"; return 0; *************** *** 1038,1049 **** /* Objects declared at top level: */ /* If at least one is a reference, it's ok. */ ! if (TREE_EXTERNAL (new) || TREE_EXTERNAL (old)) return 0; /* Reject two definitions. */ ! if (DECL_INITIAL (old) != 0 && DECL_INITIAL (new) != 0) return "redefinition of `%s'"; /* Now we have two tentative defs, or one tentative and one real def. */ /* Insist that the linkage match. */ ! if (TREE_PUBLIC (old) != TREE_PUBLIC (new)) return "conflicting declarations of `%s'"; return 0; --- 1087,1098 ---- /* Objects declared at top level: */ /* If at least one is a reference, it's ok. */ ! if (TREE_EXTERNAL (newdecl) || TREE_EXTERNAL (olddecl)) return 0; /* Reject two definitions. */ ! if (DECL_INITIAL (olddecl) != 0 && DECL_INITIAL (newdecl) != 0) return "redefinition of `%s'"; /* Now we have two tentative defs, or one tentative and one real def. */ /* Insist that the linkage match. */ ! if (TREE_PUBLIC (olddecl) != TREE_PUBLIC (newdecl)) return "conflicting declarations of `%s'"; return 0; *************** *** 1054,1058 **** /* Reject two definitions, and reject a definition together with an external reference. */ ! if (!(TREE_EXTERNAL (new) && TREE_EXTERNAL (old))) return "redeclaration of `%s'"; return 0; --- 1103,1107 ---- /* Reject two definitions, and reject a definition together with an external reference. */ ! if (!(TREE_EXTERNAL (newdecl) && TREE_EXTERNAL (olddecl))) return "redeclaration of `%s'"; return 0; *************** *** 1513,1516 **** --- 1562,1567 ---- tree declspecs; { + int found_tag = 0; + int warned = 0; register tree link; *************** *** 1519,1522 **** --- 1570,1575 ---- register tree value = TREE_VALUE (link); register enum tree_code code = TREE_CODE (value); + int ok = 0; + if (code == RECORD_TYPE || code == UNION_TYPE || code == ENUMERAL_TYPE) /* Used to test also that TYPE_SIZE (value) != 0. *************** *** 1525,1528 **** --- 1578,1582 ---- register tree name = lookup_tag_reverse (value); register tree t = lookup_tag (code, name, current_binding_level, 1); + if (t == 0) { *************** *** 1529,1539 **** t = make_node (code); pushtag (name, t); ! return; } ! if (name != 0 || code == ENUMERAL_TYPE) ! return; } } - warning ("empty declaration"); } \f --- 1583,1609 ---- t = make_node (code); pushtag (name, t); ! ok = 1; } ! else if (name != 0 || code == ENUMERAL_TYPE) ! ok = 1; } + + if (ok) + found_tag++; + else + { + if (!warned) + warning ("useless keyword or type name in declaration"); + warned = 1; + } + } + + if (!warned) + { + if (found_tag > 1) + warning ("multiple types in one declaration"); + if (found_tag == 0) + warning ("empty declaration"); } } \f *************** *** 1639,1643 **** } ! /* Add this decl to the current binding level. */ tem = pushdecl (decl); --- 1709,1714 ---- } ! /* Add this decl to the current binding level. ! TEM may equal DECL or it may be a previous decl of the same name. */ tem = pushdecl (decl); *************** *** 1645,1656 **** if (current_binding_level != global_binding_level /* But not if this is a duplicate decl ! and we prefer the previous decl. */ ! && DECL_RTL (decl) == 0) { ! if (TYPE_SIZE (TREE_TYPE (decl)) != 0) ! expand_decl (decl, NULL_TREE); ! else if (TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE ! && DECL_INITIAL (decl) != 0) ! expand_decl (decl, NULL_TREE); } --- 1716,1728 ---- if (current_binding_level != global_binding_level /* But not if this is a duplicate decl ! and we preserved the rtl from the previous one ! (which may or may not happen). */ ! && DECL_RTL (tem) == 0) { ! if (TYPE_SIZE (TREE_TYPE (tem)) != 0) ! expand_decl (tem, NULL_TREE); ! else if (TREE_CODE (TREE_TYPE (tem)) == ARRAY_TYPE ! && DECL_INITIAL (tem) != 0) ! expand_decl (tem, NULL_TREE); } *************** *** 1884,1888 **** \f /* Given declspecs and a declarator, ! determine the name and type of the object declared. DECLSPECS is a chain of tree_list nodes whose value fields are the storage classes and type specifiers. --- 1956,1964 ---- \f /* Given declspecs and a declarator, ! determine the name and type of the object declared ! and construct a ..._DECL node for it. ! (In one case we can return a ..._TYPE node instead. ! For invalid input we sometimes return 0.) ! DECLSPECS is a chain of tree_list nodes whose value fields are the storage classes and type specifiers. *************** *** 1896,1900 **** or before a function body). Make a PARM_DECL, or return void_type_node. TYPENAME if for a typename (in a cast or sizeof). ! Don't make a DECL node; just return the type. FIELD for a struct or union field; make a FIELD_DECL. INITIALIZED is 1 if the decl has an initializer. --- 1972,1976 ---- or before a function body). Make a PARM_DECL, or return void_type_node. TYPENAME if for a typename (in a cast or sizeof). ! Don't make a DECL node; just return the ..._TYPE node. FIELD for a struct or union field; make a FIELD_DECL. INITIALIZED is 1 if the decl has an initializer. *************** *** 2013,2016 **** --- 2089,2094 ---- if (pedantic) warning ("duplicate `%s'", IDENTIFIER_POINTER (id)); + else if (longlong) + warning ("`long long long' is too long for GCC"); else longlong = 1; *************** *** 2230,2240 **** if (pedantic && integer_zerop (size)) warning ("ANSI C forbids zero-size array `%s'", name); ! if (INT_CST_LT (size, integer_zero_node)) { ! error ("size of array `%s' is negative", name); ! size = integer_one_node; } - if (TREE_LITERAL (size)) - itype = build_index_type (build_int_2 (TREE_INT_CST_LOW (size) - 1, 0)); else { --- 2308,2320 ---- if (pedantic && integer_zerop (size)) warning ("ANSI C forbids zero-size array `%s'", name); ! if (TREE_CODE (size) == INTEGER_CST) { ! if (INT_CST_LT (size, integer_zero_node)) ! { ! error ("size of array `%s' is negative", name); ! size = integer_one_node; ! } ! itype = build_index_type (build_int_2 (TREE_INT_CST_LOW (size) - 1, 0)); } else { *************** *** 2573,2576 **** --- 2653,2659 ---- last_function_parm_tags = TREE_VALUE (parms_info); + if (warn_strict_prototypes && first_parm == 0 && !funcdef_flag) + warning ("function declaration isn't a prototype"); + if (first_parm != 0 && TREE_CODE (TREE_VALUE (first_parm)) == IDENTIFIER_NODE) *************** *** 2713,2716 **** --- 2796,2800 ---- { tree elt; + static int already; for (elt = current_binding_level->tags; elt; elt = TREE_CHAIN (elt)) *************** *** 2722,2725 **** --- 2806,2815 ---- : "enum"), IDENTIFIER_POINTER (TREE_PURPOSE (elt))); + if (! already) + { + warning ("such a name is accessible only within its parameter list,"); + warning ("which is probably not what you want."); + already = 1; + } } } *************** *** 2747,2750 **** --- 2837,2843 ---- if (code == ENUMERAL_TYPE) { + /* (In ANSI, Enums can be referred to only if already defined.) */ + if (pedantic) + warning ("ANSI C forbids forward references to `enum' types"); /* Give the type a default layout like unsigned int to avoid crashing if it does not get defined. */ *************** *** 2824,2828 **** { register tree x; ! int old; int round_up_size = 1; --- 2917,2921 ---- { register tree x; ! int old_momentary; int round_up_size = 1; *************** *** 2832,2836 **** TYPE_SIZE (t) = 0; ! old = suspend_momentary (); if (fieldlist == 0 && pedantic) --- 2925,2929 ---- TYPE_SIZE (t) = 0; ! old_momentary = suspend_momentary (); if (fieldlist == 0 && pedantic) *************** *** 3011,3015 **** } ! resume_momentary (old); return t; --- 3104,3108 ---- } ! resume_momentary (old_momentary); return t; *************** *** 3151,3155 **** /* Set basis for default for next value. */ enum_next_value = build_binary_op_nodefault (PLUS_EXPR, value, ! integer_one_node); /* Now create a declaration for the enum value name. */ --- 3244,3248 ---- /* Set basis for default for next value. */ enum_next_value = build_binary_op_nodefault (PLUS_EXPR, value, ! integer_one_node, PLUS_EXPR); /* Now create a declaration for the enum value name. */ *************** *** 3564,3568 **** and without a value. */ else if (extra_warnings ! && current_function_returns_value && current_function_returns_null) warning ("this function may return with or without a value"); --- 3657,3661 ---- and without a value. */ else if (extra_warnings ! && current_function_returns_value && current_function_returns_null) warning ("this function may return with or without a value"); diff -rc2N gcc-1.34/c-parse.gperf gcc-1.35/c-parse.gperf *** gcc-1.34/c-parse.gperf Wed Dec 31 19:00:00 1969 --- gcc-1.35/c-parse.gperf Wed Mar 29 23:47:30 1989 *************** *** 0 **** --- 1,46 ---- + %{ + /* Command-line: gperf -p -j1 -g -o -t -N is_reserved_word c-parse.gperf */ + %} + struct resword { char *name; short token; enum rid rid; }; + %% + __alignof, ALIGNOF, NORID + __asm, ASM, NORID + __const, TYPE_QUAL, RID_CONST + __inline, SCSPEC, RID_INLINE + __typeof, TYPEOF, NORID + __volatile, TYPE_QUAL, RID_VOLATILE + asm, ASM, NORID + auto, SCSPEC, RID_AUTO + break, BREAK, NORID + case, CASE, NORID + char, TYPESPEC, RID_CHAR + const, TYPE_QUAL, RID_CONST + continue, CONTINUE, NORID + default, DEFAULT, NORID + do, DO, NORID + double, TYPESPEC, RID_DOUBLE + else, ELSE, NORID + enum, ENUM, NORID + extern, SCSPEC, RID_EXTERN + float, TYPESPEC, RID_FLOAT + for, FOR, NORID + goto, GOTO, NORID + if, IF, NORID + inline, SCSPEC, RID_INLINE + int, TYPESPEC, RID_INT + long, TYPESPEC, RID_LONG + register, SCSPEC, RID_REGISTER + return, RETURN, NORID + short, TYPESPEC, RID_SHORT + signed, TYPESPEC, RID_SIGNED + sizeof, SIZEOF, NORID + static, SCSPEC, RID_STATIC + struct, STRUCT, NORID + switch, SWITCH, NORID + typedef, SCSPEC, RID_TYPEDEF + typeof, TYPEOF, NORID + union, UNION, NORID + unsigned, TYPESPEC, RID_UNSIGNED + void, TYPESPEC, RID_VOID + volatile, TYPE_QUAL, RID_VOLATILE + while, WHILE, NORID diff -rc2N gcc-1.34/c-parse.y gcc-1.35/c-parse.y *** gcc-1.34/c-parse.y Wed Feb 22 11:47:36 1989 --- gcc-1.35/c-parse.y Mon Apr 10 06:20:19 1989 *************** *** 22,26 **** written by AT&T, but I have never seen it. */ ! %expect 23 /* These are the 23 conflicts you should get in parse.output; --- 22,26 ---- written by AT&T, but I have never seen it. */ ! %expect 8 /* These are the 23 conflicts you should get in parse.output; *************** *** 58,61 **** --- 58,63 ---- #endif + void yyerror (); + /* Cause the `yydebug' variable to be defined. */ #define YYDEBUG 1 *************** *** 102,105 **** --- 104,111 ---- %token BREAK CONTINUE RETURN GOTO ASM TYPEOF ALIGNOF + /* Add precedence rules to solve dangling else s/r conflict */ + %nonassoc IF + %nonassoc ELSE + /* Define the operator tokens and their precedences. The value is an integer because, if used, it is the tree code *************** *** 120,124 **** %right <code> UNARY PLUSPLUS MINUSMINUS %left HYPERUNARY ! %left <code> POINTSAT '.' %type <code> unop --- 126,130 ---- %right <code> UNARY PLUSPLUS MINUSMINUS %left HYPERUNARY ! %left <code> POINTSAT '.' '(' '[' %type <code> unop *************** *** 771,775 **** components: /* empty */ ! { $$ = NULL_TREE; } | component_declarator | components ',' component_declarator --- 777,783 ---- components: /* empty */ ! { if (pedantic) ! warning ("ANSI C forbids member declarations with no members"); ! $$ = NULL_TREE; } | component_declarator | components ',' component_declarator *************** *** 918,922 **** stmt { expand_end_else (); } ! | simple_if { expand_end_cond (); } | WHILE --- 926,930 ---- stmt { expand_end_else (); } ! | simple_if %prec IF { expand_end_cond (); } | WHILE *************** *** 966,970 **** push_momentary (); } stmt ! { expand_end_case (); pop_momentary (); } | CASE expr ':' --- 974,978 ---- push_momentary (); } stmt ! { expand_end_case ($3); pop_momentary (); } | CASE expr ':' *************** *** 1051,1054 **** --- 1059,1063 ---- emit_line_note (input_filename, lineno); decl = lookup_label ($2); + TREE_USED (decl) = 1; expand_goto (decl); } | identifier ':' *************** *** 1312,1317 **** #define MIN_WORD_LENGTH 2 /* minimum size for C keyword */ #define MAX_WORD_LENGTH 9 /* maximum size for C keyword */ ! #define MIN_HASH_VALUE 4 /* range of the hash keys values for the */ ! #define MAX_HASH_VALUE 39 /* minimum perfect hash generator */ #define NORID RID_UNUSED --- 1321,1326 ---- #define MIN_WORD_LENGTH 2 /* minimum size for C keyword */ #define MAX_WORD_LENGTH 9 /* maximum size for C keyword */ ! #define MIN_HASH_VALUE 4 /* range of the hash keys values */ ! #define MAX_HASH_VALUE 52 /* for the perfect hash generator */ #define NORID RID_UNUSED *************** *** 1328,1339 **** static int hash (str, len) ! register char *str; ! register int len; { - /* This table is used to build the hash table index that recognizes reserved words in 0(1) steps. It is larger than strictly necessary, but I'm trading off the space for the time-saving luxury of avoiding ! subtraction of an offset. All those ``39's'' (actually just a short-hand for MAX_HASH_VALUE #defined above) are used to speed up the search when the string found on the input stream doesn't have a --- 1337,1347 ---- static int hash (str, len) ! register char *str; ! register int len; { /* This table is used to build the hash table index that recognizes reserved words in 0(1) steps. It is larger than strictly necessary, but I'm trading off the space for the time-saving luxury of avoiding ! subtraction of an offset. All those ``52's'' (actually just a short-hand for MAX_HASH_VALUE #defined above) are used to speed up the search when the string found on the input stream doesn't have a *************** *** 1344,1366 **** static int hash_table[] = { ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, ! 39, 39, 39, 39, 39, 5, 39, 32, 33, 18, ! 2, 0, 13, 28, 19, 18, 39, 0, 5, 1, ! 11, 3, 39, 39, 12, 6, 0, 0, 7, 1, ! 39, 39, 39, 39, 39, 39, 39, 39, }; ! /* The hash function is very simple: add the length of STR ! to the hash_table value of its first and last character. ! Putting LEN near LEN - 1 generates slightly better ! code... */ return len + hash_table[str[len - 1]] + hash_table[str[0]]; --- 1352,1374 ---- static int hash_table[] = { ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, ! 52, 52, 52, 52, 52, 7, 52, 12, 0, 18, ! 5, 0, 13, 2, 2, 29, 52, 0, 7, 37, ! 25, 0, 52, 52, 17, 19, 0, 21, 1, 3, ! 52, 52, 52, 52, 52, 52, 52, 52, }; ! /* The hash function is very simple: add the length of STR ! to the hash_table value of its first and last character. ! Putting LEN near LEN - 1 generates slightly better ! code... */ return len + hash_table[str[len - 1]] + hash_table[str[0]]; *************** *** 1376,1434 **** inline #endif ! static struct resword * is_reserved_word (str, len) ! register char *str; ! register int len; { ! ! /* This is the hash table of keywords. ! The order of keywords has been chosen for perfect hashing. ! Therefore, this table cannot be updated by hand. ! Use the program ``gperf,'' available with the latest libg++ ! distribution, to generate an updated table. The command-line ! arguments to build this table were: gperf -g -o -j1 -t gnuc.input */ ! ! static struct resword reswords[] = ! { ! ! /* These first locations are unused, they simplify the hashing. */ ! ! { "",},{ "",},{ "",},{ "",}, ! { "else", ELSE, NORID }, ! { "enum", ENUM, NORID }, ! { "while", WHILE, NORID }, ! { "do", DO, NORID }, ! { "double", TYPESPEC, RID_DOUBLE }, ! { "default", DEFAULT, NORID }, ! { "unsigned", TYPESPEC, RID_UNSIGNED }, ! { "short", TYPESPEC, RID_SHORT }, ! { "struct", STRUCT, NORID }, ! { "void", TYPESPEC, RID_VOID }, ! { "signed", TYPESPEC, RID_SIGNED }, ! { "volatile", TYPE_QUAL, RID_VOLATILE }, ! { "union", UNION, NORID }, ! { "extern", SCSPEC, RID_EXTERN }, ! { "float", TYPESPEC, RID_FLOAT }, ! { "typeof", TYPEOF, NORID }, ! { "typedef", SCSPEC, RID_TYPEDEF }, ! { "int", TYPESPEC, RID_INT }, ! { "case", CASE, NORID }, ! { "const", TYPE_QUAL, RID_CONST }, ! { "inline", SCSPEC, RID_INLINE }, ! { "sizeof", SIZEOF, NORID }, ! { "continue", CONTINUE, NORID }, ! { "__alignof", ALIGNOF, NORID }, ! { "for", FOR, NORID }, ! { "return", RETURN, NORID }, ! { "static", SCSPEC, RID_STATIC }, ! { "switch", SWITCH, NORID }, ! { "register", SCSPEC, RID_REGISTER }, ! { "if", IF, NORID }, ! { "char", TYPESPEC, RID_CHAR }, ! { "goto", GOTO, NORID }, ! { "asm", ASM, NORID }, ! { "long", TYPESPEC, RID_LONG }, ! { "break", BREAK, NORID }, ! { "auto", SCSPEC, RID_AUTO }, }; --- 1384,1448 ---- inline #endif ! struct resword * is_reserved_word (str, len) ! register char *str; ! register int len; { ! /* This is the hash table of keywords. ! The order of keywords has been chosen for perfect hashing. ! Therefore, this table cannot be updated by hand. ! Use the program ``gperf,'' available with the latest libg++ ! distribution, to generate an updated table. The command-line ! arguments to build this table were: gperf -g -o -j1 -t gnuc.input */ ! ! static struct resword reswords[] = ! { ! { "",},{ "",},{ "",},{ "",}, ! { "else", ELSE, NORID }, ! { "break", BREAK, NORID }, ! { "goto", GOTO, NORID }, ! { "do", DO, NORID }, ! { "while", WHILE, NORID }, ! { "volatile", TYPE_QUAL, RID_VOLATILE }, ! { "void", TYPESPEC, RID_VOID }, ! { "double", TYPESPEC, RID_DOUBLE }, ! { "default", DEFAULT, NORID }, ! { "long", TYPESPEC, RID_LONG }, ! { "__const", TYPE_QUAL, RID_CONST }, ! { "__inline", SCSPEC, RID_INLINE }, ! { "auto", SCSPEC, RID_AUTO }, ! { "__volatile", TYPE_QUAL, RID_VOLATILE }, ! { "float", TYPESPEC, RID_FLOAT }, ! { "typeof", TYPEOF, NORID }, ! { "typedef", SCSPEC, RID_TYPEDEF }, ! { "",}, ! { "case", CASE, NORID }, ! { "const", TYPE_QUAL, RID_CONST }, ! { "short", TYPESPEC, RID_SHORT }, ! { "struct", STRUCT, NORID }, ! { "continue", CONTINUE, NORID }, ! { "switch", SWITCH, NORID }, ! { "__typeof", TYPEOF, NORID }, ! { "__alignof", ALIGNOF, NORID }, ! { "signed", TYPESPEC, RID_SIGNED }, ! { "extern", SCSPEC, RID_EXTERN }, ! { "int", TYPESPEC, RID_INT }, ! { "for", FOR, NORID }, ! { "unsigned", TYPESPEC, RID_UNSIGNED }, ! { "inline", SCSPEC, RID_INLINE }, ! { "",},{ "",}, ! { "sizeof", SIZEOF, NORID }, ! { "char", TYPESPEC, RID_CHAR }, ! { "",}, ! { "enum", ENUM, NORID }, ! { "register", SCSPEC, RID_REGISTER }, ! { "static", SCSPEC, RID_STATIC }, ! { "if", IF, NORID }, ! { "",},{ "",},{ "",}, ! { "return", RETURN, NORID }, ! { "__asm", ASM, NORID }, ! { "",}, ! { "union", UNION, NORID }, ! { "asm", ASM, NORID }, }; *************** *** 1641,1645 **** && getc (finput) == 'm' && getc (finput) == 'a' ! && ((c = getc (finput)) == ' ' || c == '\t')) goto skipline; } --- 1655,1659 ---- && getc (finput) == 'm' && getc (finput) == 'a' ! && ((c = getc (finput)) == ' ' || c == '\t' || c == '\n')) goto skipline; } *************** *** 1653,1657 **** goto linenum; } - #ifdef IDENT_DIRECTIVE else if (c == 'i') { --- 1667,1670 ---- *************** *** 1688,1694 **** #ifdef ASM_OUTPUT_IDENT ASM_OUTPUT_IDENT (asm_out_file, TREE_STRING_POINTER (yylval.ttype)); - #else - fprintf (asm_out_file, "\t.ident \"%s\"\n", - TREE_STRING_POINTER (yylval.ttype)); #endif --- 1701,1704 ---- *************** *** 1697,1701 **** } } - #endif error ("undefined or invalid # directive"); --- 1707,1710 ---- *************** *** 1762,1765 **** --- 1771,1776 ---- /* skip the rest of this line. */ skipline: + if (c == '\n') + return c; while ((c = getc (finput)) != EOF && c != '\n'); return c; *************** *** 2012,2016 **** || ((int) ptr->token != ASM && (int) ptr->token != TYPEOF ! && ptr->rid != RID_INLINE)) /* -ftraditional means don't recognize nontraditional keywords typeof, const, volatile, signed or inline. */ --- 2023,2029 ---- || ((int) ptr->token != ASM && (int) ptr->token != TYPEOF ! && ptr->rid != RID_INLINE) ! /* Recognize __asm and __inline despite -fno-asm. */ ! || token_buffer[0] == '_') /* -ftraditional means don't recognize nontraditional keywords typeof, const, volatile, signed or inline. */ *************** *** 2019,2023 **** && (int) ptr->token != TYPEOF && ptr->rid != RID_SIGNED ! && ptr->rid != RID_INLINE))) value = (int) ptr->token; } --- 2032,2038 ---- && (int) ptr->token != TYPEOF && ptr->rid != RID_SIGNED ! && ptr->rid != RID_INLINE) ! /* Recognize __inline, etc. despite -ftraditional. */ ! || token_buffer[0] == '_')) value = (int) ptr->token; } diff -rc2N gcc-1.34/c-tree.h gcc-1.35/c-tree.h *** gcc-1.34/c-tree.h Wed Feb 22 11:50:19 1989 --- gcc-1.35/c-tree.h Wed Mar 29 18:58:39 1989 *************** *** 79,83 **** extern int current_function_returns_null; - extern void yyerror(); extern int lineno; --- 79,82 ---- *************** *** 118,121 **** --- 117,129 ---- extern int warn_write_strings; + + /* Nonzero means warn about sizeof(function) or addition/subtraction + of function pointers. */ + + extern int warn_pointer_arith; + + /* Nonzero means warn for all old-style non-prototype function decls. */ + + extern int warn_strict_prototypes; /* Nonzero means warn about pointer casts that can drop a type qualifier diff -rc2N gcc-1.34/c-typeck.c gcc-1.35/c-typeck.c *** gcc-1.34/c-typeck.c Fri Feb 24 06:19:44 1989 --- gcc-1.35/c-typeck.c Mon Apr 24 15:30:27 1989 *************** *** 553,557 **** if (code == FUNCTION_TYPE) { ! if (pedantic) warning ("sizeof applied to a function type"); return build_int (1); --- 553,557 ---- if (code == FUNCTION_TYPE) { ! if (pedantic || warn_pointer_arith) warning ("sizeof applied to a function type"); return build_int (1); *************** *** 559,563 **** if (code == VOID_TYPE) { ! if (pedantic) warning ("sizeof applied to a void type"); return build_int (1); --- 559,563 ---- if (code == VOID_TYPE) { ! if (pedantic || warn_pointer_arith) warning ("sizeof applied to a void type"); return build_int (1); *************** *** 616,619 **** --- 616,620 ---- && TREE_CODE (DECL_INITIAL (decl)) != CONSTRUCTOR && TREE_CODE (DECL_INITIAL (decl)) != ERROR_MARK + && ! TREE_VOLATILE (DECL_INITIAL (decl)) && DECL_MODE (decl) != BLKmode) return DECL_INITIAL (decl); *************** *** 847,851 **** Likewise an array of elements of variable size. */ if (TREE_CODE (index) != INTEGER_CST ! || TREE_CODE (TYPE_SIZE (TREE_TYPE (TREE_TYPE (array)))) != INTEGER_CST) { if (mark_addressable (array) == 0) --- 848,853 ---- Likewise an array of elements of variable size. */ if (TREE_CODE (index) != INTEGER_CST ! || (TYPE_SIZE (TREE_TYPE (TREE_TYPE (array))) != 0 ! && TREE_CODE (TYPE_SIZE (TREE_TYPE (TREE_TYPE (array)))) != INTEGER_CST)) { if (mark_addressable (array) == 0) *************** *** 886,890 **** } ! return build_indirect_ref (build_binary_op_nodefault (PLUS_EXPR, ar, ind), "array indexing"); } --- 888,892 ---- } ! return build_indirect_ref (build_binary_op_nodefault (PLUS_EXPR, ar, ind, PLUS_EXPR), "array indexing"); } *************** *** 1080,1084 **** { return build_binary_op_nodefault (code, default_conversion (arg1), ! default_conversion (arg2)); } --- 1082,1086 ---- { return build_binary_op_nodefault (code, default_conversion (arg1), ! default_conversion (arg2), code); } *************** *** 1093,1096 **** --- 1095,1101 ---- Constant folding is also done before the result is returned. + ERROR_CODE is the code that determines what to say in error messages. + It is usually, but not always, the same as CODE. + Note that the operands will never have enumeral types because either they have just had the default conversions performed *************** *** 1099,1105 **** tree ! build_binary_op_nodefault (code, op0, op1) enum tree_code code; tree op0, op1; { tree dt0 = datatype (op0), dt1 = datatype (op1); --- 1104,1111 ---- tree ! build_binary_op_nodefault (code, op0, op1, error_code) enum tree_code code; tree op0, op1; + enum tree_code error_code; { tree dt0 = datatype (op0), dt1 = datatype (op1); *************** *** 1552,1556 **** if (!result_type) { ! binary_op_error (code); return error_mark_node; } --- 1558,1562 ---- if (!result_type) { ! binary_op_error (error_code); return error_mark_node; } *************** *** 1594,1600 **** register tree result_type = datatype (ptrop); ! if (TREE_TYPE (result_type) == void_type_node) { ! if (pedantic) warning ("pointer of type `void *' used in arithmetic"); size_exp = integer_one_node; --- 1600,1606 ---- register tree result_type = datatype (ptrop); ! if (TREE_CODE (TREE_TYPE (result_type)) == VOID_TYPE) { ! if (pedantic || warn_pointer_arith) warning ("pointer of type `void *' used in arithmetic"); size_exp = integer_one_node; *************** *** 1602,1606 **** else if (TREE_CODE (TREE_TYPE (result_type)) == FUNCTION_TYPE) { ! if (pedantic) warning ("pointer to a function used in arithmetic"); size_exp = integer_one_node; --- 1608,1612 ---- else if (TREE_CODE (TREE_TYPE (result_type)) == FUNCTION_TYPE) { ! if (pedantic || warn_pointer_arith) warning ("pointer to a function used in arithmetic"); size_exp = integer_one_node; *************** *** 1672,1676 **** op0 = build_binary_op (MINUS_EXPR, convert (restype, op0), convert (restype, op1)); ! op1 = ((TREE_TYPE (dt0) == void_type_node || TREE_CODE (TREE_TYPE (dt0)) == FUNCTION_TYPE) ? integer_one_node --- 1678,1682 ---- op0 = build_binary_op (MINUS_EXPR, convert (restype, op0), convert (restype, op1)); ! op1 = ((TREE_CODE (TREE_TYPE (dt0)) == VOID_TYPE || TREE_CODE (TREE_TYPE (dt0)) == FUNCTION_TYPE) ? integer_one_node *************** *** 1699,1703 **** } \f ! /* Print an error message for invalid operands to arith operation CODE. */ static void --- 1705,1710 ---- } \f ! /* Print an error message for invalid operands to arith operation CODE. ! NOP_EXPR is used as a special case (see truthvalue_conversion). */ static void *************** *** 1708,1711 **** --- 1715,1722 ---- switch (code) { + case NOP_EXPR: + error ("invalid truth-value expression"); + return; + case PLUS_EXPR: opname = "+"; break; *************** *** 2457,2461 **** return truthvalue_conversion (TREE_OPERAND (expr, 0)); ! return build_binary_op (NE_EXPR, expr, integer_zero_node); } --- 2468,2473 ---- return truthvalue_conversion (TREE_OPERAND (expr, 0)); ! return build_binary_op_nodefault (NE_EXPR, default_conversion (expr), ! integer_zero_node, NOP_EXPR); } *************** *** 2552,2561 **** if (TREE_REGDECL (x) && !TREE_ADDRESSABLE (x)) { ! if (DECL_CONTEXT (x) == 0) { ! error ("address of global register variable requested"); return 0; } ! warning ("address requested for `%s', which is declared `register'", IDENTIFIER_POINTER (DECL_NAME (x))); } --- 2564,2574 ---- if (TREE_REGDECL (x) && !TREE_ADDRESSABLE (x)) { ! if (TREE_PUBLIC (x)) { ! error ("address of global register variable `%s' requested", ! IDENTIFIER_POINTER (DECL_NAME (x))); return 0; } ! warning ("address of register variable `%s' requested", IDENTIFIER_POINTER (DECL_NAME (x))); } *************** *** 2976,2979 **** --- 2989,2994 ---- newrhs = convert_for_assignment (lhstype, newrhs, "assignment"); + if (TREE_CODE (newrhs) == ERROR_MARK) + return error_mark_node; result = build (MODIFY_EXPR, lhstype, lhs, newrhs); *************** *** 3031,3035 **** if (coder == ERROR_MARK) ! return rhs; if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (rhstype)) --- 3046,3050 ---- if (coder == ERROR_MARK) ! return error_mark_node; if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (rhstype)) diff -rc2N gcc-1.34/cccp.c gcc-1.35/cccp.c *** gcc-1.34/cccp.c Wed Feb 22 11:46:00 1989 --- gcc-1.35/cccp.c Fri Apr 21 23:52:24 1989 *************** *** 1,4 **** /* C Compatible Compiler Preprocessor (CCCP) ! Copyright (C) 1986, 1987, Free Software Foundation, Inc. Written by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 --- 1,4 ---- /* C Compatible Compiler Preprocessor (CCCP) ! Copyright (C) 1986, 1987, 1989 Free Software Foundation, Inc. Written by Paul Rubin, June 1986 Adapted to ANSI C, Richard Stallman, Jan 1987 *************** *** 89,93 **** int do_define (), do_line (), do_include (), do_undef (), do_error (), do_pragma (), do_if (), do_xifdef (), do_else (), ! do_elif (), do_endif (), do_sccs (); struct hashnode *install (); --- 89,93 ---- int do_define (), do_line (), do_include (), do_undef (), do_error (), do_pragma (), do_if (), do_xifdef (), do_else (), ! do_elif (), do_endif (), do_sccs (), do_once (); struct hashnode *install (); *************** *** 94,98 **** struct hashnode *lookup (); ! char *xmalloc (), *xrealloc (), *xcalloc (); void fatal (), pfatal_with_name (), perror_with_name (); --- 94,98 ---- struct hashnode *lookup (); ! char *xmalloc (), *xrealloc (), *xcalloc (), *savestring (); void fatal (), pfatal_with_name (), perror_with_name (); *************** *** 222,228 **** ? grow_outbuf ((OBUF), (NEEDED)) : 0) ! struct directory_stack { ! struct directory_stack *next; char *fname; }; --- 222,228 ---- ? grow_outbuf ((OBUF), (NEEDED)) : 0) ! struct file_name_list { ! struct file_name_list *next; char *fname; }; *************** *** 231,235 **** /* #include <file> just looks in the stack. */ /* -I directories are added to the end, then the defaults are added. */ ! struct directory_stack include_defaults[] = { #ifndef VMS --- 231,235 ---- /* #include <file> just looks in the stack. */ /* -I directories are added to the end, then the defaults are added. */ ! struct file_name_list include_defaults[] = { #ifndef VMS *************** *** 245,249 **** /* These are used instead of the above, for C++. */ ! struct directory_stack cplusplus_include_defaults[] = { #ifndef VMS --- 245,249 ---- /* These are used instead of the above, for C++. */ ! struct file_name_list cplusplus_include_defaults[] = { #ifndef VMS *************** *** 263,270 **** }; ! struct directory_stack *include = 0; /* First dir to search */ /* First dir to search for <file> */ ! struct directory_stack *first_bracket_include = 0; ! struct directory_stack *last_include = 0; /* Last in chain */ \f /* Structure allocated for every #define. For a simple replacement --- 263,276 ---- }; ! struct file_name_list *include = 0; /* First dir to search */ /* First dir to search for <file> */ ! struct file_name_list *first_bracket_include = 0; ! struct file_name_list *last_include = 0; /* Last in chain */ ! ! /* List of included files that contained #once. */ ! struct file_name_list *dont_repeat_files = 0; ! ! /* List of other included files. */ ! struct file_name_list *all_include_files = 0; \f /* Structure allocated for every #define. For a simple replacement *************** *** 335,342 **** T_IF, /* the `#if' keyword */ T_ELSE, /* `#else' */ - #if 0 - /* cpp can pass #pragma through unchanged. */ T_PRAGMA, /* `#pragma' */ - #endif T_ELIF, /* `#else' */ T_UNDEF, /* `#undef' */ --- 341,345 ---- *************** *** 349,352 **** --- 352,356 ---- T_DATE, /* `__DATE__' */ T_FILE, /* `__FILE__' */ + T_BASE_FILE, /* `__BASE_FILE__' */ T_VERSION, /* `__VERSION__' */ T_TIME, /* `__TIME__' */ *************** *** 401,404 **** --- 405,409 ---- char angle_brackets; /* Nonzero => <...> is special. */ char traditional_comments; /* Nonzero: keep comments if -traditional. */ + char noscan; /* Don't scan argument-line, just peek. */ }; *************** *** 420,426 **** { 4, do_sccs, "sccs", T_SCCS}, #endif ! #if 0 ! { 6, do_pragma, "pragma", T_PRAGMA}, ! #endif { -1, 0, "", T_UNUSED}, }; --- 425,429 ---- { 4, do_sccs, "sccs", T_SCCS}, #endif ! { 6, do_pragma, "pragma", T_PRAGMA, 0, 0, 1}, { -1, 0, "", T_UNUSED}, }; *************** *** 599,604 **** case 't': ! traditional = 1; ! dollars_in_ident = 1; break; --- 602,611 ---- case 't': ! if (!strcmp (argv[i], "-traditional")) { ! traditional = 1; ! dollars_in_ident = 1; ! } else if (!strcmp (argv[i], "-trigraphs")) { ! no_trigraphs = 0; ! } break; *************** *** 610,620 **** if (!strcmp (argv[i], "-Wtrigraphs")) { warn_trigraphs = 1; - no_trigraphs = 0; } if (!strcmp (argv[i], "-Wcomments")) warn_comments = 1; if (!strcmp (argv[i], "-Wall")) { warn_trigraphs = 1; - no_trigraphs = 0; warn_comments = 1; } --- 617,627 ---- if (!strcmp (argv[i], "-Wtrigraphs")) { warn_trigraphs = 1; } if (!strcmp (argv[i], "-Wcomments")) warn_comments = 1; + if (!strcmp (argv[i], "-Wcomment")) + warn_comments = 1; if (!strcmp (argv[i], "-Wall")) { warn_trigraphs = 1; warn_comments = 1; } *************** *** 671,678 **** break; - case 'T': /* Enable ANSI trigraphs */ - no_trigraphs = 0; - break; - case '$': /* Don't include $ in identifiers. */ dollars_in_ident = 0; --- 678,681 ---- *************** *** 681,685 **** case 'I': /* Add directory to path for includes. */ { ! struct directory_stack *dirtmp; if (! ignore_srcdir && !strcmp (argv[i] + 2, "-")) --- 684,688 ---- case 'I': /* Add directory to path for includes. */ { ! struct file_name_list *dirtmp; if (! ignore_srcdir && !strcmp (argv[i] + 2, "-")) *************** *** 686,691 **** ignore_srcdir = 1; else { ! dirtmp = (struct directory_stack *) ! xmalloc (sizeof (struct directory_stack)); dirtmp->next = 0; /* New one goes on the end */ if (include == 0) --- 689,694 ---- ignore_srcdir = 1; else { ! dirtmp = (struct file_name_list *) ! xmalloc (sizeof (struct file_name_list)); dirtmp->next = 0; /* New one goes on the end */ if (include == 0) *************** *** 2018,2021 **** --- 2021,2031 ---- int keep_comments = traditional && kt->traditional_comments; + /* For #pragma, check whether `once' follows + without really scanning anything. */ + if (kt->noscan) { + (*kt->func) (after_ident, after_ident, op, kt); + return 0; + } + /* Find the end of this command (first newline not backslashed and not in a string or comment). *************** *** 2224,2230 **** switch (hp->type) { case T_FILE: ! buf = (char *) alloca (3 + strlen (ip->fname)); ! sprintf (buf, "\"%s\"", ip->fname); ! break; case T_VERSION: --- 2234,2255 ---- switch (hp->type) { case T_FILE: ! case T_BASE_FILE: ! { ! char *string; ! if (hp->type == T_FILE) ! string = ip->fname; ! else ! string = instack[0].fname; ! ! if (string) ! { ! buf = (char *) alloca (3 + strlen (string)); ! sprintf (buf, "\"%s\"", string); ! } ! else ! buf = "\"\""; ! ! break; ! } case T_VERSION: *************** *** 2315,2320 **** U_CHAR *fbeg, *fend; /* Beginning and end of fname */ ! struct directory_stack *stackp = include; /* Chain of dirs to search */ ! struct directory_stack dsp[1]; /* First in chain, if #include "..." */ int flen; --- 2340,2345 ---- U_CHAR *fbeg, *fend; /* Beginning and end of fname */ ! struct file_name_list *stackp = include; /* Chain of dirs to search */ ! struct file_name_list dsp[1]; /* First in chain, if #include "..." */ int flen; *************** *** 2453,2467 **** } - /* For -M, print the name of the included file. */ - if (print_deps > system_header_p) { - deps_output (fname, strlen (fname)); - deps_output (" ", 0); - } - if (f < 0) { strncpy (fname, fbeg, flen); fname[flen] = 0; ! error ("can't find include file `%s'", fname); } else { finclude (f, fname, op); close (f); --- 2478,2519 ---- } if (f < 0) { strncpy (fname, fbeg, flen); fname[flen] = 0; ! error_from_errno (fname); } else { + + /* Check to see if this include file is a once-only include file. + If so, give up. */ + + struct file_name_list* ptr; + + for (ptr = dont_repeat_files; ptr; ptr = ptr->next) { + if (!strcmp (ptr->fname, fname)) + return; /* This file was once'd. */ + } + + for (ptr = all_include_files; ptr; ptr = ptr->next) { + if (!strcmp (ptr->fname, fname)) + break; /* This file was included before. */ + } + + if (ptr == 0) { + /* This is the first time for this file. */ + /* Add it to list of files included. */ + + ptr = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); + ptr->next = all_include_files; + all_include_files = ptr; + ptr->fname = savestring (fname); + + /* For -M, add this file to the dependencies. */ + if (print_deps > system_header_p) { + deps_output (fname, strlen (fname)); + deps_output (" ", 0); + } + } + + /* Actually process the file. */ finclude (f, fname, op); close (f); *************** *** 2560,2567 **** nope: ! close (f); ! if (!success) { perror_with_name (fname); ! } } \f --- 2612,2619 ---- nope: ! if (!success) perror_with_name (fname); ! ! close (f); } \f *************** *** 3056,3077 **** } \f - #ifdef DEBUG - /* - * debugging routine ---- return a ptr to a string containing - * first n chars of s. Returns a ptr to a static object - * since I happen to know it will fit. - */ - U_CHAR * - prefix (s, n) - U_CHAR *s; - int n; - { - static U_CHAR buf[1000]; - bcopy (s, buf, n); - buf[n] = '\0'; /* this should not be necessary! */ - return buf; - } - #endif - /* * interpret #line command. Remembers previously seen fnames --- 3108,3111 ---- *************** *** 3189,3193 **** } } ! /* * Report a fatal error detected by the program we are processing. --- 3223,3227 ---- } } ! \f /* * Report a fatal error detected by the program we are processing. *************** *** 3209,3212 **** --- 3243,3290 ---- } + /* Remember the name of the current file being read from so that we can + avoid ever including it again. */ + + do_once () + { + int i; + FILE_BUF *ip = NULL; + + for (i = indepth; i >= 0; i--) + if (instack[i].fname != NULL) { + ip = &instack[i]; + break; + } + + if (ip != NULL) + { + struct file_name_list *new; + + new = (struct file_name_list *) xmalloc (sizeof (struct file_name_list)); + new->next = dont_repeat_files; + dont_repeat_files = new; + new->fname = savestring (ip->fname); + } + } + + /* #pragma receives as an argument the start of the rest of the line. + We use that to peek at what lies ahead without skipping any of it. + Thus, every #pragma is passed on to cc1, with macros expanded. + However, we also do something special here if the #pragma looks like + `#pragma once'. */ + + do_pragma (ptr) + U_CHAR *ptr; + { + U_CHAR *bp = ptr; + while (*bp == ' ' || *bp == '\t') bp++; + if (!strncmp (bp, "once", 4)) { + bp += 4; + while (*bp == ' ' || *bp == '\t') bp++; + if (*bp == '\n') + do_once (); + } + } + #if 0 /* This was a fun hack, but #pragma seems to start to be useful. *************** *** 4463,4466 **** --- 4541,4572 ---- } + /* Error including a message from `errno'. */ + + error_from_errno (name) + char *name; + { + int i; + FILE_BUF *ip = NULL; + extern int errno, sys_nerr; + extern char *sys_errlist[]; + + for (i = indepth; i >= 0; i--) + if (instack[i].fname != NULL) { + ip = &instack[i]; + break; + } + + if (ip != NULL) + fprintf (stderr, "%s:%d: ", ip->fname, ip->lineno); + + if (errno < sys_nerr) + fprintf (stderr, "%s: %s\n", name, sys_errlist[errno]); + else + fprintf (stderr, "%s: undocumented I/O error\n", name); + + errors++; + return 0; + } + /* Print error message but don't count it. */ *************** *** 4872,4875 **** --- 4978,4982 ---- install ("__DATE__", -1, T_DATE, 0, -1); install ("__FILE__", -1, T_FILE, 0, -1); + install ("__BASE_FILE__", -1, T_BASE_FILE, 0, -1); install ("__VERSION__", -1, T_VERSION, 0, -1); install ("__TIME__", -1, T_TIME, 0, -1); *************** *** 4955,4959 **** int size; { ! if (size != 0 && deps_column > 50) { deps_output ("\\\n ", 0); deps_column = 0; --- 5062,5070 ---- int size; { ! #ifndef MAX_OUTPUT_COLUMNS ! #define MAX_OUTPUT_COLUMNS 75 ! #endif ! if (size != 0 && deps_column != 0 ! && size + deps_column > MAX_OUTPUT_COLUMNS) { deps_output ("\\\n ", 0); deps_column = 0; *************** *** 5062,5068 **** fprintf (stderr, "%s: ", progname); if (errno < sys_nerr) ! fprintf (stderr, "%s for `%s'\n", sys_errlist[errno], name); else ! fprintf (stderr, "undocumented error for `%s'\n", name); } --- 5173,5180 ---- fprintf (stderr, "%s: ", progname); if (errno < sys_nerr) ! fprintf (stderr, "%s: %s\n", name, sys_errlist[errno]); else ! fprintf (stderr, "%s: undocumented I/O error\n", name); ! errors++; } *************** *** 5135,5138 **** --- 5247,5259 ---- } + char * + savestring (input) + char *input; + { + int size = strlen (input); + char *output = xmalloc (size + 1); + strcpy (output, input); + return output; + } \f /* Get the file-mode and data size of the file open on FD diff -rc2N gcc-1.34/combine.c gcc-1.35/combine.c *** gcc-1.34/combine.c Wed Feb 22 11:50:10 1989 --- gcc-1.35/combine.c Tue Apr 11 19:18:48 1989 *************** *** 454,457 **** --- 454,481 ---- } + /* If I2 contains anything volatile, reject, unless nothing + volatile comes between it and I3. */ + if (volatile_refs_p (PATTERN (i2))) + { + rtx insn; + for (insn = NEXT_INSN (i2); insn != i3; insn = NEXT_INSN (insn)) + if (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN + || GET_CODE (insn) == JUMP_INSN) + if (volatile_refs_p (PATTERN (insn))) + return 0; + } + /* Likewise for I1; nothing volatile can come between it and I3, + except optionally I2. */ + if (i1 && volatile_refs_p (PATTERN (i1))) + { + rtx insn; + rtx end = (volatile_refs_p (PATTERN (i2)) ? i2 : i3); + for (insn = NEXT_INSN (i1); insn != end; insn = NEXT_INSN (insn)) + if (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN + || GET_CODE (insn) == JUMP_INSN) + if (volatile_refs_p (PATTERN (insn))) + return 0; + } + /* If I1 or I2 contains an autoincrement or autodecrement, make sure that register is not used between there and I3, *************** *** 888,897 **** SUBST_INT (SUBREG_WORD (x), SUBREG_WORD (x) + SUBREG_WORD (to)); } - /* (subreg (sign_extend X)) is X, if it has same mode as X. */ if (SUBREG_REG (x) == to && (GET_CODE (to) == SIGN_EXTEND || GET_CODE (to) == ZERO_EXTEND) ! && SUBREG_WORD (x) == 0 ! && GET_MODE (x) == GET_MODE (XEXP (to, 0))) ! return XEXP (to, 0); /* (subreg:A (mem:B X) N) becomes a modified MEM. This avoids producing any (subreg (mem))s except in the special --- 912,937 ---- SUBST_INT (SUBREG_WORD (x), SUBREG_WORD (x) + SUBREG_WORD (to)); } if (SUBREG_REG (x) == to && (GET_CODE (to) == SIGN_EXTEND || GET_CODE (to) == ZERO_EXTEND) ! && subreg_lowpart_p (x)) ! { ! /* (subreg (sign_extend X)) is X, if it has same mode as X. */ ! if (GET_MODE (x) == GET_MODE (XEXP (to, 0))) ! return XEXP (to, 0); ! /* (subreg (sign_extend X)), if it has a mode wider than X, ! can be done with (sign_extend X). */ ! if (GET_MODE_SIZE (GET_MODE (x)) > GET_MODE_SIZE (GET_MODE (XEXP (to, 0)))) ! { ! if (!undobuf.storage) ! undobuf.storage = (char *) oballoc (0); ! return gen_rtx (GET_CODE (to), GET_MODE (x), XEXP (to, 0)); ! } ! /* Extend and then truncate smaller than it was to start with: ! no need to extend. */ ! if (GET_MODE_SIZE (GET_MODE (x)) < GET_MODE_SIZE (GET_MODE (XEXP (to, 0)))) ! { ! SUBST (XEXP (x, 0), XEXP (to, 0)); ! } ! } /* (subreg:A (mem:B X) N) becomes a modified MEM. This avoids producing any (subreg (mem))s except in the special *************** *** 930,935 **** /* Don't let substitution introduce double-negatives. */ if (was_replaced[0] ! && GET_CODE (to) == code) ! return XEXP (to, 0); break; --- 970,975 ---- /* Don't let substitution introduce double-negatives. */ if (was_replaced[0] ! && GET_CODE (to) == code) ! return XEXP (to, 0); break; *************** *** 940,945 **** if (!undobuf.storage) undobuf.storage = (char *) oballoc (0); ! return gen_rtx (MINUS, GET_MODE (to), ! XEXP (to, 1), XEXP (to, 0)); } /* Don't let substitution introduce double-negatives. */ --- 980,985 ---- if (!undobuf.storage) undobuf.storage = (char *) oballoc (0); ! return gen_rtx (MINUS, GET_MODE (to), ! XEXP (to, 1), XEXP (to, 0)); } /* Don't let substitution introduce double-negatives. */ *************** *** 1282,1286 **** } /* In (set (zero-extract <x> <n> <y>) ! (subreg (and <foo> <(2**n-1) | anything>))) the `and' can be deleted. */ if (GET_CODE (XEXP (x, 0)) == ZERO_EXTRACT --- 1322,1326 ---- } /* In (set (zero-extract <x> <n> <y>) ! (subreg (and <foo> <(2**n-1) | anything>))) the `and' can be deleted. */ if (GET_CODE (XEXP (x, 0)) == ZERO_EXTRACT *************** *** 1306,1317 **** && rtx_equal_p (XEXP (x, 0), XEXP (XEXP (x, 1), 0)) && GET_CODE (XEXP (XEXP (x, 1), 0)) == GET_CODE (XEXP (x, 0)) ! && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT) { #ifdef BITS_BIG_ENDIAN ! int shiftcount = GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (x, 0), 0))) - INTVAL (XEXP (XEXP (x, 0), 1)) - INTVAL (XEXP (XEXP (x, 0), 2)); #else ! int shiftcount = INTVAL (XEXP (XEXP (x, 0), 2)); #endif --- 1346,1364 ---- && rtx_equal_p (XEXP (x, 0), XEXP (XEXP (x, 1), 0)) && GET_CODE (XEXP (XEXP (x, 1), 0)) == GET_CODE (XEXP (x, 0)) ! && GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT ! /* zero_extract can apply to a QImode even if the bits extracted ! don't fit inside that byte. In such a case, we may not do this ! optimization, since the OR or AND insn really would need ! to fit in a byte. */ ! && (INTVAL (XEXP (XEXP (x, 0), 1)) + INTVAL (XEXP (XEXP (x, 0), 2)) ! < GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (x, 0), 0))))) { + int shiftcount; #ifdef BITS_BIG_ENDIAN ! shiftcount = GET_MODE_BITSIZE (GET_MODE (XEXP (XEXP (x, 0), 0))) - INTVAL (XEXP (XEXP (x, 0), 1)) - INTVAL (XEXP (XEXP (x, 0), 2)); #else ! shiftcount = INTVAL (XEXP (XEXP (x, 0), 2)); #endif *************** *** 1358,1361 **** --- 1405,1428 ---- break; + case IOR: + case XOR: + /* (ior (ior x c1) c2) => (ior x c1|c2); likewise for xor. */ + if (GET_CODE (XEXP (x, 1)) == CONST_INT + && GET_CODE (XEXP (x, 0)) == code + && GET_CODE (XEXP (XEXP (x, 0), 1)) == CONST_INT) + { + int c0 = INTVAL (XEXP (x, 1)); + int c1 = INTVAL (XEXP (XEXP (x, 0), 1)); + int combined = (code == IOR ? c0 | c1 : c0 ^ c1); + + if (combined == 0) + return XEXP (XEXP (x, 0), 0); + if (!undobuf.storage) + undobuf.storage = (char *) oballoc (0); + SUBST (XEXP (x, 1), gen_rtx (CONST_INT, VOIDmode, combined)); + SUBST (XEXP (x, 0), XEXP (XEXP (x, 0), 0)); + break; + } + case FLOAT: /* (float (sign_extend <X>)) = (float <X>). */ *************** *** 2400,2403 **** --- 2467,2471 ---- switch (GET_CODE (src1)) { + /* case XOR: Does not distribute through anything! */ case LSHIFTRT: case ASHIFTRT: *************** *** 2406,2410 **** case AND: case IOR: - case XOR: /* Boolean ops don't distribute through addition. */ if (code == PLUS) --- 2474,2477 ---- diff -rc2N gcc-1.34/config/alliant.md gcc-1.35/config/alliant.md *** gcc-1.34/config/alliant.md Wed Feb 22 12:31:23 1989 --- gcc-1.35/config/alliant.md Thu Mar 23 04:38:00 1989 *************** *** 987,991 **** (define_insn "" [(set (match_operand:SF 0 "general_operand" "=f") ! (float:SF (match_operand:SI 1 "general_operand" "dmi")))] "TARGET_68881" "fmovels %1,%0") --- 987,991 ---- (define_insn "" [(set (match_operand:SF 0 "general_operand" "=f") ! (float:SF (match_operand:SI 1 "general_operand" "dm")))] "TARGET_68881" "fmovels %1,%0") *************** *** 999,1003 **** (define_insn "" [(set (match_operand:DF 0 "general_operand" "=f") ! (float:DF (match_operand:SI 1 "general_operand" "dmi")))] "TARGET_68881" "fmoveld %1,%0") --- 999,1003 ---- (define_insn "" [(set (match_operand:DF 0 "general_operand" "=f") ! (float:DF (match_operand:SI 1 "general_operand" "dm")))] "TARGET_68881" "fmoveld %1,%0") *************** *** 1005,1009 **** (define_insn "floathisf2" [(set (match_operand:SF 0 "general_operand" "=f") ! (float:SF (match_operand:HI 1 "general_operand" "dmn")))] "TARGET_68881" "fmovews %1,%0") --- 1005,1009 ---- (define_insn "floathisf2" [(set (match_operand:SF 0 "general_operand" "=f") ! (float:SF (match_operand:HI 1 "general_operand" "dm")))] "TARGET_68881" "fmovews %1,%0") *************** *** 1011,1015 **** (define_insn "floathidf2" [(set (match_operand:DF 0 "general_operand" "=f") ! (float:DF (match_operand:HI 1 "general_operand" "dmn")))] "TARGET_68881" "fmovewd %1,%0") --- 1011,1015 ---- (define_insn "floathidf2" [(set (match_operand:DF 0 "general_operand" "=f") ! (float:DF (match_operand:HI 1 "general_operand" "dm")))] "TARGET_68881" "fmovewd %1,%0") *************** *** 1017,1021 **** (define_insn "floatqisf2" [(set (match_operand:SF 0 "general_operand" "=f") ! (float:SF (match_operand:QI 1 "general_operand" "dmn")))] "TARGET_68881" "fmovebs %1,%0") --- 1017,1021 ---- (define_insn "floatqisf2" [(set (match_operand:SF 0 "general_operand" "=f") ! (float:SF (match_operand:QI 1 "general_operand" "dm")))] "TARGET_68881" "fmovebs %1,%0") *************** *** 1023,1027 **** (define_insn "floatqidf2" [(set (match_operand:DF 0 "general_operand" "=f") ! (float:DF (match_operand:QI 1 "general_operand" "dmn")))] "TARGET_68881" "fmovebd %1,%0") --- 1023,1027 ---- (define_insn "floatqidf2" [(set (match_operand:DF 0 "general_operand" "=f") ! (float:DF (match_operand:QI 1 "general_operand" "dm")))] "TARGET_68881" "fmovebd %1,%0") *************** *** 3008,3012 **** rtx xoperands[2]; xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); ! output_asm_insn (\"movl %1,%s\", xoperands); output_asm_insn (\"movl %1,%-\", operands); return \"fmoved %+,%0\"; --- 3008,3012 ---- rtx xoperands[2]; xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); ! output_asm_insn (\"movl %1,%@\", xoperands); output_asm_insn (\"movl %1,%-\", operands); return \"fmoved %+,%0\"; diff -rc2N gcc-1.34/config/convex.md gcc-1.35/config/convex.md *** gcc-1.34/config/convex.md Wed Feb 22 12:31:21 1989 --- gcc-1.35/config/convex.md Mon Apr 10 23:23:06 1989 *************** *** 42,46 **** (define_expand "tstqi" [(set (match_dup 1) ! (zero_extend:SI (match_operand:QI 0 "register_operand" "r"))) (set (cc0) (match_dup 1))] --- 42,46 ---- (define_expand "tstqi" [(set (match_dup 1) ! (sign_extend:SI (match_operand:QI 0 "register_operand" "r"))) (set (cc0) (match_dup 1))] *************** *** 174,177 **** --- 174,186 ---- }") + ;; Special case of movsi, needed to express A-reg preference. + + (define_insn "" + [(set (match_operand:SI 0 "push_operand" "=<") + (plus:SI (match_operand:SI 1 "register_operand" "a") + (match_operand:SI 2 "immediate_operand" "i")))] + "operands[1] != stack_pointer_rtx" + "pshea %a2(%1)") + (define_insn "movsi" [(set (match_operand:SI 0 "general_operand" "=g,r,<") *************** *** 191,195 **** if (GET_CODE (operands[1]) != REG) return \"ld.w %1,%0\"; ! if (S_REGNO_P (REGNO (operands[0])) && S_REGNO_P (REGNO (operands[1]))) return \"mov.w %1,%0\"; return \"mov %1,%0\"; --- 200,204 ---- if (GET_CODE (operands[1]) != REG) return \"ld.w %1,%0\"; ! if (S_REG_P (operands[0]) && S_REG_P (operands[1])) return \"mov.w %1,%0\"; return \"mov %1,%0\"; *************** *** 203,207 **** { if (push_operand (operands[0], HImode)) ! return \"psh.w %1\"; else if (GET_CODE (operands[0]) == MEM) return \"st.h %1,%0\"; --- 212,216 ---- { if (push_operand (operands[0], HImode)) ! abort (); else if (GET_CODE (operands[0]) == MEM) return \"st.h %1,%0\"; *************** *** 208,212 **** else if (GET_CODE (operands[1]) == REG) { ! if (S_REGNO_P (REGNO (operands[0])) && S_REGNO_P (REGNO (operands[1]))) return \"mov.w %1,%0\"; else --- 217,221 ---- else if (GET_CODE (operands[1]) == REG) { ! if (S_REG_P (operands[0]) && S_REG_P (operands[1])) return \"mov.w %1,%0\"; else *************** *** 226,230 **** { if (push_operand (operands[0], QImode)) ! return \"psh.w %1\"; else if (GET_CODE (operands[0]) == MEM) return \"st.b %1,%0\"; --- 235,239 ---- { if (push_operand (operands[0], QImode)) ! abort (); else if (GET_CODE (operands[0]) == MEM) return \"st.b %1,%0\"; *************** *** 231,235 **** else if (GET_CODE (operands[1]) == REG) { ! if (S_REGNO_P (REGNO (operands[0])) && S_REGNO_P (REGNO (operands[1]))) return \"mov.w %1,%0\"; else --- 240,244 ---- else if (GET_CODE (operands[1]) == REG) { ! if (S_REG_P (operands[0]) && S_REG_P (operands[1])) return \"mov.w %1,%0\"; else *************** *** 428,445 **** (define_insn "addsi3" ! [(set (match_operand:SI 0 "register_operand" "=d,a,r,a,a,a,a") ! (plus:SI (match_operand:SI 1 "nonmemory_operand" "0,0,i,0,r,a,i") ! (match_operand:SI 2 "nonmemory_operand" "di,ai,0,d,0,i,a")))] "" "* switch (which_alternative) { ! case 0: case 1: case 3: ! return \"add.w %2,%0\"; ! case 2: case 4: ! return \"add.w %1,%0\"; ! case 5: ! return \"ldea %a2(%1),%0\"; ! case 6: ! return \"ldea %a1(%2),%0\"; }") --- 437,455 ---- (define_insn "addsi3" ! [(set (match_operand:SI 0 "register_operand" "=d,a,a") ! (plus:SI (match_operand:SI 1 "nonmemory_operand" "%0,0,a") ! (match_operand:SI 2 "nonmemory_operand" "di,ri,i")))] "" "* switch (which_alternative) { ! case 0: ! case 1: ! return \"add.w %2,%0\"; ! case 2: ! if ((TARGET_C2 || A_REG_P (operands[0])) ! && operands[1] != stack_pointer_rtx) ! return \"ldea %a2(%1),%0\"; ! else ! return \"mov %1,%0\;add.w %2,%0\"; }") *************** *** 734,737 **** --- 744,759 ---- "" "not %1,%0") + + (define_insn "one_cmplhi2" + [(set (match_operand:HI 0 "register_operand" "=d,a") + (not:HI (match_operand:HI 1 "register_operand" "d,a")))] + "" + "not %1,%0") + + (define_insn "one_cmplqi2" + [(set (match_operand:QI 0 "register_operand" "=d,a") + (not:QI (match_operand:QI 1 "register_operand" "d,a")))] + "" + "not %1,%0") \f ;;- shifts *************** *** 743,747 **** ;; ;; It is very sad that DImode right shift 64 fails, but I don't see ! ;; any reasonable way to handle it. Ansi only requires up to 63. (define_insn "" --- 765,769 ---- ;; ;; It is very sad that DImode right shift 64 fails, but I don't see ! ;; any reasonable way to handle it. ANSI only requires up to 63. (define_insn "" *************** *** 754,758 **** if (operands[2] == const1_rtx) return \"add.w %0,%0\"; ! else if (TARGET_C2 && S_REGNO_P (REGNO (operands[0]))) return \"shf.w %2,%0\"; else --- 776,780 ---- if (operands[2] == const1_rtx) return \"add.w %0,%0\"; ! else if (TARGET_C2 && S_REG_P (operands[0])) return \"shf.w %2,%0\"; else *************** *** 769,780 **** if (operands[2] == const1_rtx) return \"add.w %0,%0\"; ! else if (GET_CODE (operands[2]) == CONST_INT ! && INTVAL (operands[2]) >= 0) ! { ! if (TARGET_C2) ! return \"shf.w %2,%0\"; ! else ! return \"shf %2,%0\"; ! } else return \"cvtw.l %0,%0\;shf %2,%0\"; --- 791,796 ---- if (operands[2] == const1_rtx) return \"add.w %0,%0\"; ! else if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) >= 0) ! return TARGET_C2 ? \"shf.w %2,%0\" : \"shf %2,%0\"; else return \"cvtw.l %0,%0\;shf %2,%0\"; *************** *** 797,801 **** if (operands[2] == const1_rtx) return \"add.w %0,%0\"; ! if (S_REGNO_P (REGNO (operands[0]))) { if (TARGET_C2) --- 813,817 ---- if (operands[2] == const1_rtx) return \"add.w %0,%0\"; ! if (S_REG_P (operands[0])) { if (TARGET_C2) *************** *** 1241,1244 **** --- 1257,1261 ---- ;;- eval: (modify-syntax-entry ?} "){") ;;- End: + diff -rc2N gcc-1.34/config/i386.md gcc-1.35/config/i386.md *** gcc-1.34/config/i386.md Wed Feb 22 12:31:19 1989 --- gcc-1.35/config/i386.md Thu Mar 23 04:48:59 1989 *************** *** 58,63 **** operands[1] = const0_rtx; if (REG_P (operands[0])) ! return AS2 (test%L,%0,%0); ! return AS2 (cmp%L,%1,%0); }") --- 58,63 ---- operands[1] = const0_rtx; if (REG_P (operands[0])) ! return AS2 (test%L0,%0,%0); ! return AS2 (cmp%L0,%1,%0); }") *************** *** 70,75 **** operands[1] = const0_rtx; if (REG_P (operands[0])) ! return AS2 (test%W,%0,%0); ! return AS2 (cmp%W,%1,%0); }") --- 70,75 ---- operands[1] = const0_rtx; if (REG_P (operands[0])) ! return AS2 (test%W0,%0,%0); ! return AS2 (cmp%W0,%1,%0); }") *************** *** 82,87 **** operands[1] = const0_rtx; if (REG_P (operands[0])) ! return AS2 (test%B,%0,%0); ! return AS2 (cmp%B,%1,%0); }") --- 82,87 ---- operands[1] = const0_rtx; if (REG_P (operands[0])) ! return AS2 (test%B0,%0,%0); ! return AS2 (cmp%B0,%1,%0); }") *************** *** 99,103 **** xops[0] = FP_TOP; cc_status.flags |= CC_IN_80387; ! output_asm_insn (\"ftst\;fstp %0(0)\;fnstsw %Rax\;sahf\", xops); RETCOM (testsf); }") --- 99,103 ---- xops[0] = FP_TOP; cc_status.flags |= CC_IN_80387; ! output_asm_insn (\"ftst\;fstp %0(0)\;fnstsw %R0ax\;sahf\", xops); RETCOM (testsf); }") *************** *** 117,121 **** xops[0] = FP_TOP; cc_status.flags |= CC_IN_80387; ! output_asm_insn (\"ftst\;fstp %0(0)\;fnstsw %Rax\;sahf\", xops); RETCOM (testdf); }") --- 117,121 ---- xops[0] = FP_TOP; cc_status.flags |= CC_IN_80387; ! output_asm_insn (\"ftst\;fstp %0(0)\;fnstsw %R0ax\;sahf\", xops); RETCOM (testdf); }") *************** *** 134,140 **** { cc_status.flags |= CC_REVERSED; ! return AS2 (cmp%L,%0,%1); } ! return AS2 (cmp%L,%1,%0); }") --- 134,140 ---- { cc_status.flags |= CC_REVERSED; ! return AS2 (cmp%L0,%0,%1); } ! return AS2 (cmp%L0,%1,%0); }") *************** *** 150,156 **** { cc_status.flags |= CC_REVERSED; ! return AS2 (cmp%W,%0,%1); } ! return AS2 (cmp%W,%1,%0); }") --- 150,156 ---- { cc_status.flags |= CC_REVERSED; ! return AS2 (cmp%W0,%0,%1); } ! return AS2 (cmp%W0,%1,%0); }") *************** *** 166,172 **** { cc_status.flags |= CC_REVERSED; ! return AS2 (cmp%B,%0,%1); } ! return AS2 (cmp%B,%1,%0); }") --- 166,172 ---- { cc_status.flags |= CC_REVERSED; ! return AS2 (cmp%B0,%0,%1); } ! return AS2 (cmp%B0,%1,%0); }") *************** *** 192,196 **** fp_pop_level--; */ cc_status.flags |= CC_IN_80387; ! return \"fcompp\;fnstsw %Rax\;sahf\"; }") --- 192,196 ---- fp_pop_level--; */ cc_status.flags |= CC_IN_80387; ! return \"fcompp\;fnstsw %R0ax\;sahf\"; }") *************** *** 216,220 **** fp_pop_level--; */ cc_status.flags |= CC_IN_80387; ! return \"fcompp\;fnstsw %Rax\;sahf\"; }") --- 216,220 ---- fp_pop_level--; */ cc_status.flags |= CC_IN_80387; ! return \"fcompp\;fnstsw %R0ax\;sahf\"; }") *************** *** 228,233 **** { if (GET_CODE (operands[1]) == CONST_INT || GET_CODE (operands[0]) == MEM) ! return AS2 (test%L,%1,%0); ! return AS2 (test%L,%0,%1); }") --- 228,233 ---- { if (GET_CODE (operands[1]) == CONST_INT || GET_CODE (operands[0]) == MEM) ! return AS2 (test%L0,%1,%0); ! return AS2 (test%L0,%0,%1); }") *************** *** 240,245 **** { if (GET_CODE (operands[1]) == CONST_INT || GET_CODE (operands[0]) == MEM) ! return AS2 (test%W,%1,%0); ! return AS2 (test%W,%0,%1); }") --- 240,245 ---- { if (GET_CODE (operands[1]) == CONST_INT || GET_CODE (operands[0]) == MEM) ! return AS2 (test%W0,%1,%0); ! return AS2 (test%W0,%0,%1); }") *************** *** 252,257 **** { if (GET_CODE (operands[1]) == CONST_INT || GET_CODE (operands[0]) == MEM) ! return AS2 (test%B,%1,%0); ! return AS2 (test%B,%0,%1); }") \f --- 252,257 ---- { if (GET_CODE (operands[1]) == CONST_INT || GET_CODE (operands[0]) == MEM) ! return AS2 (test%B0,%1,%0); ! return AS2 (test%B0,%0,%1); }") \f *************** *** 265,269 **** (match_operand:SI 1 "general_operand" "g"))] "" ! "push%L %1") ;; General case of fullword move. --- 265,269 ---- (match_operand:SI 1 "general_operand" "g"))] "" ! "push%L0 %1") ;; General case of fullword move. *************** *** 276,280 **** rtx link; if (operands[1] == const0_rtx && REG_P (operands[0])) ! return \"xor%L %0,%0\"; if (operands[1] == const1_rtx && (link = find_reg_note (insn, REG_WAS_0, 0)) --- 276,280 ---- rtx link; if (operands[1] == const0_rtx && REG_P (operands[0])) ! return \"xor%L0 %0,%0\"; if (operands[1] == const1_rtx && (link = find_reg_note (insn, REG_WAS_0, 0)) *************** *** 285,290 **** && no_labels_between_p (XEXP (link, 0), insn)) /* Fastest way to change a 0 to a 1. */ ! return \"inc%L %0\"; ! return \"mov%L %1,%0\"; }") --- 285,290 ---- && no_labels_between_p (XEXP (link, 0), insn)) /* Fastest way to change a 0 to a 1. */ ! return \"inc%L0 %0\"; ! return \"mov%L0 %1,%0\"; }") *************** *** 293,297 **** (match_operand:HI 1 "general_operand" "g"))] "" ! "push%W %1") (define_insn "movhi" --- 293,297 ---- (match_operand:HI 1 "general_operand" "g"))] "" ! "push%W0 %1") (define_insn "movhi" *************** *** 303,307 **** rtx link; if (operands[1] == const0_rtx && REG_P (operands[0])) ! return \"xor%W %0,%0\"; if (operands[1] == const1_rtx && (link = find_reg_note (insn, REG_WAS_0, 0)) --- 303,307 ---- rtx link; if (operands[1] == const0_rtx && REG_P (operands[0])) ! return \"xor%W0 %0,%0\"; if (operands[1] == const1_rtx && (link = find_reg_note (insn, REG_WAS_0, 0)) *************** *** 312,317 **** && no_labels_between_p (XEXP (link, 0), insn)) /* Fastest way to change a 0 to a 1. */ ! return \"inc%W %0\"; ! return \"mov%W %1,%0\"; }") --- 312,317 ---- && no_labels_between_p (XEXP (link, 0), insn)) /* Fastest way to change a 0 to a 1. */ ! return \"inc%W0 %0\"; ! return \"mov%W0 %1,%0\"; }") *************** *** 327,331 **** { operands[1] = gen_rtx (REG, HImode, REGNO (operands[1])); ! return \"push%W %1\"; }") --- 327,331 ---- { operands[1] = gen_rtx (REG, HImode, REGNO (operands[1])); ! return \"push%W0 %1\"; }") *************** *** 338,342 **** rtx link; if (operands[1] == const0_rtx && REG_P (operands[0])) ! return \"xor%B %0,%0\"; if (operands[1] == const1_rtx && (link = find_reg_note (insn, REG_WAS_0, 0)) --- 338,342 ---- rtx link; if (operands[1] == const0_rtx && REG_P (operands[0])) ! return \"xor%B0 %0,%0\"; if (operands[1] == const1_rtx && (link = find_reg_note (insn, REG_WAS_0, 0)) *************** *** 347,355 **** && no_labels_between_p (XEXP (link, 0), insn)) /* Fastest way to change a 0 to a 1. */ ! return \"inc%B %0\"; ! /* If mov%B isn't allowed for one of these regs, use mov%W. */ if (NON_QI_REG_P (operands[0]) || NON_QI_REG_P (operands[1])) ! return (AS2 (mov%W,%w1,%w0)); ! return (AS2 (mov%B,%1,%0)); }") --- 347,355 ---- && no_labels_between_p (XEXP (link, 0), insn)) /* Fastest way to change a 0 to a 1. */ ! return \"inc%B0 %0\"; ! /* If mov%B0 isn't allowed for one of these regs, use mov%W0. */ if (NON_QI_REG_P (operands[0]) || NON_QI_REG_P (operands[1])) ! return (AS2 (mov%W0,%w1,%w0)); ! return (AS2 (mov%B0,%1,%0)); }") *************** *** 380,388 **** xops[2] = stack_pointer_rtx; /* fp_pop_level--; */ ! output_asm_insn (AS2 (sub%L,%1,%2), xops); ! output_asm_insn (\"fstp%S %0\", xops); RET; } ! return \"push%L %1\"; }") --- 380,388 ---- xops[2] = stack_pointer_rtx; /* fp_pop_level--; */ ! output_asm_insn (AS2 (sub%L0,%1,%2), xops); ! output_asm_insn (\"fstp%S0 %0\", xops); RET; } ! return \"push%L0 %1\"; }") *************** *** 416,421 **** xops[2] = stack_pointer_rtx; /* fp_pop_level--; */ ! output_asm_insn (AS2 (sub%L,%1,%2), xops); ! output_asm_insn (\"fstp%Q %0\", xops); RETCOM (pushdf); } --- 416,421 ---- xops[2] = stack_pointer_rtx; /* fp_pop_level--; */ ! output_asm_insn (AS2 (sub%L0,%1,%2), xops); ! output_asm_insn (\"fstp%Q0 %0\", xops); RETCOM (pushdf); } *************** *** 492,496 **** (const_int 1)))] "" ! "inc%L %0") (define_insn "" --- 492,496 ---- (const_int 1)))] "" ! "inc%L0 %0") (define_insn "" *************** *** 499,503 **** (const_int -1)))] "" ! "dec%L %0") (define_insn "" --- 499,503 ---- (const_int -1)))] "" ! "dec%L0 %0") (define_insn "" *************** *** 506,510 **** (const_int 1)))] "" ! "dec%L %0") (define_insn "" --- 506,510 ---- (const_int 1)))] "" ! "dec%L0 %0") (define_insn "" *************** *** 515,519 **** { CC_STATUS_INIT; ! return \"lea%L %a1,%0\"; }") \f --- 515,519 ---- { CC_STATUS_INIT; ! return \"lea%L0 %a1,%0\"; }") \f *************** *** 527,531 **** (match_operand:SI 1 "general_operand" "ri,m")))] "" ! "mov%B %1,%0") (define_insn "trunchiqi2" --- 527,531 ---- (match_operand:SI 1 "general_operand" "ri,m")))] "" ! "mov%B0 %1,%0") (define_insn "trunchiqi2" *************** *** 534,538 **** (match_operand:HI 1 "general_operand" "ri,m")))] "" ! "mov%B %1,%0") (define_insn "truncsihi2" --- 534,538 ---- (match_operand:HI 1 "general_operand" "ri,m")))] "" ! "mov%B0 %1,%0") (define_insn "truncsihi2" *************** *** 541,545 **** (match_operand:SI 1 "general_operand" "ri,m")))] "" ! "mov%W %1,%0") \f ;;- zero extension instructions --- 541,545 ---- (match_operand:SI 1 "general_operand" "ri,m")))] "" ! "mov%W0 %1,%0") \f ;;- zero extension instructions *************** *** 552,556 **** (match_operand:HI 1 "general_operand" "rm")))] "" ! "movz%W%L %1,%0") (define_insn "zero_extendqihi2" --- 552,556 ---- (match_operand:HI 1 "general_operand" "rm")))] "" ! "movz%W0%L0 %1,%0") (define_insn "zero_extendqihi2" *************** *** 559,563 **** (match_operand:QI 1 "general_operand" "qm")))] "" ! "movz%B%W %1,%0") (define_insn "zero_extendqisi2" --- 559,563 ---- (match_operand:QI 1 "general_operand" "qm")))] "" ! "movz%B0%W0 %1,%0") (define_insn "zero_extendqisi2" *************** *** 566,570 **** (match_operand:QI 1 "general_operand" "qm")))] "" ! "movz%B%L %1,%0") \f ;;- sign extension instructions --- 566,570 ---- (match_operand:QI 1 "general_operand" "qm")))] "" ! "movz%B0%L0 %1,%0") \f ;;- sign extension instructions *************** *** 586,590 **** (match_operand:HI 1 "general_operand" "rm")))] "" ! "movs%W%L %1,%0") (define_insn "extendqihi2" --- 586,590 ---- (match_operand:HI 1 "general_operand" "rm")))] "" ! "movs%W0%L0 %1,%0") (define_insn "extendqihi2" *************** *** 593,597 **** (match_operand:QI 1 "general_operand" "qm")))] "" ! "movs%B%W %1,%0") (define_insn "extendqisi2" --- 593,597 ---- (match_operand:QI 1 "general_operand" "qm")))] "" ! "movs%B0%W0 %1,%0") (define_insn "extendqisi2" *************** *** 600,604 **** (match_operand:QI 1 "general_operand" "qm")))] "" ! "movs%B%L %1,%0" ) \f --- 600,604 ---- (match_operand:QI 1 "general_operand" "qm")))] "" ! "movs%B0%L0 %1,%0" ) \f *************** *** 606,612 **** (define_insn "extendsfdf2" ! [(set (match_operand:DF 0 "general_operand" "=fm,fm,fm") (float_extend:DF ! (match_operand:SF 1 "general_operand" "m,f,!*r")))] "TARGET_80387" "* --- 606,612 ---- (define_insn "extendsfdf2" ! [(set (match_operand:DF 0 "general_operand" "=fm,f,fm,fm") (float_extend:DF ! (match_operand:SF 1 "general_operand" "m,0,f,!*r")))] "TARGET_80387" "* *************** *** 663,675 **** { rtx xops[2]; ! output_asm_insn (\"push%L %1\", operands); operands[1] = AT_SP (SImode); ! output_asm_insn (\"fild%L %1\", operands); xops[0] = stack_pointer_rtx; xops[1] = gen_rtx (CONST_INT, VOIDmode, 4); ! output_asm_insn (AS2 (add%L,%1,%0), xops); } else ! output_asm_insn (\"fild%L %1\", operands); if (! FP_REG_P (operands[0])) --- 663,675 ---- { rtx xops[2]; ! output_asm_insn (\"push%L0 %1\", operands); operands[1] = AT_SP (SImode); ! output_asm_insn (\"fild%L0 %1\", operands); xops[0] = stack_pointer_rtx; xops[1] = gen_rtx (CONST_INT, VOIDmode, 4); ! output_asm_insn (AS2 (add%L0,%1,%0), xops); } else ! output_asm_insn (\"fild%L0 %1\", operands); if (! FP_REG_P (operands[0])) *************** *** 676,680 **** { /* fp_pop_level--; */ ! return \"fstp%S %0\"; } RET; --- 676,680 ---- { /* fp_pop_level--; */ ! return \"fstp%S0 %0\"; } RET; *************** *** 691,707 **** { rtx xops[2]; ! output_asm_insn (\"push%L %1\", operands); operands[1] = AT_SP (SImode); ! output_asm_insn (\"fild%L %1\", operands); xops[0] = stack_pointer_rtx; xops[1] = gen_rtx (CONST_INT, VOIDmode, 4); ! output_asm_insn (AS2 (add%L,%1,%0), xops); } else ! output_asm_insn (\"fild%L %1\", operands); if (! FP_REG_P (operands[0])) { /* fp_pop_level--; */ ! return \"fstp%Q %0\"; } RET; --- 691,707 ---- { rtx xops[2]; ! output_asm_insn (\"push%L0 %1\", operands); operands[1] = AT_SP (SImode); ! output_asm_insn (\"fild%L0 %1\", operands); xops[0] = stack_pointer_rtx; xops[1] = gen_rtx (CONST_INT, VOIDmode, 4); ! output_asm_insn (AS2 (add%L0,%1,%0), xops); } else ! output_asm_insn (\"fild%L0 %1\", operands); if (! FP_REG_P (operands[0])) { /* fp_pop_level--; */ ! return \"fstp%Q0 %0\"; } RET; *************** *** 811,815 **** (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "add%L %2,%0") (define_insn "" --- 811,815 ---- (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "add%L0 %2,%0") (define_insn "" *************** *** 818,822 **** (const_int 1)))] "" ! "inc%W %0") (define_insn "addhi3" --- 818,822 ---- (const_int 1)))] "" ! "inc%W0 %0") (define_insn "addhi3" *************** *** 825,829 **** (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "add%W %2,%0") (define_insn "" --- 825,829 ---- (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "add%W0 %2,%0") (define_insn "" *************** *** 832,836 **** (const_int 1)))] "" ! "inc%B %0") (define_insn "addqi3" --- 832,836 ---- (const_int 1)))] "" ! "inc%B0 %0") (define_insn "addqi3" *************** *** 839,843 **** (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "add%B %2,%0") ;;had "fmF,m" --- 839,843 ---- (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "add%B0 %2,%0") ;;had "fmF,m" *************** *** 866,870 **** (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "sub%L %2,%0") (define_insn "" --- 866,870 ---- (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "sub%L0 %2,%0") (define_insn "" *************** *** 873,877 **** (const_int 1)))] "" ! "dec%W %0") (define_insn "subhi3" --- 873,877 ---- (const_int 1)))] "" ! "dec%W0 %0") (define_insn "subhi3" *************** *** 880,884 **** (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "sub%W %2,%0") (define_insn "" --- 880,884 ---- (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "sub%W0 %2,%0") (define_insn "" *************** *** 887,891 **** (const_int 1)))] "" ! "dec%B %0") (define_insn "subqi3" --- 887,891 ---- (const_int 1)))] "" ! "dec%B0 %0") (define_insn "subqi3" *************** *** 894,898 **** (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "sub%B %2,%0") (define_insn "subdf3" --- 894,898 ---- (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "sub%B0 %2,%0") (define_insn "subdf3" *************** *** 925,930 **** || GET_CODE (operands[2]) == REG)) /* Assembler has weird restrictions. */ ! return AS2 (imul%W,%2,%0); ! return AS3 (imul%W,%2,%1,%0); }") --- 925,930 ---- || GET_CODE (operands[2]) == REG)) /* Assembler has weird restrictions. */ ! return AS2 (imul%W0,%2,%0); ! return AS3 (imul%W0,%2,%1,%0); }") *************** *** 941,946 **** || GET_CODE (operands[2]) == REG)) /* Assembler has weird restrictions. */ ! return AS2 (imul%L,%2,%0); ! return AS3 (imul%L,%2,%1,%0); }") --- 941,946 ---- || GET_CODE (operands[2]) == REG)) /* Assembler has weird restrictions. */ ! return AS2 (imul%L0,%2,%0); ! return AS3 (imul%L0,%2,%1,%0); }") *************** *** 950,954 **** (match_operand:QI "general_operand" "rm")))] "" ! "mul%B %2,%0") (define_insn "umulhi3" --- 950,954 ---- (match_operand:QI "general_operand" "rm")))] "" ! "mul%B0 %2,%0") (define_insn "umulhi3" *************** *** 958,962 **** (clobber (reg:HI 1))] "" ! "mul%W %2,%0") (define_insn "umulsi3" --- 958,962 ---- (clobber (reg:HI 1))] "" ! "mul%W0 %2,%0") (define_insn "umulsi3" *************** *** 966,970 **** (clobber (reg:SI 1))] "" ! "mul%L %2,%0") (define_insn "muldf3" --- 966,970 ---- (clobber (reg:SI 1))] "" ! "mul%L0 %2,%0") (define_insn "muldf3" *************** *** 1010,1014 **** (mod:SI (match_dup 1) (match_dup 2)))] "" ! "cltd\;idiv%L %2") (define_insn "udivmodsi4" --- 1010,1014 ---- (mod:SI (match_dup 1) (match_dup 2)))] "" ! "cltd\;idiv%L0 %2") (define_insn "udivmodsi4" *************** *** 1019,1023 **** (umod:SI (match_dup 1) (match_dup 2)))] "" ! "xor%L %3,%3\;div%L %2") /* --- 1019,1023 ---- (umod:SI (match_dup 1) (match_dup 2)))] "" ! "xor%L0 %3,%3\;div%L0 %2") /* *************** *** 1031,1035 **** (umod:SI (match_dup 1) (match_dup 2)))] "" ! "div%L %2,%0") */ \f --- 1031,1035 ---- (umod:SI (match_dup 1) (match_dup 2)))] "" ! "div%L0 %2,%0") */ \f *************** *** 1044,1048 **** (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "and%L %2,%0") (define_insn "andhi3" --- 1044,1048 ---- (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "and%L0 %2,%0") (define_insn "andhi3" *************** *** 1051,1055 **** (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "and%W %2,%0") (define_insn "andqi3" --- 1051,1055 ---- (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "and%W0 %2,%0") (define_insn "andqi3" *************** *** 1058,1062 **** (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "and%B %2,%0") /* I am nervous about these two.. add them later.. --- 1058,1062 ---- (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "and%B0 %2,%0") /* I am nervous about these two.. add them later.. *************** *** 1070,1074 **** "GET_CODE (operands[2]) == CONST_INT && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (HImode))" ! "and%W %1,%0") (define_insn "" --- 1070,1074 ---- "GET_CODE (operands[2]) == CONST_INT && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (HImode))" ! "and%W0 %1,%0") (define_insn "" *************** *** 1078,1082 **** "GET_CODE (operands[2]) == CONST_INT && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (QImode))" ! "and%L %1,%0") */ --- 1078,1082 ---- "GET_CODE (operands[2]) == CONST_INT && (unsigned int) INTVAL (operands[2]) < (1 << GET_MODE_BITSIZE (QImode))" ! "and%L0 %1,%0") */ *************** *** 1091,1095 **** (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "or%L %2,%0") (define_insn "iorhi3" --- 1091,1095 ---- (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "or%L0 %2,%0") (define_insn "iorhi3" *************** *** 1098,1102 **** (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "or%W %2,%0") (define_insn "iorqi3" --- 1098,1102 ---- (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "or%W0 %2,%0") (define_insn "iorqi3" *************** *** 1105,1109 **** (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "or%B %2,%0") \f ;;- xor instructions --- 1105,1109 ---- (match_operand:QI 2 "general_operand" "qn,qmn")))] "" ! "or%B0 %2,%0") \f ;;- xor instructions *************** *** 1114,1118 **** (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "xor%L %2,%0") (define_insn "xorhi3" --- 1114,1118 ---- (match_operand:SI 2 "general_operand" "ri,rm")))] "" ! "xor%L0 %2,%0") (define_insn "xorhi3" *************** *** 1121,1125 **** (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "xor%W %2,%0") (define_insn "xorqi3" --- 1121,1125 ---- (match_operand:HI 2 "general_operand" "ri,rm")))] "" ! "xor%W0 %2,%0") (define_insn "xorqi3" *************** *** 1128,1132 **** (match_operand:QI 2 "general_operand" "qn")))] "" ! "xor%B %2,%0") \f ;;- negation instructions --- 1128,1132 ---- (match_operand:QI 2 "general_operand" "qn")))] "" ! "xor%B0 %2,%0") \f ;;- negation instructions *************** *** 1135,1139 **** (neg:SI (match_operand:SI 1 "general_operand" "0")))] "" ! "neg%L %0") (define_insn "neghi2" --- 1135,1139 ---- (neg:SI (match_operand:SI 1 "general_operand" "0")))] "" ! "neg%L0 %0") (define_insn "neghi2" *************** *** 1141,1145 **** (neg:HI (match_operand:HI 1 "general_operand" "0")))] "" ! "neg%W %0") (define_insn "negqi2" --- 1141,1145 ---- (neg:HI (match_operand:HI 1 "general_operand" "0")))] "" ! "neg%W0 %0") (define_insn "negqi2" *************** *** 1147,1151 **** (neg:QI (match_operand:QI 1 "general_operand" "0")))] "" ! "neg%B %0") (define_insn "negsf2" --- 1147,1151 ---- (neg:QI (match_operand:QI 1 "general_operand" "0")))] "" ! "neg%B0 %0") (define_insn "negsf2" *************** *** 1180,1184 **** (not:SI (match_operand:SI 1 "general_operand" "0")))] "" ! "not%L %0") (define_insn "one_cmplhi2" --- 1180,1184 ---- (not:SI (match_operand:SI 1 "general_operand" "0")))] "" ! "not%L0 %0") (define_insn "one_cmplhi2" *************** *** 1186,1190 **** (not:HI (match_operand:HI 1 "general_operand" "0")))] "" ! "not%W %0") (define_insn "one_cmplqi2" --- 1186,1190 ---- (not:HI (match_operand:HI 1 "general_operand" "0")))] "" ! "not%W0 %0") (define_insn "one_cmplqi2" *************** *** 1192,1196 **** (not:QI (match_operand:QI 1 "general_operand" "0")))] "" ! "not%B %0") \f ;;- arithmetic shift instructions --- 1192,1196 ---- (not:QI (match_operand:QI 1 "general_operand" "0")))] "" ! "not%B0 %0") \f ;;- arithmetic shift instructions *************** *** 1204,1208 **** { if (REG_P (operands[2])) ! return AS2 (sal%L,%Rcl,%0); else if (REG_P (operands[1]) && GET_CODE (operands[2]) == CONST_INT) switch (INTVAL (operands[2])) --- 1204,1208 ---- { if (REG_P (operands[2])) ! return AS2 (sal%L0,%R0cl,%0); else if (REG_P (operands[1]) && GET_CODE (operands[2]) == CONST_INT) switch (INTVAL (operands[2])) *************** *** 1209,1221 **** { case 1: ! return AS2 (add%L,%1,%1); case 2: CC_STATUS_INIT; ! return \"lea%L (,%1,4),%1\"; case 3: CC_STATUS_INIT; ! return \"lea%L (,%1,8),%1\"; } ! return AS2 (sal%L,%2,%1); }") --- 1209,1221 ---- { case 1: ! return AS2 (add%L0,%1,%1); case 2: CC_STATUS_INIT; ! return \"lea%L0 (,%1,4),%1\"; case 3: CC_STATUS_INIT; ! return \"lea%L0 (,%1,8),%1\"; } ! return AS2 (sal%L0,%2,%1); }") *************** *** 1228,1234 **** { if (REG_P (operands[2])) ! return AS2 (sal%W,%Rcl,%0); else ! return AS2 (sal%W,%2,%1); }") --- 1228,1234 ---- { if (REG_P (operands[2])) ! return AS2 (sal%W0,%R0cl,%0); else ! return AS2 (sal%W0,%2,%1); }") *************** *** 1241,1247 **** { if (REG_P (operands[2])) ! return AS2 (sal%B,%Rcl,%0); else ! return AS2 (sal%B,%2,%1); }") --- 1241,1247 ---- { if (REG_P (operands[2])) ! return AS2 (sal%B0,%R0cl,%0); else ! return AS2 (sal%B0,%2,%1); }") *************** *** 1254,1260 **** { if (REG_P (operands[2])) ! return AS2 (sar%L,%Rcl,%0); else ! return AS2 (sar%L,%2,%0); }") --- 1254,1260 ---- { if (REG_P (operands[2])) ! return AS2 (sar%L0,%R0cl,%0); else ! return AS2 (sar%L0,%2,%0); }") *************** *** 1267,1273 **** { if (REG_P (operands[2])) ! return AS2 (sar%W,%Rcl,%0); else ! return AS2 (sar%W,%2,%0); }") --- 1267,1273 ---- { if (REG_P (operands[2])) ! return AS2 (sar%W0,%R0cl,%0); else ! return AS2 (sar%W0,%2,%0); }") *************** *** 1280,1286 **** { if (REG_P (operands[2])) ! return AS2 (sar%B,%Rcl,%0); return ! AS2 (sar%B,%2,%1); }") \f --- 1280,1286 ---- { if (REG_P (operands[2])) ! return AS2 (sar%B0,%R0cl,%0); return ! AS2 (sar%B0,%2,%1); }") \f *************** *** 1295,1301 **** { if (REG_P (operands[2])) ! return AS2 (shl%L,%Rcl,%0); else ! return AS2 (shl%L,%2,%1); }") --- 1295,1301 ---- { if (REG_P (operands[2])) ! return AS2 (shl%L0,%R0cl,%0); else ! return AS2 (shl%L0,%2,%1); }") *************** *** 1308,1314 **** { if (REG_P (operands[2])) ! return AS2 (shl%W,%Rcl,%0); else ! return AS2 (shl%W,%2,%1); }") --- 1308,1314 ---- { if (REG_P (operands[2])) ! return AS2 (shl%W0,%R0cl,%0); else ! return AS2 (shl%W0,%2,%1); }") *************** *** 1321,1327 **** { if (REG_P (operands[2])) ! return AS2 (shl%B,%Rcl,%0); else ! return AS2 (shl%B,%2,%1); }") --- 1321,1327 ---- { if (REG_P (operands[2])) ! return AS2 (shl%B0,%R0cl,%0); else ! return AS2 (shl%B0,%2,%1); }") *************** *** 1334,1340 **** { if (REG_P (operands[2])) ! return AS2 (shr%L,%Rcl,%0); else ! return AS2 (shr%L,%2,%1); }") --- 1334,1340 ---- { if (REG_P (operands[2])) ! return AS2 (shr%L0,%R0cl,%0); else ! return AS2 (shr%L0,%2,%1); }") *************** *** 1347,1353 **** { if (REG_P (operands[2])) ! return AS2 (shr%W,%%cl,%0); else ! return AS2 (shr%W,%2,%1); }") --- 1347,1353 ---- { if (REG_P (operands[2])) ! return AS2 (shr%W0,%%cl,%0); else ! return AS2 (shr%W0,%2,%1); }") *************** *** 1360,1366 **** { if (REG_P (operands[2])) ! return AS2 (shr%B,%%cl,%0); else ! return AS2 (shr%B,%2,%1); }") \f --- 1360,1366 ---- { if (REG_P (operands[2])) ! return AS2 (shr%B0,%%cl,%0); else ! return AS2 (shr%B0,%2,%1); }") \f *************** *** 1375,1381 **** { if (REG_P (operands[2])) ! return AS2 (rol%L,%%cl,%0); else ! return AS2 (rol%L,%2,%1); }") --- 1375,1381 ---- { if (REG_P (operands[2])) ! return AS2 (rol%L0,%%cl,%0); else ! return AS2 (rol%L0,%2,%1); }") *************** *** 1388,1394 **** { if (REG_P (operands[2])) ! return AS2 (rol%W,%%cl,%0); else ! return AS2 (rol%W,%2,%1); }") --- 1388,1394 ---- { if (REG_P (operands[2])) ! return AS2 (rol%W0,%%cl,%0); else ! return AS2 (rol%W0,%2,%1); }") *************** *** 1401,1407 **** { if (REG_P (operands[2])) ! return AS2 (rol%B,%%cl,%0); else ! return AS2 (rol%B,%2,%1); }") --- 1401,1407 ---- { if (REG_P (operands[2])) ! return AS2 (rol%B0,%%cl,%0); else ! return AS2 (rol%B0,%2,%1); }") *************** *** 1414,1420 **** { if (REG_P (operands[2])) ! return AS2 (ror%L,%%cl,%0); else ! return AS2 (ror%L,%2,%1); }") --- 1414,1420 ---- { if (REG_P (operands[2])) ! return AS2 (ror%L0,%%cl,%0); else ! return AS2 (ror%L0,%2,%1); }") *************** *** 1427,1433 **** { if (REG_P (operands[2])) ! return AS2 (ror%W,%%cl,%0); else ! return AS2 (ror%W,%2,%1); }") --- 1427,1433 ---- { if (REG_P (operands[2])) ! return AS2 (ror%W0,%%cl,%0); else ! return AS2 (ror%W0,%2,%1); }") *************** *** 1440,1446 **** { if (REG_P (operands[2])) ! return AS2 (ror%B,%%cl,%0); else ! return AS2 (ror%B,%2,%1); }") \f --- 1440,1446 ---- { if (REG_P (operands[2])) ! return AS2 (ror%B0,%%cl,%0); else ! return AS2 (ror%B0,%2,%1); }") \f diff -rc2N gcc-1.34/config/m68k.md gcc-1.35/config/m68k.md *** gcc-1.34/config/m68k.md Wed Feb 22 12:31:17 1989 --- gcc-1.35/config/m68k.md Wed Apr 12 22:03:52 1989 *************** *** 365,375 **** ;; A composite of the cmp, cmpa, & cmpi m68000 op codes. (define_insn "cmpsi" [(set (cc0) ! (compare (match_operand:SI 0 "general_operand" "rKs,mr") ! (match_operand:SI 1 "general_operand" "mr,Ksr")))] "" "* { if (REG_P (operands[1]) || (!REG_P (operands[0]) && GET_CODE (operands[0]) != MEM)) --- 365,378 ---- ;; A composite of the cmp, cmpa, & cmpi m68000 op codes. + ;; We use d*a in the constraints because compares with data regs are faster. (define_insn "cmpsi" [(set (cc0) ! (compare (match_operand:SI 0 "general_operand" "rKs,mr,>") ! (match_operand:SI 1 "general_operand" "mr,Ksr,>")))] "" "* { + if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) + return \"cmpm%.l %1,%0\"; if (REG_P (operands[1]) || (!REG_P (operands[0]) && GET_CODE (operands[0]) != MEM)) *************** *** 376,388 **** { cc_status.flags |= CC_REVERSED; #ifdef HPUX_ASM ! return \"cmp%.l %1,%0\"; #else ! return \"cmp%.l %0,%1\"; #endif } #ifdef HPUX_ASM ! return \"cmp%.l %0,%1\"; #else ! return \"cmp%.l %1,%0\"; #endif }") --- 379,391 ---- { cc_status.flags |= CC_REVERSED; #ifdef HPUX_ASM ! return \"cmp%.l %d1,%d0\"; #else ! return \"cmp%.l %d0,%d1\"; #endif } #ifdef HPUX_ASM ! return \"cmp%.l %d0,%d1\"; #else ! return \"cmp%.l %d1,%d0\"; #endif }") *************** *** 390,411 **** (define_insn "cmphi" [(set (cc0) ! (compare (match_operand:HI 0 "general_operand" "rn,mr") ! (match_operand:HI 1 "general_operand" "mr,nr")))] "" "* { ! if (REG_P (operands[1]) || (!REG_P (operands[0]) && GET_CODE (operands[0]) != MEM)) { cc_status.flags |= CC_REVERSED; #ifdef HPUX_ASM ! return \"cmp%.w %1,%0\"; #else ! return \"cmp%.w %0,%1\"; #endif } #ifdef HPUX_ASM ! return \"cmp%.w %0,%1\"; #else ! return \"cmp%.w %1,%0\"; #endif }") --- 393,416 ---- (define_insn "cmphi" [(set (cc0) ! (compare (match_operand:HI 0 "general_operand" "rnm,d,n,m") ! (match_operand:HI 1 "general_operand" "d,rnm,m,n")))] "" "* { ! if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[1]) == MEM) ! return \"cmpm%.w %1,%0\"; ! if ((REG_P (operands[1]) && !ADDRESS_REG_P (operands[1])) || (!REG_P (operands[0]) && GET_CODE (operands[0]) != MEM)) { cc_status.flags |= CC_REVERSED; #ifdef HPUX_ASM ! return \"cmp%.w %d1,%d0\"; #else ! return \"cmp%.w %d0,%d1\"; #endif } #ifdef HPUX_ASM ! return \"cmp%.w %d0,%d1\"; #else ! return \"cmp%.w %d1,%d0\"; #endif }") *************** *** 424,436 **** { cc_status.flags |= CC_REVERSED; #ifdef HPUX_ASM ! return \"cmp%.b %1,%0\"; #else ! return \"cmp%.b %0,%1\"; #endif } #ifdef HPUX_ASM ! return \"cmp%.b %0,%1\"; #else ! return \"cmp%.b %1,%0\"; #endif }") --- 429,441 ---- { cc_status.flags |= CC_REVERSED; #ifdef HPUX_ASM ! return \"cmp%.b %d1,%d0\"; #else ! return \"cmp%.b %d0,%d1\"; #endif } #ifdef HPUX_ASM ! return \"cmp%.b %d0,%d1\"; #else ! return \"cmp%.b %d1,%d0\"; #endif }") *************** *** 794,797 **** --- 799,803 ---- else if (CONSTANT_P (operands[1])) return \"move%.l %1,%0\"; + #ifndef SONY_ASM /* Recognize the insn before a tablejump, one that refers to a table of offsets. Such an insn will need to refer *************** *** 814,822 **** fprintf (asm_out_file, \"\\tset %s%d,.+2\\n\", \"LI\", CODE_LABEL_NUMBER (XEXP (labelref, 0))); ! #else fprintf (asm_out_file, \"\\t.set %s%d,.+2\\n\", \"LI\", CODE_LABEL_NUMBER (XEXP (labelref, 0))); ! #endif ! #else ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"LI\", CODE_LABEL_NUMBER (XEXP (labelref, 0))); --- 820,828 ---- fprintf (asm_out_file, \"\\tset %s%d,.+2\\n\", \"LI\", CODE_LABEL_NUMBER (XEXP (labelref, 0))); ! #else /* not SGS */ fprintf (asm_out_file, \"\\t.set %s%d,.+2\\n\", \"LI\", CODE_LABEL_NUMBER (XEXP (labelref, 0))); ! #endif /* not SGS */ ! #else /* SGS_3B1 or not MOTOROLA */ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"LI\", CODE_LABEL_NUMBER (XEXP (labelref, 0))); *************** *** 824,829 **** LD%n (with value L%n-LI%n) at the end of the switch table. */ RTX_INTEGRATED_P (next_real_insn (XEXP (labelref, 0))) = 1; ! #endif } return \"move%.w %1,%0\"; }") --- 830,836 ---- LD%n (with value L%n-LI%n) at the end of the switch table. */ RTX_INTEGRATED_P (next_real_insn (XEXP (labelref, 0))) = 1; ! #endif /* SGS_3B1 or not MOTOROLA */ } + #endif /* SONY_ASM */ return \"move%.w %1,%0\"; }") *************** *** 2851,2855 **** || (GET_CODE (operands[1]) == CONST_INT && (~ INTVAL (operands[3]) & ((1 << INTVAL (operands[1]))- 1)) == 0))" ! "bfchg %0{%b2:%b1}") (define_insn "" --- 2858,2866 ---- || (GET_CODE (operands[1]) == CONST_INT && (~ INTVAL (operands[3]) & ((1 << INTVAL (operands[1]))- 1)) == 0))" ! "* ! { ! CC_STATUS_INIT; ! return \"bfchg %0{%b2:%b1}\"; ! }") (define_insn "" *************** *** 2859,2863 **** (const_int 0))] "TARGET_68020 && TARGET_BITFIELD" ! "bfclr %0{%b2:%b1}") (define_insn "" --- 2870,2878 ---- (const_int 0))] "TARGET_68020 && TARGET_BITFIELD" ! "* ! { ! CC_STATUS_INIT; ! return \"bfclr %0{%b2:%b1}\"; ! }") (define_insn "" *************** *** 2867,2871 **** (const_int -1))] "TARGET_68020 && TARGET_BITFIELD" ! "bfset %0{%b2:%b1}") (define_insn "insv" --- 2882,2890 ---- (const_int -1))] "TARGET_68020 && TARGET_BITFIELD" ! "* ! { ! CC_STATUS_INIT; ! return \"bfset %0{%b2:%b1}\"; ! }") (define_insn "insv" *************** *** 2902,2906 **** (const_int 0))] "TARGET_68020 && TARGET_BITFIELD" ! "bfclr %0{%b2:%b1}") (define_insn "" --- 2921,2929 ---- (const_int 0))] "TARGET_68020 && TARGET_BITFIELD" ! "* ! { ! CC_STATUS_INIT; ! return \"bfclr %0{%b2:%b1}\"; ! }") (define_insn "" *************** *** 2910,2914 **** (const_int -1))] "TARGET_68020 && TARGET_BITFIELD" ! "bfset %0{%b2:%b1}") (define_insn "" --- 2933,2941 ---- (const_int -1))] "TARGET_68020 && TARGET_BITFIELD" ! "* ! { ! CC_STATUS_INIT; ! return \"bfset %0{%b2:%b1}\"; ! }") (define_insn "" *************** *** 3748,3752 **** rtx xoperands[2]; xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); ! output_asm_insn (\"move%.l %1,%s\", xoperands); output_asm_insn (\"move%.l %1,%-\", operands); return \"fmove%.d %+,%0\"; --- 3775,3779 ---- rtx xoperands[2]; xoperands[1] = gen_rtx (REG, SImode, REGNO (operands[1]) + 1); ! output_asm_insn (\"move%.l %1,%@\", xoperands); output_asm_insn (\"move%.l %1,%-\", operands); return \"fmove%.d %+,%0\"; diff -rc2N gcc-1.34/config/mips.md gcc-1.35/config/mips.md *** gcc-1.34/config/mips.md Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/mips.md Sun Apr 16 23:57:42 1989 *************** *** 0 **** --- 1,2783 ---- + ;; Mips.md Naive version of Machine Description for MIPS + ;; Contributed by A. Lichnewsky, lich@inria.inria.fr + ;; Copyright (C) 1989 Free Software Foundation, Inc. + + ;; This file is part of GNU CC. + + ;; GNU CC is free software; you can redistribute it and/or modify + ;; it under the terms of the GNU General Public License as published by + ;; the Free Software Foundation; either version 1, or (at your option) + ;; any later version. + + ;; GNU CC is distributed in the hope that it will be useful, + ;; but WITHOUT ANY WARRANTY; without even the implied warranty of + ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ;; GNU General Public License for more details. + + ;; You should have received a copy of the GNU General Public License + ;; along with GNU CC; see the file COPYING. If not, write to + ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + + ;; + ;;------------------------------------------------------------------------ + ;; + + \f + ;; + ;; .................... + ;; + ;; ARITHMETIC + ;; + ;; .................... + ;; + + (define_insn "adddf3" + [(set (match_operand:DF 0 "general_operand" "=f") + (plus:DF (match_operand:DF 1 "general_operand" "%f") + (match_operand:DF 2 "general_operand" "f")))] + "" + "* + { + return \"add.d\\t%0,%1,%2\"; + }") + + (define_insn "addsf3" + [(set (match_operand:SF 0 "general_operand" "=f") + (plus:SF (match_operand:SF 1 "general_operand" "%f") + (match_operand:SF 2 "general_operand" "f")))] + "" + "* + { + return \"add.s\\t%0,%1,%2\"; + }") + + (define_insn "addsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (plus:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "general_operand" "rIJ")))] + "" + "* + { if(GET_CODE(operands[2])==CONST_INT) + { if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'I')) + { return \"addi%u\\t%0,%1,%x2\\t#addsi3\\t%1,%d2 -> %0\"; + } + else if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'J')) + return \"add%u\\t%0,%1,$0\\t#addsi3\\t%1,%2 -> %0\"; + else return \"ERROR op2 not zero \\t#addsi3\\t%1,%2 -> %0\"; + } + else + return \"add%u\\t%0,%1,%2\\t#addsi3\\t%1,%2 -> %0\"; + }") + + (define_insn "addhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (plus:HI (match_operand:HI 1 "general_operand" "%r") + (match_operand:HI 2 "general_operand" "r")))] + "" + "* + { return \"add%u\\t%0,%1,%2\\t#addhi3 %1,%2 -> %0\"; + + }") + + (define_insn "addqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (plus:QI (match_operand:QI 1 "general_operand" "%r") + (match_operand:QI 2 "general_operand" "r")))] + "" + "* + { return \"add%u\\t%0,%1,%2\\t#addqi3 %1,%2 -> %0\"; + + }") + \f + ;;- All kinds of subtract instructions. + + (define_insn "subdf3" + [(set (match_operand:DF 0 "general_operand" "=f") + (minus:DF (match_operand:DF 1 "general_operand" "f") + (match_operand:DF 2 "general_operand" "f")))] + "" + "* + { + return \"sub.d\\t%0,%1,%2\"; + }") + + (define_insn "subsf3" + [(set (match_operand:SF 0 "general_operand" "=f") + (minus:SF (match_operand:SF 1 "general_operand" "f") + (match_operand:SF 2 "general_operand" "f")))] + "" + "* + { + return \"sub.s\\t%0,%1,%2\"; + }") + + (define_insn "subsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (minus:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "general_operand" "rIJ")))] + "" + "* + { if(GET_CODE(operands[2])==CONST_INT) + { if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'I')) + { rtx ops[4]; + ops[0]=operands[0]; + ops[1]=operands[1]; + ops[3]=operands[2]; + ops[2]=gen_rtx(CONST_INT,VOIDmode,-INTVAL(operands[2])); + output_asm_insn( \"addi%u\\t%0,%1,%x2\\t#subsi3\\t%1,%d3 -> %0\" + ,ops); + return \"\"; + } + else if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'J')) + return \"sub%u\\t%0,%1,$0\\t#subsi3\\t%1,%2 -> %0\"; + else return \"ERROR op2 not zero \\t#subsi3\\t%1,%2 -> %0\"; + } + else + return \"sub%u\\t%0,%1,%2\\t#subsi3 %1,%2 -> %0\"; + }") + + (define_insn "subhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (minus:HI (match_operand:HI 1 "general_operand" "r") + (match_operand:HI 2 "general_operand" "r")))] + "" + "* + { return \"sub%u\\t%0,%1,%2\\t#subhi3 %1,%2 -> %0\"; + }") + + (define_insn "subqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (minus:QI (match_operand:QI 1 "general_operand" "r") + (match_operand:QI 2 "general_operand" "r")))] + "" + "* + { return \"sub%u\\t%0,%1,%2\\t#subqi3 %1,%2 -> %0\"; + }") + \f + ;;- Multiply instructions. + + (define_insn "muldf3" + [(set (match_operand:DF 0 "general_operand" "=f") + (mult:DF (match_operand:DF 1 "general_operand" "%f") + (match_operand:DF 2 "general_operand" "f")))] + "" + "* + { return \"mul.d\\t%0,%1,%2\"; + }") + + (define_insn "mulsf3" + [(set (match_operand:SF 0 "general_operand" "=f") + (mult:SF (match_operand:SF 1 "general_operand" "%f") + (match_operand:SF 2 "general_operand" "f")))] + "" + "* + { return \"mul.s\\t%0,%1,%2\"; + }") + + (define_insn "mulsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (mult:SI (match_operand:SI 1 "general_operand" "%r") + (match_operand:SI 2 "general_operand" "r")))] + "" + "* + { return \"mul\\t%0,%1,%2\\t#mulsi3 %1,%2 -> %0\"; + }") + + (define_insn "mulhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (mult:HI (match_operand:HI 1 "general_operand" "%r") + (match_operand:HI 2 "general_operand" "r")))] + "" + "* + { return \"mul\\t%0,%1,%2\\t#mulhi3 %1,%2 -> %0\"; + }") + + (define_insn "mulqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (mult:QI (match_operand:QI 1 "general_operand" "%r") + (match_operand:QI 2 "general_operand" "r")))] + "" + "* + { return \"mul\\t%0,%1,%2\\t#mulhi3 %1,%2 -> %0\"; + }") + \f + ;;- Divide instructions. + + (define_insn "divdf3" + [(set (match_operand:DF 0 "general_operand" "=f") + (div:DF (match_operand:DF 1 "general_operand" "f") + (match_operand:DF 2 "general_operand" "f")))] + "" + "* + { return \"div.d\\t%0,\\t%1,%2\"; + }") + + (define_insn "divsf3" + [(set (match_operand:SF 0 "general_operand" "=f") + (div:SF (match_operand:SF 1 "general_operand" "f") + (match_operand:SF 2 "general_operand" "f")))] + "" + "* + { return \"div.s\\t%0,%1,%2\"; + }") + + (define_insn "divsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (div:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "general_operand" "r")))] + "" + "* + { return \"div\\t%0,%1,%2\\t#divsi3 %1,%2 -> %0\"; + }") + + (define_insn "divhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (div:HI (match_operand:HI 1 "general_operand" "r") + (match_operand:HI 2 "general_operand" "r")))] + "" + "* + { return \"div\\t%0,%1,%2\\t#divhi3 %1,%2 -> %0\"; + }") + + (define_insn "divqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (div:QI (match_operand:QI 1 "general_operand" "r") + (match_operand:QI 2 "general_operand" "r")))] + "" + "* + { return \"div\\t%0,%1,%2\\t#divqi3 %1,%2 -> %0\"; + }") + \f + ;; + ;; .................... + ;; + ;; LOGICAL + ;; + ;; .................... + ;; + (define_insn "anddi3" + [(set (match_operand:DI 0 "general_operand" "=r") + (and:DI (match_operand:DI 1 "general_operand" "r") + (match_operand:DI 2 "general_operand" "r")))] + "" + "* + {rtx xops[3]; + if( (REGNO(operands[0]) != (REGNO(operands[1]) +1)) + && + (REGNO(operands[0]) != (REGNO(operands[2]) +1))) + { /* TAKE CARE OF OVERLAPS */ + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + xops[2] = gen_rtx(REG,SImode,REGNO(operands[2])); + output_asm_insn(\"and\\t%0,%1,%2\\t#anddi %1,%2 -> %0\",xops); + xops[0] = gen_rtx(REG,SImode, REGNO(xops[0])+1); + xops[1] = gen_rtx(REG,SImode, REGNO(xops[1])+1); + xops[2] = gen_rtx(REG,SImode, REGNO(xops[2])+1); + output_asm_insn(\"and\\t%0,%1,%2\\t#anddi %1,%2 -> %0\",xops); + } + else + abort(); + return \"\"; } + " + ) + + (define_insn "andsi3" + [(set (match_operand:SI 0 "general_operand" "=r,&r") + (and:SI (match_operand:SI 1 "general_operand" "r,r") + (match_operand:SI 2 "general_operand" "rJ,I")))] + "" + "* + { rtx xops[3]; + if(GET_CODE(operands[2])==CONST_INT) + { if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'I')) + if(INTVAL(operands[2]) >= 0) + { return \"andi\\t%0,%1,%x2\\t#andsi3\\t%1,%d2 -> %0\"; + } + else + { xops[0]= operands[0]; + xops[1]= operands[1];; + xops[2]= gen_rtx(CONST_INT,VOIDmode, + (INTVAL(operands[2]))>>16); + output_asm_insn(\"lui\\t%0,%x2\\t#load higher part (andsi3)\", + xops); + xops[2]= gen_rtx(CONST_INT,VOIDmode, + 0xffff & (INTVAL(operands[2]))); + output_asm_insn(\"addi%u\\t%0,$0,%x2\\t#load lower part (andsi3)\", + xops); + output_asm_insn(\"and\\t%0,%0,%1\\t#andsi3\",xops); + return \"\"; + } + else if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'J')) + return \"and\\t%0,%1,$0\\t#andsi3\\t%1,%2 -> %0\"; + else return \"ERROR op2 not zero \\t#andsi3\\t%1,%2 -> %0\"; + } + else + return \"and\\t%0,%1,%2\\t#andsi3\\t%1,%2 -> %0\"; + }") + + (define_insn "andhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (and:HI (match_operand:HI 1 "general_operand" "%r") + (match_operand:HI 2 "general_operand" "r")))] + "" + "* + { return \"and\\t%0,%1,%2\\t#andhi3 %1,%2 -> %0\"; + + }") + + (define_insn "andqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (and:QI (match_operand:QI 1 "general_operand" "%r") + (match_operand:QI 2 "general_operand" "r")))] + "" + "* + { return \"and\\t%0,%1,%2\\t#andqi3 %1,%2 -> %0\"; + + }") + (define_insn "iordi3" + [(set (match_operand:DI 0 "general_operand" "=r") + (ior:DI (match_operand:DI 1 "general_operand" "r") + (match_operand:DI 2 "general_operand" "r")))] + "" + "* + {rtx xops[3]; + if( (REGNO(operands[0]) != (REGNO(operands[1]) +1)) + && + (REGNO(operands[0]) != (REGNO(operands[2]) +1))) + { /* TAKE CARE OF OVERLAPS */ + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + xops[2] = gen_rtx(REG,SImode,REGNO(operands[2])); + output_asm_insn(\"or\\t%0,%1,%2\\t#iordi3 %1,%2 -> %0\",xops); + xops[0] = gen_rtx(REG,SImode, REGNO(xops[0])+1); + xops[1] = gen_rtx(REG,SImode, REGNO(xops[1])+1); + xops[2] = gen_rtx(REG,SImode, REGNO(xops[2])+1); + output_asm_insn(\"or\\t%0,%1,%2\\t#iordi3 %1,%2 -> %0\",xops); + } + else + abort(); + return \"\"; } + " + ) + + (define_insn "iorsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (ior:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "general_operand" "rIJ")))] + "" + "* + { if(GET_CODE(operands[2])==CONST_INT) + { if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'I')) + { return \"ori\\t%0,%1,%x2\\t#iorsi3\\t%1,%d2 -> %0\"; + } + else if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'J')) + return \"or\\t%0,%1,$0\\t#iorsi3\\t%1,%2 -> %0\"; + else return \"ERROR op2 not zero \\t#iorsi3\\t%1,%2 -> %0\"; + } + else + return \"or\\t%0,%1,%2\\t#iorsi3\\t%1,%2 -> %0\"; + }") + + (define_insn "iorhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (ior:HI (match_operand:HI 1 "general_operand" "%r") + (match_operand:HI 2 "general_operand" "r")))] + "" + "* + { return \"or\\t%0,%1,%2\\t#iorhi3 %1,%2 -> %0\"; + + }") + + (define_insn "iorqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (ior:QI (match_operand:QI 1 "general_operand" "%r") + (match_operand:QI 2 "general_operand" "r")))] + "" + "* + { return \"or\\t%0,%1,%2\\t#iorqi3 %1,%2 -> %0\"; + + }") + (define_insn "xordi3" + [(set (match_operand:DI 0 "general_operand" "=r") + (xor:DI (match_operand:DI 1 "general_operand" "r") + (match_operand:DI 2 "general_operand" "r")))] + "" + "* + {rtx xops[3]; + if( (REGNO(operands[0]) != (REGNO(operands[1]) +1)) + && + (REGNO(operands[0]) != (REGNO(operands[2]) +1))) + { /* TAKE CARE OF OVERLAPS */ + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + xops[2] = gen_rtx(REG,SImode,REGNO(operands[2])); + output_asm_insn(\"xor\\t%0,%1,%2\\t#xordi3 %1,%2 -> %0\",xops); + xops[0] = gen_rtx(REG,SImode, REGNO(xops[0])+1); + xops[1] = gen_rtx(REG,SImode, REGNO(xops[1])+1); + xops[2] = gen_rtx(REG,SImode, REGNO(xops[2])+1); + output_asm_insn(\"xor\\t%0,%1,%2\\t#xordi3 %1,%2 -> %0\",xops); + } + else + abort(); + return \"\"; } + " + ) + + (define_insn "xorsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (xor:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "general_operand" "rIJ")))] + "" + "* + { if(GET_CODE(operands[2])==CONST_INT) + { if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'I')) + { return \"xori\\t%0,%1,%x2\\t#xorsi3\\t%1,%d2 -> %0\"; + } + else if (CONST_OK_FOR_LETTER_P(INTVAL(operands[2]),'J')) + return \"xor\\t%0,%1,$0\\t#xorsi3\\t%1,%2 -> %0\"; + else return \"ERROR op2 not zero \\t#xorsi3\\t%1,%2 -> %0\"; + } + else + return \"xor\\t%0,%1,%2\\t#xorsi3\\t%1,%2 -> %0\"; + }") + + (define_insn "xorhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (xor:HI (match_operand:HI 1 "general_operand" "%r") + (match_operand:HI 2 "general_operand" "r")))] + "" + "* + { return \"xor\\t%0,%1,%2\\t#xorhi3 %1,%2 -> %0\"; + + }") + + (define_insn "xorqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (xor:QI (match_operand:QI 1 "general_operand" "%r") + (match_operand:QI 2 "general_operand" "r")))] + "" + "* + { return \"xor\\t%0,%1,%2\\t#xorqi3 %1,%2 -> %0\"; + + }") + \f + ;; + ;; .................... + ;; + ;; TRUNCATION + ;; + ;; .................... + + ;; Extension and truncation insns. + ;; Those for integer source operand + ;; are ordered widest source type first. + + ;; CHARACTERS ARE CONSIDERED UNSIGNED + ;; --------------- cf. tm.h --------- + + (define_insn "truncsiqi2" + [(set (match_operand:QI 0 "general_operand" "=r") + (truncate:QI (match_operand:SI 1 "general_operand" "r")))] + "" + "* + if (DEFAULT_SIGNED_CHAR) + return \"ERROR(SIGNED CHAR)\\tandi\\t%0,%1,0xff\\t#truncsiqi2\\t %1 -> %0\"; + else + return \"andi\\t%0,%1,0xff\\t#truncsiqi2\\t %1 -> %0\";" + ) + (define_insn "" + [(set (match_operand:QI 0 "general_operand" "=r,r") + (subreg:QI (match_operand:SI 1 "general_operand" "r,*m") 0))] + "" + "* + if (GET_CODE(operands[1]) == MEM) + { rtx nops[3]; + nops[0]= operands[0]; + nops[2]=operands[1]; + nops[1]= addr_compensate(operands[1], QImode, SImode,0); + output_asm_insn(\"lbu\\t%0,%1\\t#(subreg:QI %1 0)->%0\",nops); + return \"\"; + } + else + if (DEFAULT_SIGNED_CHAR) + return \"ERROR(SIGNED CHAR)\\tandi\\t%0,%1,0xff\\t#subreg truncsiqi2\\t %1 -> %0\"; + else + return \"andi\\t%0,%1,0xff\\t#subreg truncsiqi2\\t %1 -> %0\";" + ) + + (define_insn "truncsihi2" + [(set (match_operand:HI 0 "general_operand" "=r") + (truncate:HI (match_operand:SI 1 "general_operand" "r")))] + "" + "* + output_asm_insn(\"sll\\t%0,%1,0x10\\t#truncsihi2\\t %1 -> %0\", + operands); + return \"sra\\t%0,%0,0x10\\t#truncsihi2\\t %1 -> %0\"; + ") + + (define_insn "" + [(set (match_operand:HI 0 "general_operand" "=r") + (subreg:HI (match_operand:SI 1 "general_operand" "r") 0))] + "" + "* + output_asm_insn(\"sll\\t%0,%1,0x10\\t#subreg truncsihi2\\t %1 -> %0\", + operands); + return \"sra\\t%0,%0,0x10\\t#subreg truncsihi2\\t %1 -> %0\"; + ") + + (define_insn "trunchiqi2" + [(set (match_operand:QI 0 "general_operand" "=r") + (truncate:QI (match_operand:HI 1 "general_operand" "r")))] + "" + "* + if (DEFAULT_SIGNED_CHAR) + return \"ERROR(SIGNED CHAR)\\tandi\\t%0,%1,0xff\\t#trunchiqi2\\t %1 -> %0\"; + else + return \"andi\\t%0,%1,0xff\\t#trunchiqi2\\t %1 -> %0\";") + + (define_insn "" + [(set (match_operand:QI 0 "general_operand" "=r") + (subreg:QI (match_operand:HI 1 "general_operand" "r") 0))] + "" + "* + if (DEFAULT_SIGNED_CHAR) + return \"ERROR(SIGNED CHAR)\\tandi\\t%0,%1,0xff\\t#subreg trunchiqi2\\t %1 -> %0\"; + else + return \"andi\\t%0,%1,0xff\\t#subreg trunchiqi2\\t %1 -> %0\";") + + + (define_insn "truncdfsf2" + [(set (match_operand:SF 0 "general_operand" "=f") + (float_truncate:SF (match_operand:DF 1 "general_operand" "f")))] + "" + "cvt.s.d\\t%0,%1\\t#truncdfsf2\\t %1 -> %0") + + + + \f + ;; + ;; .................... + ;; + ;; ZERO EXTENSION + ;; + ;; .................... + + ;; Extension insns. + ;; Those for integer source operand + ;; are ordered widest source type first. + + ;; CHARACTERS ARE CONSIDERED UNSIGNED + ;; --------------- cf. tm.h --------- + + (define_insn "zero_extendhisi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (zero_extend:SI (match_operand:HI 1 "general_operand" "r")))] + "" + "* + output_asm_insn(\"sll\\t%0,%1,0x10\\t#zero_extendhisi2\\t %1 -> %0\", + operands); + return \"srl\\t%0,%0,0x10\\t#zero_extendhisi2\\t %1 -> %0\"; + " + ) + + (define_insn "zero_extendqihi2" + [(set (match_operand:HI 0 "general_operand" "=r") + (zero_extend:HI (match_operand:QI 1 "general_operand" "r")))] + "" + "* + output_asm_insn(\"sll\\t%0,%1,0x18\\t#zero_extendqihi2\\t %1 -> %0\", + operands); + return \"srl\\t%0,%0,0x18\\t#zero_extendqihi2\\t %1 -> %0\"; + " + ) + + + (define_insn "zero_extendqisi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (zero_extend:SI (match_operand:QI 1 "general_operand" "r")))] + "" + "* + return \"andi\\t%0,%1,0xff\\t#zero_extendqisi2\\t %1 -> %0\"; + " + ) + + \f + ;; + ;; .................... + ;; + ;; SIGN EXTENSION + ;; + ;; .................... + + ;; Extension insns. + ;; Those for integer source operand + ;; are ordered widest source type first. + + ;; CHARACTERS ARE CONSIDERED UNSIGNED + ;; --------------- cf. tm.h --------- + + (define_insn "extendhisi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (sign_extend:SI (match_operand:HI 1 "general_operand" "r")))] + "" + "* + output_asm_insn(\"sll\\t%0,%1,0x10\\t#extendhisi2\\t %1 -> %0\", + operands); + return \"sra\\t%0,%0,0x10\\t#extendhisi2\\t %1 -> %0\"; + " + ) + + (define_insn "extendqihi2" + [(set (match_operand:HI 0 "general_operand" "=r") + (sign_extend:HI (match_operand:QI 1 "general_operand" "r")))] + "" + "* + output_asm_insn(\"sll\\t%0,%1,0x18\\t#extendqihi2\\t %1 -> %0\", + operands); + return \"sra\\t%0,%0,0x18\\t#extendqihi2\\t %1 -> %0\"; + " + ) + + + (define_insn "extendqisi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (sign_extend:SI (match_operand:QI 1 "general_operand" "r")))] + "" + "* + output_asm_insn(\"sll\\t%0,%1,0x18\\t#extendqisi2\\t %1 -> %0\", + operands); + return \"sra\\t%0,%0,0x18\\t#extendqisi2\\t %1 -> %0\"; + " + ) + + + (define_insn "extendsfdf2" + [(set (match_operand:DF 0 "general_operand" "=f") + (float_extend:DF (match_operand:SF 1 "general_operand" "f")))] + "" + "* + return \"cvt.d.s\\t%0,%1\\t#extendsfdf2\\t %1 -> %0\"; + " + ) + \f + + ;; + ;; .................... + ;; + ;; CONVERSIONS + ;; + ;; .................... + (define_insn "fix_truncdfsi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (fix:SI (fix:DF (match_operand:DF 1 "general_operand" "f")))) + (clobber (reg:DF 44))] + "" + "cvt.w.d\\t$f12,%1\\t#fix_truncdfsi2\\t%1 -> %0\;mfc1\\t%0,$f12\\t#fix_truncdfsi2\\t%1 -> %0" + ) + + (define_insn "fix_truncsfsi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (fix:SI (fix:SF (match_operand:SF 1 "general_operand" "f")))) + (clobber (reg:DF 44))] + "" + "cvt.w.s\\t $f12,%1\\t#fix_truncsfsi2\\t%1 -> %0\;mfc1\\t%0,$f12\\t#fix_truncsfsi2\\t%1 -> %0" + ) + (define_insn "floatsidf2" + [(set (match_operand:DF 0 "general_operand" "=f") + (float:DF (match_operand:SI 1 "general_operand" "r")))] + "" + "mtc1\\t%1,%0\\t#floatsidf2\\t%1 -> %0\;cvt.d.w\\t%0,%0\\t#floatsidf2\\t%1 -> %0" + ) + (define_insn "floatsisf2" + [(set (match_operand:SF 0 "general_operand" "=f") + (float:SF (match_operand:SI 1 "general_operand" "r")))] + "" + "mtc1\\t%1,%0\\t#floatsisf2\\t%1 -> %0\;cvt.s.w\\t%0,%0\\t#floatsisf2\\t%1 -> %0" + ) + \f + ;;- Wild things used when + ;;- unions make double and int + ;;- overlap. + ;;- + ;;- This must be supported + ;;- since corresponding code + ;;- gets generated + + (define_insn "" + [(set (subreg:DF + (match_operand:DI 0 "register_operand" "=ry") + 0) + (match_operand:DF 1 "register_operand" "rf")) + (clobber (match_operand 2 "register_operand" "rf"))] + "" + "* + {rtx xops[2]; + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> (subreg:DF %0 0) \\t likely Union\" + ,xops); + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> (subreg:DF %0 0) \" + ,xops); + return(\"\"); + } + " + ) + + (define_insn "" + [(set (subreg:DF + (match_operand:DI 0 "register_operand" "=ry") + 0) + (match_operand:DF 1 "register_operand" "rf"))] + "" + "* + {rtx xops[2]; + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> (subreg:DF %0 0) \\t likely Union\" + ,xops); + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> (subreg:DF %0 0) \" + ,xops); + return(\"\"); + } + " + ) + + (define_insn "" + [(set (match_operand:DF 0 "register_operand" "=rf") + (subreg:DF + (match_operand:DI 1 "register_operand" "ry") + 0) + ) + (clobber (match_operand 2 "register_operand" "rf"))] + "" + "* + {rtx xops[2]; + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# (subreg:DF %1) -> %0 \\t\" + ,xops); + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# (subreg:DF %1) -> %0 \\t\" + ,xops); + return(\"\"); + } + " + ) + + (define_insn "" + [(set (match_operand:DF 0 "register_operand" "=rf") + (subreg:DF + (match_operand:DI 1 "register_operand" "ry") + 0) + )] + "" + "* + {rtx xops[2]; + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# (subreg:DF %1) -> %0 \\t\" + ,xops); + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# (subreg:DF %1) -> %0 \\t\" + ,xops); + + return(\"\"); + } + " + ) + + \f + ;; + ;; .................... + ;; + ;; MOVES + ;; + ;; and + ;; + ;; LOADS AND STORES + ;; + ;; .................... + + (define_insn "movdi" + [(set (match_operand:DI 0 "general_operand" "=r,*r,*m") + (match_operand:DI 1 "general_operand" "r,*m,*r"))] + "" + "* + { extern rtx change_address(); + extern rtx plus_constant(); + + if( which_alternative == 0) + {rtx xops[2]; + if(REGNO(operands[0]) != (REGNO(operands[1]) +1)) + { /* TAKE CARE OF OVERLAPS */ + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + output_asm_insn(\"add%u\\t%0,$0,%1\\t#movdi %1 -> %0\",xops); + xops[0] = gen_rtx(REG,SImode, REGNO(xops[0])+1); + xops[1] = gen_rtx(REG,SImode, REGNO(xops[1])+1); + output_asm_insn(\"add%u\\t%0,$0,%1\\t#movdi %1 -> %0\",xops); + } + else + { /* TAKE CARE OF OVERLAPS */ + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])+1); + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + output_asm_insn(\"add%u\\t%0,$0,%1\\t#movdi %1 -> %0\",xops); + xops[0] = gen_rtx(REG,SImode, REGNO(xops[0])-1); + xops[1] = gen_rtx(REG,SImode, REGNO(xops[1])-1); + output_asm_insn(\"add%u\\t%0,$0,%1\\t#movdi %1 -> %0\",xops); + } + return \"\"; } + else if(which_alternative == 1) + { /* No overlap here */ + rtx xops[2]; + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + if (GET_CODE(operands[1]) == MEM) + xops[1] = gen_rtx(MEM,SImode,XEXP(operands[1],0)); + else abort(); + output_asm_insn(\"lw\\t%0,%1\\t#movdi %1(mem) -> %0\",xops); + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])+1); + /* See change_address in emit-rtl.c */ + /* See plus_constant in explow.c */ + if (GET_CODE(operands[1]) == MEM) + xops[1] = change_address(operands[1],SImode, + plus_constant(XEXP(operands[1],0),4)); + else abort(); + output_asm_insn(\"lw\\t%0,%1\\t#movdi %1(mem) -> %0\",xops); + return \"\"; + } + else + { /* No overlap here */ + rtx xops[2]; + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + if (GET_CODE(operands[0]) == MEM) + xops[0] = gen_rtx(MEM,SImode,XEXP(operands[0],0)); + else abort(); + output_asm_insn(\"sw\\t%1,%0\\t#movdi %1 -> %0(mem)\",xops); + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + /* See change_address in emit-rtl.c */ + /* See plus_constant in explow.c */ + if (GET_CODE(operands[0]) == MEM) + xops[0] = change_address(operands[0],SImode, + plus_constant(XEXP(operands[0],0),4)); + else abort(); + output_asm_insn(\"sw\\t%1,%0\\t#movdi %1 -> %0 (mem)\",xops); + return \"\"; + } + } + " + ) + + (define_insn "movsi" + [(set (match_operand:SI 0 "general_operand" "=r,r,m,r") + (match_operand:SI 1 "general_operand" "r,m,r,i"))] + "" + "* + { if ((GET_CODE (operands[0]) == REG) && (GET_CODE (operands[1]) == REG)) + { return \"add%u\\t%0,$0,%1\\t#movsi\\t%1 -> %0 \";} + else + {if ((GET_CODE (operands[0]) == REG ) + && + (GET_CODE (operands[1]) == CONST_INT)) + { rtx xops[3]; + xops[0] = operands[0]; + xops[2] = gen_rtx(CONST_INT,VOIDmode, + INTVAL(operands[1])); + + if ( ((INTVAL(operands[1]))>>16) + && ((INTVAL(operands[1])) & 0xffff)) + {if(!( (-INTVAL(operands[1]))>>16)) + { xops[1] = gen_rtx(CONST_INT,VOIDmode, + (INTVAL(operands[1])) & 0xffff); + output_asm_insn(\"addi%u\\t%0,$0,%x1\\t#movsi low part of %2\", + xops); + } + else + { + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (INTVAL(operands[1]))>>16); + output_asm_insn(\"lui\\t%0,%x1\\t#movsi high part of %2\",xops); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (INTVAL(operands[1])) & 0xffff); + output_asm_insn(\"ori\\t%0,%x1\\t#movsi low part of %2\",xops); + }} + else + if ((INTVAL(operands[1]))>>16) + { xops[1] = gen_rtx(CONST_INT,VOIDmode, + (INTVAL(operands[1]))>>16); + output_asm_insn(\"lui\\t%0,%x1\\t#movsi high part of %2\",xops); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (INTVAL(operands[1])) & 0xffff); + } + else + { + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (INTVAL(operands[1])) & 0xffff); + output_asm_insn(\"ori\\t%0,$0,%x1\\t#movsi low part of %2\", + xops); + } + return \"\"; + } + else + if (GET_CODE (operands[0]) == REG ) + {if ( (GET_CODE(operands[1]) == SYMBOL_REF) + ||(GET_CODE(operands[1]) == LABEL_REF) + ) + {return \"la\\t%0,%1\\t#movsi %1 -> %0\";} + else + {if (GET_CODE(operands[1]) == CONST) + {return \"la\\t%0,%1\\t#movsi %1(AExp) -> %0\";} + else + {return \"lw\\t%0,%1\\t#movsi %1 -> %0\";}}} + else + { + return \"sw\\t%1,%0\\t#movsi %1 -> %0\";}} + }") + + (define_insn "movhi" + [(set (match_operand:HI 0 "general_operand" "=r,r,m,r") + (match_operand:HI 1 "general_operand" "r,m,r,i"))] + "" + "* + + { if((GET_CODE (operands[0]) == REG) && (GET_CODE (operands[1]) == REG)) + { return \"add%u\\t%0,$0,%1\\t#move.h %1 -> %0 \"; + } + else + {if ((GET_CODE (operands[0]) == REG ) + && + (GET_CODE (operands[1]) == CONST_INT)) + { + return \"addi%u\\t%0,$0,%x1\\t# movhi %1 -> %0\"; + } + else + {if (GET_CODE (operands[0]) == REG) + {return \"lh\\t%0,%1\\t#movhi %1 -> %0\";} + else + {return \"sh\\t%1,%0\\t#movhi %1 -> %0\";}}} + }") + + + (define_insn "movqi" + [(set (match_operand:QI 0 "general_operand" "=r,r,m,r") + (match_operand:QI 1 "general_operand" "r,m,r,i"))] + "" + "* + { if ((GET_CODE (operands[0]) == REG) && (GET_CODE (operands[1]) == REG)) + { return \"add%u\\t%0,$0,%1\\t#move.b %1 -> %0 \"; + } + {if ((GET_CODE (operands[0]) == REG ) + && + (GET_CODE (operands[1]) == CONST_INT)) + { + return \"addi%u\\t%0,$0,%x1\\t# movqi %1 -> %0\"; + } + + /* Should say that I am not padding high order ;; + ** bits correctly + */ + else + {if (GET_CODE (operands[0]) == REG) + {return \"lbu\\t%0,%1\\t#movqi %1 -> %0\";} + else + {return \"sb\\t%1,%0\\t#movqi %1 -> %0\";}}} + }") + + \f + + (define_insn "movsf" + [(set (match_operand:SF 0 "general_operand" "=f,f,m,f") + (match_operand:SF 1 "general_operand" "f,m,f,F")) + (clobber (reg:SI 24))] + "" + "* + { if ((GET_CODE (operands[0]) == REG) && (GET_CODE (operands[1]) == REG)) + { return \"mov.s %0,%1\\t#movsf %1 -> %0 \"; + } + {if ((GET_CODE (operands[0]) == REG ) + && + (GET_CODE (operands[1]) == CONST_DOUBLE)) + { rtx xops[3]; + xops[0] = operands[0]; + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],0))>>16); + xops[2] = gen_rtx(CONST_INT,VOIDmode, + XINT(operands[1],0)); + output_asm_insn(\"lui\\t$24,%x1\\t#move high part of %2\",xops); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],0)) & 0xff); + output_asm_insn(\"ori\\t$24,%x1\\t#move low part of %2\",xops); + output_asm_insn(\"mtc1\\t$24,%0\",xops); + + xops[0] = gen_rtx(REG,SFmode, REGNO(xops[0])+1); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],1))>>16); + xops[2] = gen_rtx(CONST_INT,VOIDmode, + XINT(operands[1],1)); + output_asm_insn(\"lui\\t$24,%x1\\t#move high part of %2\",xops); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],1)) & 0xff); + output_asm_insn(\"ori\\t$24,%x1\\t#move low part of %2\",xops); + + output_asm_insn(\"mtc1\\t$24,%0\",xops); + return \"cvt.s.d\\t %0,%0 \"; + } + /* Should say that I am not padding high order ;; + ** bits correctly + */ + else + {if (GET_CODE (operands[0]) == REG) + {return \"l.s\\t %0,%1\\t#movsf %1 -> %0\";} + else + {return \"s.s\\t %1,%0\\t#movsf %1 -> %0\";}}} + }") + + ;; --- + + (define_insn "movdf" + [(set (match_operand:DF 0 "general_operand" "=f,f,m,f,*f,*y") + (match_operand:DF 1 "general_operand" "f,m,f,F,*y,*f")) + (clobber (reg:SI 24))] + "" + "* if(which_alternative >3) + {rtx xops[2]; + if(REGNO(operands[1]) == 6) + { + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + return(\"\"); + } + else + if(REGNO(operands[0]) == 6) + { + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + return(\"\"); + } + else {abort_with_insn(insn, + \"Matched *y constraint and register number wrong\");} + } + else + { if ((GET_CODE (operands[0]) == REG) && (GET_CODE (operands[1]) == REG)) + { return \"mov.d\\t%0,%1\\t#movdf %1 -> %0 \"; + } + {if ((GET_CODE (operands[0]) == REG ) + && + (GET_CODE (operands[1]) == CONST_DOUBLE)) + { rtx xops[3]; + xops[0] = operands[0]; + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],0))>>16); + xops[2] = gen_rtx(CONST_INT,VOIDmode, + XINT(operands[1],0)); + output_asm_insn(\"lui\\t$24,%x1\\t#move high part of %2\",xops); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],0)) & 0xff); + output_asm_insn(\"ori\\t$24,%x1\\t#move low part of %2\",xops); + output_asm_insn(\"mtc1\\t%0,$24\",xops); + + xops[0] = gen_rtx(REG,SFmode, REGNO(xops[0])+1); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],1))>>16); + xops[2] = gen_rtx(CONST_INT,VOIDmode, + XINT(operands[1],1)); + output_asm_insn(\"lui\\t$24,%x1\\t#move high part of %2\",xops); + xops[1] = gen_rtx(CONST_INT,VOIDmode, + (XINT(operands[1],1)) & 0xff); + output_asm_insn(\"ori\\t$24,%x1\\t#move low part of %2\",xops); + + output_asm_insn(\"mtc1\\t%0,$24\",xops); + return \"# \"; + + } + else + {if (GET_CODE (operands[0]) == REG) + {return \"l.d\\t %0,%1\\t#movdf %1 -> %0\";} + else + {return \"s.d\\t %1,%0\\t#movdf %1 -> %0\";}}} + }") + + (define_insn "" + [(set (match_operand:SF 0 "general_operand" "=f,f,m") + (match_operand:SF 1 "general_operand" "f,m,f")) + ] + "" + "* + { if ((GET_CODE (operands[0]) == REG) && (GET_CODE (operands[1]) == REG)) + { return \"mov.s %0,%1\\t#movsf %1 -> %0 \"; + } + {if (GET_CODE (operands[0]) == REG) + {return \"l.s\\t %0,%1\\t#movsf %1 -> %0\";} + else + {return \"s.s\\t %1,%0\\t#movsf %1 -> %0\";}} + }") + + ;; --- + + (define_insn "" + [(set (match_operand:DF 0 "general_operand" "=f,f,m,*f,*y") + (match_operand:DF 1 "general_operand" "f,m,f,*y,*f")) + ] + "" + "* + if(which_alternative >2) + {rtx xops[2]; + if(REGNO(operands[1]) == 6) + { + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + xops[0] = gen_rtx(REG,DFmode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mtc1\\t%1,%0\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + return(\"\"); + } + else + if(REGNO(operands[0]) == 6) + { + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])+1); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + xops[0] = gen_rtx(REG,SImode,REGNO(operands[0])+1); + #ifndef DECSTATION + xops[1] = gen_rtx(REG,DFmode,REGNO(operands[1])); + #else + xops[1] = gen_rtx(REG,SImode,REGNO(operands[1])+1); + #endif + output_asm_insn(\"mfc1\\t%0,%1\\t# %1 -> %0 \\tcalling sequence trick\" + ,xops); + return(\"\"); + } + else {abort_with_insn(insn, + \"Matched *y constraint and register number wrong\");} + } + else + { if ((GET_CODE (operands[0]) == REG) && (GET_CODE (operands[1]) == REG)) + { return \"mov.d\\t%0,%1\\t#movdf %1 -> %0 \"; + } + {if (GET_CODE (operands[0]) == REG) + {return \"l.d\\t %0,%1\\t#movdf %1 -> %0\";} + else + {return \"s.d\\t %1,%0\\t#movdf %1 -> %0\";}} + }") + + \f + (define_insn "" + [(set (match_operand:SI 0 "general_operand" "=r") + (match_operand:QI 1 "general_operand" "r"))] + "" + "* + return \"andi\\t%0,%1,0xff\\t#Wild zero_extendqisi2\\t %1 -> %0\"; + " + ) + + + + \f + ;; + ;; .................... + ;; + ;; OTHER ARITHMETIC AND SHIFT + ;; + ;; .................... + + (define_insn "ashlqi3" + [(set (match_operand:QI 0 "general_operand" "=r") + (ashift:QI (match_operand:QI 1 "general_operand" "r") + (match_operand:SI 2 "arith32_operand" "ri")))] + "" + "* + { + if (GET_CODE (operands[2]) == CONST_INT) + {operands[2]=gen_rtx(CONST_INT,VOIDmode,(XINT(operands[2],0))& 0x1f); + output_asm_insn(\"sll\\t%0,%1,%2\\t#ashlqi3\\t (%1<<%2) -> %0\",operands); + } + else + output_asm_insn(\"sll\\t%0,%1,%2\\t#ashlqi3\\t (%1<<%2) -> %0 (asm syntax)\", + operands); + return \"andi\\t%0,%0,0xff\\t#ashlqi3\"; + }") + + (define_insn "ashlhi3" + [(set (match_operand:HI 0 "general_operand" "=r") + (ashift:HI (match_operand:HI 1 "general_operand" "r") + (match_operand:SI 2 "arith32_operand" "ri")))] + "" + "* + { + if (GET_CODE (operands[2]) == CONST_INT) + {operands[2]=gen_rtx(CONST_INT,VOIDmode,(XINT(operands[2],0))& 0x1f); + output_asm_insn( \"sll\\t%0,%1,%2\\t#ashlhi3\\t (%1<<%2) -> %0\", + operands); + } + else + output_asm_insn( \"sll\\t%0,%1,%2\\t#ashlhi3\\t (%1<<%2) -> %0 (asm syntax)\", + operands); + return \"sll\\t%0,%0,0x10\;sra\\t%0,%0,0x10\\t#ashlhi3\"; + }") + + (define_insn "ashlsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (ashift:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "arith32_operand" "ri")))] + "" + "* + { + if (GET_CODE (operands[2]) == CONST_INT) + {operands[2]=gen_rtx(CONST_INT,VOIDmode,(XINT(operands[2],0))& 0x1f); + return \"sll\\t%0,%1,%2\\t#ashlsi3\\t (%1<<%2) -> %0\"; + } + return \"sll\\t%0,%1,%2\\t#ashlsi3\\t (%1<<%2) -> %0 (asm syntax)\"; + }") + + (define_insn "ashrsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (ashiftrt:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "arith32_operand" "ri")))] + "" + "* + { + if (GET_CODE (operands[2]) == CONST_INT) + {operands[2]=gen_rtx(CONST_INT,VOIDmode,(XINT(operands[2],0))& 0x1f); + return \"sra\\t%0,%1,%2\\t#ashrsi3\\t (%1>>%2) -> %0\"; + } + return \"sra\\t%0,%1,%2\\t#ashrsi3\\t (%1>>%2) -> %0 (asm syntax for srav)\"; + }") + + (define_insn "lshrsi3" + [(set (match_operand:SI 0 "general_operand" "=r") + (lshiftrt:SI (match_operand:SI 1 "general_operand" "r") + (match_operand:SI 2 "arith32_operand" "rn")))] + "" + "* + { + if (GET_CODE (operands[2]) == CONST_INT) + {operands[2]=gen_rtx(CONST_INT,VOIDmode,(XINT(operands[2],0))& 0x1f); + return \"srl\\t%0,%1,%2\\t#lshrsi3\\t (%1>>%2) -> %0\"; + } + return \"srl\\t%0,%1,%2\\t#lshrsi3\\t (%1>>%2) -> %0 (asm syntax)\"; + }") + + + (define_insn "negsi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (neg:SI (match_operand:SI 1 "arith_operand" "r")))] + "" + "sub%u\\t%0,$0,%1\\t#negsi2") + + + (define_insn "negdf2" + [(set (match_operand:DF 0 "general_operand" "=f") + (neg:DF (match_operand:DF 1 "general_operand" "f")))] + "" + "neg.d\\t%0,%1\\t#negdf2") + + (define_insn "negsf2" + + [(set (match_operand:SF 0 "general_operand" "=f") + (neg:SF (match_operand:SF 1 "general_operand" "f")))] + "" + "neg.s\\t%0,%1\\t#negsf2") + + + (define_insn "one_cmplsi2" + [(set (match_operand:SI 0 "general_operand" "=r") + (not:SI (match_operand:SI 1 "arith_operand" "r")))] + "" + "nor\\t%0,$0,%1\\t#one_cmplsi2") + + (define_insn "one_cmplhi2" + [(set (match_operand:HI 0 "general_operand" "=r") + (not:HI (match_operand:HI 1 "arith_operand" "r")))] + "" + "nor\\t%0,$0,%1\\t#one_cmplhi2") + + (define_insn "one_cmplqi2" + [(set (match_operand:QI 0 "general_operand" "=r") + (not:QI (match_operand:QI 1 "arith_operand" "r")))] + "" + "nor\\t%0,$0,%1\\t#one_cmplqi2") + + + \f + ;; + ;; .................... + ;; + ;; BRANCHES + ;; + ;; .................... + + + ;;- MERGED CMPSI + BEQ + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "beq \\t%0,%1,%l2\\t#beq MIPS primitive insn") + + ;;- MERGED CMPSI + INV BEQ + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "beq \\t%0,%1,%l2\\t#beq inverted primitive insn") + ;;- MERGED CMPSI + BNE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "bne \\t%0,%1,%l2\\t#bne MIPS primitive insn") + + ;;- MERGED CMPSI + INV BNE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "bne \\t%0,%1,%l2\\t#bne inverted primitive insn") + + ;;- MERGED CMPSI + BGT + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "bgt \\t%0,%1,%l2\\t#bgt MIPS composite insn") + + ;;- MERGED CMPSI + INV BGT + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "bgt \\t%0,%1,%l2\\t#bgt inverted composite insn") + ;;- MERGED CMPSI + BLT + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "blt \\t%0,%1,%l2\\t#blt MIPS composite insn") + + ;;- MERGED CMPSI + INV BLT + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "blt \\t%0,%1,%l2\\t#blt inverted composite insn") + ;;- MERGED CMPSI + BGE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "bge \\t%0,%1,%l2\\t#bge composite insn") + + ;;- MERGED CMPSI + INV BGE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "bge \\t%0,%1,%l2\\t#bge inverted composite insn") + ;;- MERGED CMPSI + BLE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "ble \\t%0,%1,%l2\\t#ble composite insn") + + ;;- MERGED CMPSI + INV BLE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "ble \\t%0,%1,%l2\\t#ble inverted composite insn") + + \f + ;;- MERGED CMPSI + BGT + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (gtu (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "bgtu \\t%0,%1,%l2\\t#bgtu MIPS composite insn") + + ;;- MERGED CMPSI + INV BGT + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (leu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "bgtu \\t%0,%1,%l2\\t#bgtu inverted composite insn") + ;;- MERGED CMPSI + INV BLTU + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (geu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "blt \\t%0,%1,%l2\\t#blt inverted composite insn") + ;;- MERGED CMPSI + BGEU + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (geu (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "bgeu \\t%0,%1,%l2\\t#bgeu composite insn") + + ;;- MERGED CMPSI + INV BGEU + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (ltu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "bgeu \\t%0,%1,%l2\\t#bgeu inverted composite insn") + ;;- MERGED CMPSI + BLE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (leu (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "bleu \\t%0,%1,%l2\\t#bleu composite insn") + + ;;- MERGED CMPSI + INV BLE + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (gtu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "bleu \\t%0,%1,%l2\\t#bleu inverted composite insn") + ;;- MERGED CMPSI + BLTU + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (ltu (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "bltu \\t%0,%1,%l2\\t#bltu MIPS composite insn") + + ;;- MERGED CMPSI + INV BLTU + (define_peephole + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r"))) + (set (pc) + (if_then_else (geu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "bltu \\t%0,%1,%l2\\t#bltu inverted composite insn") + \f + ;;- FLOATING POINT CASES + ;;- -------------------- + + ;;- MERGED CMPSF + BEQ + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.eq.s\\t%0,%1\\t# Merged CMPSF + BEQ \;bc1t\\t%l2\\t# Merged CMPSF + BEQ ") + + ;;- MERGED CMPSF + INV BEQ + + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.eq.s\\t%0,%1\\t# Merged CMPSF + BEQ \;bc1t\\t%l2\\t# Merged CMPSF + BEQ ") + + ;;- MERGED CMPSF + BNE + + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.eq.s\\t%0,%1\\t# Merged CMPSF + BNE \;bc1f\\t%l2\\t# Merged CMPSF + BNE ") + + ;;- MERGED CMPSF + INV BNE + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.eq.s\\t%0,%1\\t# Merged CMPSF + I.BNE \;bc1f\\t%l2\\t# Merged CMPSF +I.BNE ") + + ;;- MERGED CMPSF + BGT + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.le.s\\t%1,%0\\t# Merged CMPSF + BGT \;bc1f\\t%l2\\t# Merged CMPSF + BGT ") + + ;;- MERGED CMPSF + INV BGT + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.le.s\\t%0,%1\\t# Merged CMPSF + I.BGT \;bc1f\\t%l2\\t# Merged CMPSF +I. BGT ") + + ;;- MERGED CMPSF + BLT + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.lt.s\\t%0,%1\\t# Merged CMPSF + BLT \;bc1t\\t%l2\\t# Merged CMPSF + BLT ") + + ;;- MERGED CMPSF + INV BLT + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.lt.s\\t%0,%1\\t# Merged CMPSF + I.BLT \;bc1t\\t%l2\\t# Merged CMPSF + I.BLT ") + + ;;- MERGED CMPSF + BGE + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.lt.s\\t%0,%1\\t# Merged CMPSF + BGE \;bc1f\\t%l2\\t# Merged CMPSF + BGE") + + ;;- MERGED CMPSF + INV BGE + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.lt.s\\t%0,%1\\t# Merged CMPSF +INV BGE \;bc1f\\t%l2\\t# Merged CMPSF +INV BGE ") + ;;- MERGED CMPSF + BLE + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.le.s\\t%0,%1\\t# Merged CMPSF + BLE \;bc1t\\t%l2\\t# Merged CMPSF + BLE ") + + ;;- MERGED CMPSF + INV BLE + (define_peephole + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.le.s\\t%0,%1\\t# Merged CMPSF + INV BLE \;bc1t\\t%l2\\t# Merged CMPSF +I. BLE") + + ;;- DOUBLE FLOATING POINT CASES + ;;- -------------------- + + ;;- MERGED CMPDF + BEQ + + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.eq.d\\t%0,%1\\t# Merged CMPDF + BEQ \;bc1t\\t%l2\\t# Merged CMPDF + BEQ ") + + ;;- MERGED CMPDF + INV BEQ + + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.eq.d\\t%0,%1\\t# Merged CMPDF + I.BEQ \;bc1t\\t%l2\\t# Merged CMPDF +I. BEQ ") + + ;;- MERGED CMPDF + BNE + + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.eq.d\\t%0,%1\\t# Merged CMPDF + BNE \;bc1f\\t%l2\\t# Merged CMPDF + BNE ") + + ;;- MERGED CMPDF + INV BNE + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.eq.d\\t%0,%1\\t# Merged CMPDF +I. BNE \;bc1f\\t%l2\\t# Merged CMPDF +I BNE") + + ;;- MERGED CMPDF + BGT + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.le.d\\t%0,%1\\t# Merged CMPDF + BGT \;bc1f\\t%l2\\t# Merged CMPDF + BGT ") + + ;;- MERGED CMPDF + INV BGT + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.le.d\\t%0,%1\\t# Merged CMPDF + I. BGT \;bc1f\\t%l2\\t# Merged CMPDF + I. BGT ") + + ;;- MERGED CMPDF + BLT + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.lt.d\\t%0,%1\\t# Merged CMPDF + BLT \;bc1t\\t%l2\\t# Merged CMPDF + BLT ") + + ;;- MERGED CMPDF + INV BLT + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.lt.d\\t%0,%1\\t# Merged CMPDF + I.BLT \;bc1t\\t%l2\\t# Merged CMPDF + I.BLT") + + ;;- MERGED CMPDF + BGE + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.lt.d\\t%0,%1\\t# Merged CMPDF + BGE \;bc1f\\t%l2\\t# Merged CMPDF + BGE") + + ;;- MERGED CMPDF + INV BGE + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.lt.d\\t%0,%1\\t# Merged CMPDF +I. BGE \;bc1f\\t%l2\\t# Merged CMPDF +I. BGE") + ;;- MERGED CMPDF + BLE + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (label_ref (match_operand 2 "" "")) + (pc))) + ] + "" + "c.le.d\\t%0,%1\\t# Merged CMPDF + BLE \;bc1t\\t%l2\\t# Merged CMPDF + BLE ") + + ;;- MERGED CMPDF + INV BLE + (define_peephole + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f"))) + (set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 2 "" "")) + )) + ] + "" + "c.le.d\\t%0,%1\\t# Merged CMPDF +I. BLE \;bc1t\\t%l2\\t# Merged CMPDF + I.BLE ") + + + + \f + ;; + ;; .................... + ;; + ;; COMPARISONS + ;; + ;; .................... + + ;;- Order is significant here + ;;- because there are untyped + ;;- comparisons generated by + ;;- the optimizer + ;;- (set (cc0) + ;;- (compare (const_int 2) + ;;- (const_int 1))) + + (define_insn "cmpsi" + [(set (cc0) + (compare (match_operand:SI 0 "general_operand" "r") + (match_operand:SI 1 "general_operand" "r")))] + "" + "* + compare_collect(SImode,operands[0],operands[1]); + return \" #\\tcmpsi\\t%0,%1\"; + ") + + (define_insn "cmphi" + [(set (cc0) + (compare (match_operand:HI 0 "general_operand" "r") + (match_operand:HI 1 "general_operand" "r")))] + "" + "* + compare_collect(HImode,operands[0],operands[1]); + return \" #\\tcmphi\\t%0,%1\"; + ") + + (define_insn "cmpqi" + [(set (cc0) + (compare (match_operand:QI 0 "general_operand" "r") + (match_operand:QI 1 "general_operand" "r")))] + "" + "* + compare_collect(QImode,operands[0],operands[1]); + return \" #\\tcmpqi\\t%0,%1\"; + ") + + (define_insn "cmpdf" + [(set (cc0) + (compare (match_operand:DF 0 "general_operand" "f") + (match_operand:DF 1 "general_operand" "f")))] + "" + "* + compare_collect(DFmode,operands[0],operands[1]); + return \" #\\tcmpdf\\t%0,%1\" ; + ") + + + (define_insn "cmpsf" + [(set (cc0) + (compare (match_operand:SF 0 "general_operand" "f") + (match_operand:SF 1 "general_operand" "f")))] + "" + "* + compare_collect(SFmode,operands[0],operands[1]); + return \" #\\tcmpsf\\t%0,%1\" ; + ") + + + (define_insn "" + [(set (cc0) + (match_operand:QI 0 "general_operand" "r")) + ] + "" + "* + compare_collect(QImode,operands[0],gen_rtx(REG,QImode,0)); + return \" #\\t(set (cc0)\\t%0)\"; + ") + (define_insn "" + [(set (cc0) + (match_operand:HI 0 "general_operand" "r")) + ] + "" + "* + compare_collect(HImode,operands[0],gen_rtx(REG,HImode,0)); + return \" #\\t(set (cc0)\\t%0)\"; + " + ) + (define_insn "" + [(set (cc0) + (match_operand:SI 0 "general_operand" "r")) + ] + "" + "* + compare_collect(SImode,operands[0],gen_rtx(REG,SImode,0)); + return \" #\\t(set (cc0)\\t%0)\"; + " + ) + \f + ;; + ;; .................... + ;; + ;; BRANCHES + ;; + ;; .................... + \f + (define_insn "jump" + [(set (pc) + (label_ref (match_operand 0 "" "")))] + "" + "* + if (GET_CODE(operands[0]) == REG) + return \"j\\t%%0\\t#jump %l0 (jr not asm syntax)\"; + else return \"j\\t%l0\\t#jump %l0\"; + ") + + + (define_insn "beq" + [(set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.eq.d\\t%0,%1\\t#beq\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#beq\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.eq.s\\t%0,%1\\t#beq\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#beq\", br_ops); + } + else { output_asm_insn(\"beq\\t%0,%1,%2\\t#beq\", br_ops); + } + return \"\"; + } + ") + + (define_insn "bne" + [(set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.eq.d\\t%0,%1\\t#bne\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bne\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.eq.s\\t%0,%1\\t#bne\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bne\", br_ops); + } + else { output_asm_insn(\"bne\\t%0,%1,%2\\t#bne\", br_ops); + } + return \"\"; + } + + ") + + (define_insn "bgt" + [(set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#bgt branch %0 > %1\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgt\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#bgt branch %0 > %1\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgt\", br_ops); + } + else { output_asm_insn(\"bgt\\t%0,%1,%2\\t#bgt\", br_ops); + } + return \"\"; + } + + ") + + (define_insn "blt" + [(set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#blt\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#blt\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#blt\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#blt\", br_ops); + } + else { output_asm_insn(\"blt\\t%0,%1,%2\\t#blt\", br_ops); + } + return \" #\\tblt \\t%l0\\t#blt\"; + } + ") + \f + (define_insn "bgtu" + [(set (pc) + (if_then_else (gtu (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#bgtu\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgtu\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#bgtu\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgtu\", br_ops); + } + else { output_asm_insn(\"bgtu\\t%0,%1,%2\\t#bgtu\", br_ops); + } + return \" #\\tbgtu \\t%l0\\t#bgtu\"; + } + + ") + + (define_insn "bltu" + [(set (pc) + (if_then_else (ltu (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#bltu\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#bltu\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#bltu\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#bltu\", br_ops); + } + else { output_asm_insn(\"bltu\\t%0,%1,%2\\t#bltu\", br_ops); + } + return \"\"; + } + ") + + (define_insn "bge" + [(set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#bge\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bge\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#bge\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bge\", br_ops); + } + else { output_asm_insn(\"bge\\t%0,%1,%2\\t#bge\", br_ops); + } + return \"\"; + } + ") + + (define_insn "bgeu" + [(set (pc) + (if_then_else (geu (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#bgeu\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgeu\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#bgeu\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgeu\", br_ops); + } + else { output_asm_insn(\"bgeu\\t%0,%1,%2\\t#bgeu\", br_ops); + } + return \"\"; + } + ") + + (define_insn "ble" + [(set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#ble\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#ble\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#ble\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#ble\", br_ops); + } + else { output_asm_insn(\"ble\\t%0,%1,%2\\t#ble\", br_ops); + } + return \"\"; + } + ") + (define_insn "bleu" + [(set (pc) + (if_then_else (leu (cc0) + (const_int 0)) + (label_ref (match_operand 0 "" "")) + (pc)))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#ble\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#ble\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#ble\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#ble\", br_ops); + } + else { output_asm_insn(\"bleu\\t%0,%1,%2\\t#bleu\", br_ops); + } + return \" #\\tbleu \\t%l0\\t#bleu\"; + } + ") + + + \f + + (define_insn "" + [(set (pc) + (if_then_else (ne (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.eq.d\\t%0,%1\\t#beq\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#beq\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.eq.s\\t%0,%1\\t#beq\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#beq\", br_ops); + } + else { output_asm_insn(\"beq\\t%0,%1,%2\\t#beq Inv.\", br_ops); + } + return \"\"; + } + ") + + (define_insn "" + [(set (pc) + (if_then_else (eq (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.eq.d\\t%0,%1\\t#bne\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bne\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.eq.s\\t%0,%1\\t#bne\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#beq\", br_ops); + } + else { output_asm_insn(\"bne\\t%0,%1,%2\\t#bne Inv.\", br_ops); + } + return \"\"; + } + + ") + + (define_insn "" + [(set (pc) + (if_then_else (le (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#bgt\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#beq\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#bgt\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#beq\", br_ops); + } + else { output_asm_insn(\"bgt\\t%0,%1,%2\\t#bgt Inv.\", br_ops); + } + return \"\"; + } + ") + (define_insn "" + [(set (pc) + (if_then_else (leu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#bgt\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#beq\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#bgt\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#beq\", br_ops); + } + else { output_asm_insn(\"bgtu\\t%0,%1,%2\\t#bgtu Inv.\", br_ops); + } + return \" #\\tbgtu \\t%l0\\t#bgtu\"; + } + ") + + (define_insn "" + [(set (pc) + (if_then_else (ge (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#blt\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#beq\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#blt\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#beq\", br_ops); + } + else { output_asm_insn(\"blt\\t%0,%1,%2\\t#blt Inv.\", br_ops); + } + return \"\"; + } + ") + + (define_insn "" + [(set (pc) + (if_then_else (geu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#bltu\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#bltu\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#bltu\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#bltu\", br_ops); + } + else { output_asm_insn(\"bltu\\t%0,%1,%2\\t#bltu Inv.\", br_ops); + } + return \" #\\tbltu \\t%l0\\t#bltu\"; + } + ") + + (define_insn "" + [(set (pc) + (if_then_else (lt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#bge\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bge (DF) Inv.\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#bge\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bge (SF) Inv.\", br_ops); + } + else { output_asm_insn(\"bge\\t%0,%1,%2\\t#bge Inv.\", br_ops); + } + return \"\"; + } + ") + (define_insn "" + [(set (pc) + (if_then_else (ltu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.lt.d\\t%0,%1\\t#bge\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgeu (DF) Inv.\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.lt.s\\t%0,%1\\t#bge\", br_ops); + output_asm_insn(\"bc1f\\t%2\\t#bgeu (SF )Inv.\", br_ops); + } + else { output_asm_insn(\"bgeu\\t%0,%1,%2\\t#bgeu Inv.\", br_ops); + } + return \" #\\tbgeu \\t%l0\\t#bgeu\"; + } + ") + + (define_insn "" + [(set (pc) + (if_then_else (gt (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#ble\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#ble\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#ble\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#ble\", br_ops); + } + else { output_asm_insn(\"ble\\t%0,%1,%2\\t#ble Inv.\", br_ops); + } + return \"\"; + } + ") + (define_insn "" + [(set (pc) + (if_then_else (gtu (cc0) + (const_int 0)) + (pc) + (label_ref (match_operand 0 "" "")) + ))] + "" + "* + {rtx br_ops[3]; + enum machine_mode mode; + compare_restore(br_ops, &mode, insn); + br_ops[2] = operands[0]; + if ( mode == DFmode) + {output_asm_insn(\"c.le.d\\t%0,%1\\t#bleu\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#bleu\", br_ops); + } + else if (mode == SFmode) + { output_asm_insn(\"c.le.s\\t%0,%1\\t#bleu\", br_ops); + output_asm_insn(\"bc1t\\t%2\\t#bleu\", br_ops); + } + else { output_asm_insn(\"bleu\\t%0,%1,%2\\t#bleu Inv.\", br_ops); + } + return \"\"; + } + ") + + (define_insn "tablejump" + [(set (pc) + (match_operand:SI 0 "general_operand" "r")) + (use (label_ref (match_operand 1 "" ""))) + ] + "" + "j\\t%0\\t# tablejump, label %l1\\t(jr not asm syntax)") + + \f + ;; + ;; .................... + ;; + ;; LINKAGE + ;; + ;; .................... + + (define_insn "call" + [(call (match_operand 0 "general_operand" "g") + (match_operand 1 "general_operand" "g")) + (clobber (reg:SI 31))] + "" + "* if(GET_CODE(XEXP(operands[0],0)) == SYMBOL_REF) + return \"jal\\t%0\\t# call with %1 arguments\"; + else { operands[0] = XEXP(operands[0],0); + return \"jal\\t$31,%0\\t# call with %1 arguments (reg)\"; + } + " ) + + + (define_expand "call_value" + [(set (match_operand 0 "" "rf") + (call (match_operand:SI 1 "memory_operand" "m") + (match_operand 2 "" "i"))) + (clobber (reg:SI 31))] + ;; operand 3 is next_arg_register + "" + " + { + rtx fn_rtx, nregs_rtx; + rtvec vec; + + fn_rtx = operands[1]; + + nregs_rtx = const0_rtx; + + + vec = gen_rtvec (2, + gen_rtx (SET, VOIDmode, operands[0], + gen_rtx (CALL, VOIDmode, fn_rtx, nregs_rtx)), + gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, SImode, 31))); + + emit_call_insn (gen_rtx (PARALLEL, VOIDmode, vec)); + DONE; + }") + + + (define_insn "" + [(set (match_operand 0 "general_operand" "g,f") + (call (match_operand 1 "general_operand" "g,g") + (match_operand 2 "general_operand" "g,g"))) + (clobber (match_operand 3 "general_operand" "g,g"))] + "" + "* if(GET_CODE(XEXP(operands[1],0)) == SYMBOL_REF) + return \"jal\\t%1\\t# call %1 regle 2-call (VOIDmode)\"; + else { operands[1] = XEXP(operands[1],0); + return \"jal\\t$31,%1\\t# call %1 regle 2-call (VOIDmode,reg)\"; + } + ") + + ;;- RETURN == BRANCH TO EPILOGUE + ;;-- (define_insn "return" + ;;-- [(return) + ;;-- (use (reg:SI 31))] + ;;-- "" + ;;-- "#\\t\\t ---- return") + \f + ;; + ;;- Local variables: + ;;- mode:emacs-lisp + ;;- comment-start: ";;- " + ;;- eval: (set-syntax-table (copy-sequence (syntax-table))) + ;;- eval: (modify-syntax-entry ?[ "(]") + ;;- eval: (modify-syntax-entry ?] ")[") + ;;- eval: (modify-syntax-entry ?{ "(}") + ;;- eval: (modify-syntax-entry ?} "){") + ;;- End: + diff -rc2N gcc-1.34/config/ns32k.md gcc-1.35/config/ns32k.md *** gcc-1.34/config/ns32k.md Wed Feb 22 12:31:11 1989 --- gcc-1.35/config/ns32k.md Sat Apr 1 23:14:30 1989 *************** *** 1347,1358 **** "* output_shift_insn (operands);") - (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=g") - (ashift:SI (match_operand:SI 1 "general_operand" "0") - (and:SI (match_operand:SI 2 "general_operand" "rmn") - (const_int 31))))] - "" - "ashd %2,%0") - (define_insn "ashlhi3" [(set (match_operand:HI 0 "general_operand" "=g") --- 1347,1350 ---- *************** *** 1420,1431 **** (lshift:SI (match_operand:SI 1 "general_operand" "0") (match_operand:SI 2 "general_operand" "rmn")))] - "" - "lshd %2,%0") - - (define_insn "" - [(set (match_operand:SI 0 "general_operand" "=g") - (lshift:SI (match_operand:SI 1 "general_operand" "0") - (and:SI (match_operand:SI 2 "general_operand" "rmn") - (const_int 31))))] "" "lshd %2,%0") --- 1412,1415 ---- diff -rc2N gcc-1.34/config/out-alliant.c gcc-1.35/config/out-alliant.c *** gcc-1.34/config/out-alliant.c Wed Feb 22 12:22:26 1989 --- gcc-1.35/config/out-alliant.c Wed Mar 29 15:26:58 1989 *************** *** 150,157 **** if (optype0 == MEMOP) ! addreg0 = find_addr_reg (operands[0]); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (operands[1]); /* Ok, we can do one word at a time. --- 150,157 ---- if (optype0 == MEMOP) ! addreg0 = find_addr_reg (XEXP (operands[0], 0)); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (XEXP (operands[1], 0)); /* Ok, we can do one word at a time. *************** *** 262,275 **** if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); } if (GET_CODE (addr) == REG) return addr; ! return 0; } \f --- 262,277 ---- if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! else if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); + else + abort (); } if (GET_CODE (addr) == REG) return addr; ! abort (); } \f diff -rc2N gcc-1.34/config/out-i386.c gcc-1.35/config/out-i386.c *** gcc-1.34/config/out-i386.c Wed Feb 22 11:56:22 1989 --- gcc-1.35/config/out-i386.c Mon Apr 10 05:19:28 1989 *************** *** 71,75 **** /* handle case of call where op0/op1 is "=mf" and opn is "mrf" eg. fadd */ ! #define FP_CALL(op, rev, n) fp_call_internal (op, rev, n, operands, insn); static char * --- 71,76 ---- /* handle case of call where op0/op1 is "=mf" and opn is "mrf" eg. fadd */ ! #define FP_CALL(op, rev, n) \ ! return fp_call_internal (op, rev, n, operands, insn); static char * *************** *** 109,113 **** GET_MODE_SIZE (GET_MODE (operands[n]))); output_asm_insn (op, operands + n); ! output_asm_insn (AS2 (add%L,%1,%0), xops); } else --- 110,114 ---- GET_MODE_SIZE (GET_MODE (operands[n]))); output_asm_insn (op, operands + n); ! output_asm_insn (AS2 (add%L0,%1,%0), xops); } else *************** *** 173,179 **** rtx xops[1]; xops[0] = gen_rtx (REG, SImode, REGNO (x) + 1); ! output_asm_insn ("push%L %0", xops); } ! output_asm_insn ("push%L %0", &x); } \f --- 174,180 ---- rtx xops[1]; xops[0] = gen_rtx (REG, SImode, REGNO (x) + 1); ! output_asm_insn ("push%L0 %0", xops); } ! output_asm_insn ("push%L0 %0", &x); } \f *************** *** 191,200 **** xoperands[1] = AT_SP (Pmode); xoperands[2] = gen_rtx (CONST_INT, VOIDmode, -4); ! output_asm_insn (AS2 (add%L,%2,%0), xoperands); ! output_asm_insn ("fst%S %1", xoperands); ! output_asm_insn ("pop%L %0", &target); } else if (GET_CODE (target) == MEM) ! output_asm_insn ("fst%S %0", &target); } --- 192,201 ---- xoperands[1] = AT_SP (Pmode); xoperands[2] = gen_rtx (CONST_INT, VOIDmode, -4); ! output_asm_insn (AS2 (add%L0,%2,%0), xoperands); ! output_asm_insn ("fst%S0 %1", xoperands); ! output_asm_insn ("pop%L0 %0", &target); } else if (GET_CODE (target) == MEM) ! output_asm_insn ("fst%S0 %0", &target); } *************** *** 212,218 **** xoperands[1] = AT_SP (Pmode); xoperands[2] = gen_rtx (CONST_INT, VOIDmode, -4); ! output_asm_insn (AS2 (add%L,%2,%0), xoperands); ! output_asm_insn ("fstp%S %1", xoperands); ! output_asm_insn ("pop%L %0", &target); /* fp_pop_level--; */ } --- 213,219 ---- xoperands[1] = AT_SP (Pmode); xoperands[2] = gen_rtx (CONST_INT, VOIDmode, -4); ! output_asm_insn (AS2 (add%L0,%2,%0), xoperands); ! output_asm_insn ("fstp%S0 %1", xoperands); ! output_asm_insn ("pop%L0 %0", &target); /* fp_pop_level--; */ } *************** *** 220,224 **** { /* fp_pop_level--; */ ! output_asm_insn ("fstp%S %0", &target); } else abort (); --- 221,225 ---- { /* fp_pop_level--; */ ! output_asm_insn ("fstp%S0 %0", &target); } else abort (); *************** *** 238,248 **** xoperands[2] = AT_SP (Pmode); xoperands[3] = gen_rtx (CONST_INT, VOIDmode, -8); ! output_asm_insn (AS2 (add%L,%3,%0), xoperands); ! output_asm_insn ("fst%Q %2", xoperands); ! output_asm_insn ("pop%L %0", &target); ! output_asm_insn ("pop%L %1", xoperands); } else if (GET_CODE (target) == MEM) ! output_asm_insn ("fst%Q %0", &target); } --- 239,249 ---- xoperands[2] = AT_SP (Pmode); xoperands[3] = gen_rtx (CONST_INT, VOIDmode, -8); ! output_asm_insn (AS2 (add%L0,%3,%0), xoperands); ! output_asm_insn ("fst%Q0 %2", xoperands); ! output_asm_insn ("pop%L0 %0", &target); ! output_asm_insn ("pop%L0 %1", xoperands); } else if (GET_CODE (target) == MEM) ! output_asm_insn ("fst%Q0 %0", &target); } *************** *** 260,268 **** xoperands[2] = AT_SP (Pmode); xoperands[3] = gen_rtx (CONST_INT, VOIDmode, -8); ! output_asm_insn (AS2 (add%L,%3,%0), xoperands); /* fp_pop_level--; */ ! output_asm_insn ("fstp%Q %2", xoperands); ! output_asm_insn ("pop%L %0", &target); ! output_asm_insn ("pop%L %1", xoperands); } else if (GET_CODE (target) == MEM) --- 261,269 ---- xoperands[2] = AT_SP (Pmode); xoperands[3] = gen_rtx (CONST_INT, VOIDmode, -8); ! output_asm_insn (AS2 (add%L0,%3,%0), xoperands); /* fp_pop_level--; */ ! output_asm_insn ("fstp%Q0 %2", xoperands); ! output_asm_insn ("pop%L0 %0", &target); ! output_asm_insn ("pop%L0 %1", xoperands); } else if (GET_CODE (target) == MEM) *************** *** 286,294 **** xxops[0] = stack_pointer_rtx; xxops[1] = gen_rtx (CONST_INT, VOIDmode, 4); ! output_asm_insn (AS2 (sub%L,%1,%0), xxops); xxops[0] = AT_SP (Pmode); /* fp_pop_level--; */ output_asm_insn ("fistps %0", xxops); ! output_asm_insn ("pop%L %0", &target); } else if (GET_CODE (target) == MEM) --- 287,295 ---- xxops[0] = stack_pointer_rtx; xxops[1] = gen_rtx (CONST_INT, VOIDmode, 4); ! output_asm_insn (AS2 (sub%L0,%1,%0), xxops); xxops[0] = AT_SP (Pmode); /* fp_pop_level--; */ output_asm_insn ("fistps %0", xxops); ! output_asm_insn ("pop%L0 %0", &target); } else if (GET_CODE (target) == MEM) *************** *** 312,323 **** rtx xoperands[2]; rtx xfops[3]; ! output_asm_insn ("push%L %0", &x); xfops[0] = AT_SP (Pmode); xfops[2] = gen_rtx (CONST_INT, VOIDmode, 4); xfops[1] = stack_pointer_rtx; ! output_asm_insn ("fld%S %0 \n\tadd%L %2,%1", xfops); } else ! output_asm_insn ("fld%S %0", &x); } --- 313,324 ---- rtx xoperands[2]; rtx xfops[3]; ! output_asm_insn ("push%L0 %0", &x); xfops[0] = AT_SP (Pmode); xfops[2] = gen_rtx (CONST_INT, VOIDmode, 4); xfops[1] = stack_pointer_rtx; ! output_asm_insn ("fld%S0 %0 \n\tadd%L0 %2,%1", xfops); } else ! output_asm_insn ("fld%S0 %0", &x); } *************** *** 336,348 **** xoperands[0] = x; xoperands[1] = gen_rtx (REG, SImode, REGNO (x) + 1); ! output_asm_insn ("push%L %1", xoperands); ! output_asm_insn ("push%L %0", xoperands); xfops[0] = AT_SP (Pmode); xfops[2] = gen_rtx (CONST_INT, VOIDmode, 8); xfops[1] = stack_pointer_rtx; ! output_asm_insn ("fld%Q %0 \n\tadd%L %2,%1", xfops); } else if (GET_CODE (x) == MEM) ! output_asm_insn ("fld%Q %0", &x); } \f --- 337,349 ---- xoperands[0] = x; xoperands[1] = gen_rtx (REG, SImode, REGNO (x) + 1); ! output_asm_insn ("push%L0 %1", xoperands); ! output_asm_insn ("push%L0 %0", xoperands); xfops[0] = AT_SP (Pmode); xfops[2] = gen_rtx (CONST_INT, VOIDmode, 8); xfops[1] = stack_pointer_rtx; ! output_asm_insn ("fld%Q0 %0 \n\tadd%L0 %2,%1", xfops); } else if (GET_CODE (x) == MEM) ! output_asm_insn ("fld%Q0 %0", &x); } \f *************** *** 359,363 **** if (XEXP (x, 0) != stack_pointer_rtx) abort (); ! return "push%L %1"; } else if (GET_CODE (operands[1]) == CONST_DOUBLE) --- 360,364 ---- if (XEXP (x, 0) != stack_pointer_rtx) abort (); ! return "push%L0 %1"; } else if (GET_CODE (operands[1]) == CONST_DOUBLE) *************** *** 366,374 **** } else if (GET_CODE (operands[0]) == REG || GET_CODE (operands[1]) == REG) ! return AS2 (mov%L,%1,%0); else { ! output_asm_insn ("push%L %1", operands); ! return "pop%L %0"; } } --- 367,375 ---- } else if (GET_CODE (operands[0]) == REG || GET_CODE (operands[1]) == REG) ! return AS2 (mov%L0,%1,%0); else { ! output_asm_insn ("push%L0 %1", operands); ! return "pop%L0 %0"; } } *************** *** 385,398 **** if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); } if (GET_CODE (addr) == REG) return addr; ! return 0; } --- 386,401 ---- if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! else if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); + else + abort (); } if (GET_CODE (addr) == REG) return addr; ! abort (); } *************** *** 409,413 **** { xops[0] = gen_rtx (CONST_INT, VOIDmode, -n); ! output_asm_insn (AS2 (sub%L,%0,%1), xops); } else if (n > 0) --- 412,416 ---- { xops[0] = gen_rtx (CONST_INT, VOIDmode, -n); ! output_asm_insn (AS2 (sub%L0,%0,%1), xops); } else if (n > 0) *************** *** 414,418 **** { xops[0] = gen_rtx (CONST_INT, VOIDmode, n); ! output_asm_insn (AS2 (add%L,%0,%1), xops); } } --- 417,421 ---- { xops[0] = gen_rtx (CONST_INT, VOIDmode, n); ! output_asm_insn (AS2 (add%L0,%0,%1), xops); } } *************** *** 490,497 **** if (optype0 == MEMOP) ! addreg0 = find_addr_reg (operands[0]); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (operands[1]); /* Ok, we can do one word at a time. --- 493,500 ---- if (optype0 == MEMOP) ! addreg0 = find_addr_reg (XEXP (operands[0], 0)); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (XEXP (operands[1], 0)); /* Ok, we can do one word at a time. *************** *** 681,685 **** if (REGNO (from) != REGNO (to)) { ! output_asm_insn ("fld%S %1 \n\tfstp%S %0", xops); } } --- 684,688 ---- if (REGNO (from) != REGNO (to)) { ! output_asm_insn ("fld%S0 %1 \n\tfstp%S0 %0", xops); } } *************** *** 718,722 **** if (REGNO (from) != REGNO (to)) abort (); ! /* output_asm_insn ("fld%Q %1 \n\t fstp%Q %0", xops);*/ } else --- 721,725 ---- if (REGNO (from) != REGNO (to)) abort (); ! /* output_asm_insn ("fld%Q0 %1 \n\t fstp%Q0 %0", xops);*/ } else *************** *** 756,761 **** int nregs, limit; rtx xops[4]; - static char dont_save_regs[] = CALL_USED_REGISTERS; - /* static char *reg_names[] = REGISTER_NAMES; */ extern int frame_pointer_needed; --- 759,762 ---- *************** *** 766,773 **** if (frame_pointer_needed) { ! output_asm_insn ("push%L %1", xops); ! output_asm_insn (AS2 (mov%L,%0,%1), xops); if (size) ! output_asm_insn (AS2 (sub%L,%2,%0), xops); } --- 767,774 ---- if (frame_pointer_needed) { ! output_asm_insn ("push%L0 %1", xops); ! output_asm_insn (AS2 (mov%L0,%0,%1), xops); if (size) ! output_asm_insn (AS2 (sub%L0,%2,%0), xops); } *************** *** 783,788 **** nregs = 0; limit = (frame_pointer_needed ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM); ! for (regno = 2; regno < limit; regno++) ! if (regs_ever_live[regno] && ! dont_save_regs[regno]) { fprintf (file, "\tpush%s %se%s\n", L_SIZE, RP, hi_reg_name[regno]); --- 784,789 ---- nregs = 0; limit = (frame_pointer_needed ? FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM); ! for (regno = limit - 1; regno >= 0; regno--) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { fprintf (file, "\tpush%s %se%s\n", L_SIZE, RP, hi_reg_name[regno]); *************** *** 798,803 **** register int nregs, limit; int assure_sp_pos; - static char dont_save_regs[] = CALL_USED_REGISTERS; - /* static char *reg_names[] = REGISTER_NAMES; */ extern int frame_pointer_needed; extern int current_function_pops_args; --- 799,802 ---- *************** *** 807,812 **** ! for (regno = (limit -1); regno >= 2; regno--) ! if (regs_ever_live[regno] && ! dont_save_regs[regno]) nregs++; --- 806,811 ---- ! for (regno = (limit -1); regno >= 0; regno--) ! if (regs_ever_live[regno] && ! call_used_regs[regno]) nregs++; *************** *** 820,828 **** -size -(nregs*(UNITS_PER_WORD))); xops[1] = stack_pointer_rtx; ! output_asm_insn (AS2 (lea%L,%0,%1), xops); } ! for (regno = (limit -1); regno >= 2; regno--) { ! if (regs_ever_live[regno] && ! dont_save_regs[regno]) { fprintf (file, "\tpop%s ", L_SIZE); --- 819,827 ---- -size -(nregs*(UNITS_PER_WORD))); xops[1] = stack_pointer_rtx; ! output_asm_insn (AS2 (lea%L0,%0,%1), xops); } ! for (regno = 0; regno < limit; regno++) { ! if (regs_ever_live[regno] && ! call_used_regs[regno]) { fprintf (file, "\tpop%s ", L_SIZE); *************** *** 1000,1004 **** register rtx addr; { - /* static char *reg_name[] = REGISTER_NAMES; */ register rtx reg1, reg2, breg, ireg; rtx offset; --- 999,1002 ---- diff -rc2N gcc-1.34/config/out-m68k.c gcc-1.35/config/out-m68k.c *** gcc-1.34/config/out-m68k.c Wed Feb 22 11:56:19 1989 --- gcc-1.35/config/out-m68k.c Wed Mar 29 15:26:22 1989 *************** *** 151,158 **** if (optype0 == MEMOP) ! addreg0 = find_addr_reg (operands[0]); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (operands[1]); /* Ok, we can do one word at a time. --- 151,158 ---- if (optype0 == MEMOP) ! addreg0 = find_addr_reg (XEXP (operands[0], 0)); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (XEXP (operands[1], 0)); /* Ok, we can do one word at a time. *************** *** 263,276 **** if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); } if (GET_CODE (addr) == REG) return addr; ! return 0; } \f --- 263,278 ---- if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! else if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); + else + abort (); } if (GET_CODE (addr) == REG) return addr; ! abort (); } \f diff -rc2N gcc-1.34/config/out-mips.c gcc-1.35/config/out-mips.c *** gcc-1.34/config/out-mips.c Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/out-mips.c Wed Apr 5 17:22:43 1989 *************** *** 0 **** --- 1,407 ---- + /* Subroutines for insn-output.c for MIPS + Contributed by A. Lichnewsky, lich@inria.inria.fr. + Copyright (C) 1989 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + + #include <stdio.h> + extern void my_print_rtx(); + + + /* Global variables for machine-dependent things. */ + + char *reg_numchar[]= REGISTER_NUMCHAR; + + + /* Return truth value of whether OP can be used as an operands + where a 16 bit integer is needed */ + + int + arith_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (register_operand (op, mode) + || (GET_CODE (op) == CONST_INT && SMALL_INT (op))); + } + + /* Return truth value of whether OP can be used as an operand in a two + address arithmetic insn (such as set 123456,%o4) of mode MODE. */ + + int + arith32_operand (op, mode) + rtx op; + enum machine_mode mode; + { + return (register_operand (op, mode) || GET_CODE (op) == CONST_INT); + } + + /* Return truth value of whether OP is a integer which fits in 16 bits */ + + int + small_int (op, mode) + rtx op; + enum machine_mode mode; + { + return (GET_CODE (op) == CONST_INT && SMALL_INT (op)); + } + + + \f + /* Used to obtain address of subregs */ + /* when in memory. This takes mode and */ + /* subreg number into account */ + + /* So far only QI subregs of SI mode have */ + /* been found necessary and implemented. */ + + rtx + addr_compensate(addr,submode,origmode,subnum) + rtx addr; + enum machine_mode submode; + enum machine_mode origmode; + int subnum; + { + extern rtx change_address(); + extern void abort_with_insn(); + extern rtx plus_constant( ); + + if((submode == QImode) && (origmode == SImode)) + { + #ifdef BYTES_BIG_ENDIAN + return change_address(addr,QImode, + plus_constant(XEXP(addr,0),3 - subnum)); + #else + return change_address(addr,QImode, + plus_constant(XEXP(addr,0), subnum)); + #endif + } + else abort_with_insn(addr,"addr_compensate does not support mode"); + } + + + + \f + /* VARARGS */ + int function_suspect; + int varargs_suspect=0; + int this_varargs_suspect; + + /* PARAMETER LIST CONSTRUCTION */ + + + static struct + { enum arg_state nxs_if_f, nxs_if_g; + short reg_if_f, reg_if_g; + } + arg_state_table[(int) ( ARG_STA_GGGG + 1)] = ARG_STA_AUTOMA; + + + + /* For use in Frame/ Stack pointer management*/ + char * current_function_name; + int current_function_total_framesize; + + + enum arg_state + function_arg_advance(cum,mode,type) + CUMULATIVE_ARGS *cum; + enum machine_mode mode; + int type; + { + if(TARGET_DEBUGA_MODE) + fprintf(stderr,"Function_arg_advance entered cum.arg_state=%d,mode=%d\n", + cum->arg_rec_state,mode); + + (cum->arg_rec_state) = (FP_REGS == PREFERRED_RELOAD_CLASS_FM(mode,GR_REGS))? + arg_state_table[(int)((cum->arg_rec_state))].nxs_if_f: + arg_state_table[(int)((cum->arg_rec_state))].nxs_if_g; + + (cum->arg_num)++; + + if(TARGET_DEBUGA_MODE) + fprintf(stderr, + "Function_arg_advance exited cum.arg_state=%d,mode=%d,num=%d\n", + cum->arg_rec_state,mode,cum->arg_num); + + } + + + + rtx + function_arg(cum,mode,type,named) + CUMULATIVE_ARGS *cum; + enum machine_mode mode; + int type; + int named; + { + int regnum; + + if(TARGET_DEBUGA_MODE) + fprintf(stderr,"Function_arg entered cum.arg_state=%d,mode=%d\n", + cum->arg_rec_state,mode); + + regnum = (FP_REGS == PREFERRED_RELOAD_CLASS_FM(mode,GR_REGS)) + ? + arg_state_table[(int)((cum->arg_rec_state))].reg_if_f + : + arg_state_table[(int)((cum->arg_rec_state))].reg_if_g; + if(TARGET_DEBUGA_MODE) + fprintf(stderr,"Fnarg, MODE=%d, REGNUM=%d\n",mode,regnum); + + return (( regnum >= 0 ) ? gen_rtx(REG,mode,regnum) + :(regnum == -2) ? gen_rtx(REG,DFmode,6) + : 0); + + } + + + rtx function_inarg(cum,mode,type,named) + CUMULATIVE_ARGS *cum; + enum machine_mode mode; + int type; + int named; + { + int regnum; + if(TARGET_DEBUGA_MODE) + fprintf(stderr,"Function_inarg entered cum.arg_state=%d,mode=%d\n", + cum->arg_rec_state,mode); + + regnum = (FP_REGS == PREFERRED_RELOAD_CLASS_FM(mode,GR_REGS)) + ? + arg_state_table[(int)((cum->arg_rec_state))].reg_if_f + : + arg_state_table[(int)((cum->arg_rec_state))].reg_if_g; + + if(TARGET_DEBUGA_MODE) + fprintf(stderr,"Inarg, MODE=%d, REGNUM=%d",mode,regnum); + + + return (( regnum >= 0) ? gen_rtx(REG,mode,regnum) + :(regnum == -2) ? gen_rtx(REG,DFmode,6) + : 0); + + } + + \f + static rtx branch_cmp_op[2]; + static enum machine_mode branch_cmp_mode; + + compare_collect(mode,op0,op1) + enum machine_mode mode; + rtx op0; + rtx op1; + { + if(TARGET_DEBUGD_MODE) + { + fprintf(stderr,"compare_collect mode = %d, operands::",mode); + my_print_rtx(op0); + my_print_rtx(op1); + } + branch_cmp_op[0] = op0; + branch_cmp_op[1] = op1; + branch_cmp_mode = mode; + + + } + + + compare_restore(operands,mode,insn) + rtx *operands; + enum machine_mode *mode; + rtx insn; + { + rtx previous; + rtx prev_par; + if(TARGET_DEBUGD_MODE) + { + fprintf(stderr, "compare_restore returning mode =%d, operands:%X,%X:" + , branch_cmp_mode ,branch_cmp_op[0],branch_cmp_op[1] ); + my_print_rtx(branch_cmp_op[0]); + my_print_rtx(branch_cmp_op[1]); + } + + if ( (! branch_cmp_op[0]) && (! branch_cmp_op[1])) + { + /* Signal that multiple branches following */ + /* a comparison have been found */ + if(TARGET_DEBUGD_MODE) + { fprintf(stderr,"Not at ease in compare_restore\n"); + my_print_rtx(insn); + my_print_rtx(PREV_INSN(insn)); + } + /* Find the previous comparison */ + + while( (GET_CODE(PREV_INSN(insn))) == JUMP_INSN) + { insn = PREV_INSN(insn); + if(TARGET_DEBUGD_MODE) + my_print_rtx(PREV_INSN(insn)); + } + previous = PATTERN(PREV_INSN(insn)); + + if((GET_CODE(previous)) == PARALLEL) + { + /* Signal that we have a very strange */ + /* RTL construct,... usually generated */ + /* by the optimizer, that seems to */ + /* contradict the documentation */ + + /* However, this construct holds the */ + /* correct information in a very reliable */ + /* way */ + + branch_cmp_op[0] = XVECEXP(previous,0,0); + branch_cmp_op[1] = XVECEXP(previous,0,1); + /* warning("Check branch optimization with -mdebugd"); + */ + } + else + if ( ((GET_CODE(previous)) == SET) + && + ((GET_CODE(XEXP(previous,0)))== CC0) + && + ((GET_CODE(XEXP(previous,1)))== MINUS) + ) + { /* Here we find the comparison info */ + /* in a more classical format */ + + previous = XEXP(previous,1); + branch_cmp_op[0] = XEXP(previous,0); + branch_cmp_op[1] = XEXP(previous,1); + } + else + { /* Be prepared for other things popping out */ + /* of optimization .... */ + fprintf(stderr,"Unexpected PATTERN Found in compare restore:\n"); + my_print_rtx(previous); + abort(); + } + } + + + + if (! branch_cmp_op[0]) operands[0] =gen_rtx(REG,VOIDmode,0); + else operands[0]= branch_cmp_op[0]; + if (! branch_cmp_op[1]) operands[1] =gen_rtx(REG,VOIDmode,0); + else operands[1]= branch_cmp_op[1]; + *mode = branch_cmp_mode; + + branch_cmp_op[0] = NULL; + branch_cmp_op[1] = NULL; + + } + + + \f + extern int optimize; + extern int flag_combine_regs; + extern int flag_strength_reduce; + extern int flag_no_peephole; + extern int flag_inline_functions; + extern int flag_omit_frame_pointer; + extern char *main_input_filename; + + #include <time.h> + #include <sys/types.h> + #include <sys/timeb.h> + + void + print_options (out) + FILE *out; + { + char *a_time; + long c_time; + + fprintf(out," #OPTIONS:%s%s%s%s%s%s%s\n", + (TARGET_NOFIXED_OVFL ? " -dnofixed-ovfl":" -dfixed-ovfl"), + (optimize ? " optimize" : ""), + (flag_combine_regs ? " -fcombine-regs" : " !combine-regs"), + (flag_strength_reduce ? "" : " !strength_reduce"), + (flag_omit_frame_pointer ?"" :" !omit_frame_pointer"), + (flag_no_peephole ? "" : " peephole"), + (flag_inline_functions ?" inline-functions":"") + ); + fprintf(out," #Source:%s\n",main_input_filename); + c_time=time(0); + a_time = ctime(&c_time); + fprintf(out," #Compiled:%s",a_time); + #ifdef __GNUC__ + #ifndef __VERSION__ + #define __VERSION__ "[unknown]" + #endif + fprintf (out, " # (META)compiled by GNU C version %s.\n", __VERSION__); + #else + fprintf (out, " # (META)compiled by CC.\n"); + #endif + } + \f + /* DEBUGGING UTILITIES */ + rtx al_log_insn_debug; + + abort_show_logged () + { + if(al_log_insn_debug) + my_print_rtx(al_log_insn_debug); + abort(); + } + + extern FILE *outfile; + + void + my_print_rtx (in_rtx) + register rtx in_rtx; + { + FILE *old; + old = outfile; + + outfile = stderr; + print_rtx(in_rtx); + fprintf(outfile,"\n"); + + outfile=old; + + } + + extern FILE *outfile; + + void + my_print_insncode(insn) + rtx insn; + { + FILE *old; + old = outfile; + + outfile = stderr; + print_rtx(insn); + fprintf(outfile,"\n"); + fprintf(outfile,"INSN_CODE(insn) = %X\n", INSN_CODE(insn)) ; + + outfile = old; + } + + + void + abort_with_insn (insn,reason) + rtx insn; + char *reason; + { + fprintf(stderr,"About to Abort::%s\n",reason); + my_print_rtx(insn); + abort(); + } + diff -rc2N gcc-1.34/config/out-ns32k.c gcc-1.35/config/out-ns32k.c *** gcc-1.34/config/out-ns32k.c Wed Feb 22 11:56:14 1989 --- gcc-1.35/config/out-ns32k.c Wed Mar 29 17:48:15 1989 *************** *** 213,217 **** rtx offset; static char scales[] = { 'b', 'w', 'd', 0, 'q', }; - static char *reg_name[] = REGISTER_NAMES; retry: --- 213,216 ---- *************** *** 224,228 **** { fprintf (file, "tos"); break; } else ! { fprintf (file, "%s", reg_name [REGNO (addr)]); break; } else if (CONSTANT_P (addr)) { output_addr_const (file, addr); break; } --- 223,227 ---- { fprintf (file, "tos"); break; } else ! { fprintf (file, "%s", reg_names[REGNO (addr)]); break; } else if (CONSTANT_P (addr)) { output_addr_const (file, addr); break; } *************** *** 242,246 **** } output_addr_const (file, offset); ! fprintf (file, "(%s)", reg_name [REGNO (addr)]); break; } --- 241,245 ---- } output_addr_const (file, offset); ! fprintf (file, "(%s)", reg_names[REGNO (addr)]); break; } *************** *** 255,259 **** fprintf (file, "tos"); else ! fprintf (file, "0(%s)", reg_name [REGNO (addr)]); break; --- 254,258 ---- fprintf (file, "tos"); else ! fprintf (file, "0(%s)", reg_names[REGNO (addr)]); break; *************** *** 434,438 **** { if (reg1) abort (); ! fprintf (file, "[%s:b]", reg_name [REGNO (addr)]); } else --- 433,437 ---- { if (reg1) abort (); ! fprintf (file, "[%s:b]", reg_names[REGNO (addr)]); } else *************** *** 471,479 **** output_asm_label (addr); fprintf (file, "[%s:%c]", ! reg_name[REGNO (ireg)], scales[scale]); break; } if (ireg && breg && offset == const0_rtx) ! fprintf (file, "0(%s)", reg_name[REGNO (breg)]); else { --- 470,478 ---- output_asm_label (addr); fprintf (file, "[%s:%c]", ! reg_names[REGNO (ireg)], scales[scale]); break; } if (ireg && breg && offset == const0_rtx) ! fprintf (file, "0(%s)", reg_names[REGNO (breg)]); else { *************** *** 488,492 **** if (GET_CODE (breg) != REG) abort (); #ifndef SEQUENT_ADDRESS_BUG ! fprintf (file, "(%s)", reg_name[REGNO (breg)]); paren_base_reg_printed = -1; #else --- 487,491 ---- if (GET_CODE (breg) != REG) abort (); #ifndef SEQUENT_ADDRESS_BUG ! fprintf (file, "(%s)", reg_names[REGNO (breg)]); paren_base_reg_printed = -1; #else *************** *** 494,502 **** { if (ireg) abort (); ! fprintf (file, "[%s:b]", reg_name[REGNO (breg)]); } else { ! fprintf (file, "(%s)", reg_name[REGNO (breg)]); paren_base_reg_printed = -1; } --- 493,501 ---- { if (ireg) abort (); ! fprintf (file, "[%s:b]", reg_names[REGNO (breg)]); } else { ! fprintf (file, "(%s)", reg_names[REGNO (breg)]); paren_base_reg_printed = -1; } *************** *** 516,520 **** if (GET_CODE (ireg) != REG) abort (); fprintf (file, "[%s:%c]", ! reg_name[REGNO (ireg)], scales[scale]); } --- 515,519 ---- if (GET_CODE (ireg) != REG) abort (); fprintf (file, "[%s:%c]", ! reg_names[REGNO (ireg)], scales[scale]); } diff -rc2N gcc-1.34/config/out-sparc.c gcc-1.35/config/out-sparc.c *** gcc-1.34/config/out-sparc.c Wed Feb 22 11:56:11 1989 --- gcc-1.35/config/out-sparc.c Wed Mar 29 15:28:23 1989 *************** *** 631,638 **** if (optype0 == MEMOP) ! addreg0 = find_addr_reg (operands[0]); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (operands[1]); /* Ok, we can do one word at a time. --- 631,638 ---- if (optype0 == MEMOP) ! addreg0 = find_addr_reg (XEXP (operands[0], 0)); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (XEXP (operands[1], 0)); /* Ok, we can do one word at a time. *************** *** 745,748 **** --- 745,754 ---- But a DImode need not be 8-byte aligned, because it could be a struct containing two ints or pointers. */ + + /* Sun fucks us here. We cannot trust references + to doubles via varying addresses. It might be on the stack + even if we don't know that it is; and then it might not be + double-word aligned. */ + #if 0 if (GET_CODE (operands[1]) == MEM && GET_MODE (operands[1]) == DFmode && MEM_IN_STRUCT_P (operands[1])) *************** *** 752,755 **** --- 758,762 ---- && MEM_IN_STRUCT_P (operands[0])) return "std %1,%0"; + #endif } } *************** *** 916,929 **** if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); } if (GET_CODE (addr) == REG) return addr; ! return 0; } --- 923,938 ---- if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! else if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); + else + abort (); } if (GET_CODE (addr) == REG) return addr; ! abort (); } diff -rc2N gcc-1.34/config/out-spur.c gcc-1.35/config/out-spur.c *** gcc-1.34/config/out-spur.c Wed Feb 22 11:56:07 1989 --- gcc-1.35/config/out-spur.c Wed Mar 29 15:26:05 1989 *************** *** 113,120 **** if (optype0 == MEMOP) ! addreg0 = find_addr_reg (operands[0]); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (operands[1]); /* Ok, we can do one word at a time. --- 113,120 ---- if (optype0 == MEMOP) ! addreg0 = find_addr_reg (XEXP (operands[0], 0)); if (optype1 == MEMOP) ! addreg1 = find_addr_reg (XEXP (operands[1], 0)); /* Ok, we can do one word at a time. *************** *** 257,270 **** if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); } if (GET_CODE (addr) == REG) return addr; ! return 0; } \f --- 257,272 ---- if (GET_CODE (XEXP (addr, 0)) == REG) addr = XEXP (addr, 0); ! else if (GET_CODE (XEXP (addr, 1)) == REG) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 0))) addr = XEXP (addr, 1); ! else if (CONSTANT_P (XEXP (addr, 1))) addr = XEXP (addr, 0); + else + abort (); } if (GET_CODE (addr) == REG) return addr; ! abort (); } \f diff -rc2N gcc-1.34/config/out-vax.c gcc-1.35/config/out-vax.c *** gcc-1.34/config/out-vax.c Wed Feb 22 11:56:05 1989 --- gcc-1.35/config/out-vax.c Wed Mar 29 17:48:12 1989 *************** *** 26,30 **** register rtx reg1, reg2, breg, ireg; rtx offset; - static char *reg_name[] = REGISTER_NAMES; retry: --- 26,29 ---- *************** *** 37,49 **** case REG: ! fprintf (file, "(%s)", reg_name [REGNO (addr)]); break; case PRE_DEC: ! fprintf (file, "-(%s)", reg_name [REGNO (XEXP (addr, 0))]); break; case POST_INC: ! fprintf (file, "(%s)+", reg_name [REGNO (XEXP (addr, 0))]); break; --- 36,48 ---- case REG: ! fprintf (file, "(%s)", reg_names[REGNO (addr)]); break; case PRE_DEC: ! fprintf (file, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); break; case POST_INC: ! fprintf (file, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); break; *************** *** 125,129 **** if (GET_CODE (breg) != REG) abort (); ! fprintf (file, "(%s)", reg_name[REGNO (breg)]); } if (ireg != 0) --- 124,128 ---- if (GET_CODE (breg) != REG) abort (); ! fprintf (file, "(%s)", reg_names[REGNO (breg)]); } if (ireg != 0) *************** *** 133,137 **** if (GET_CODE (ireg) != REG) abort (); ! fprintf (file, "[%s]", reg_name[REGNO (ireg)]); } break; --- 132,136 ---- if (GET_CODE (ireg) != REG) abort (); ! fprintf (file, "[%s]", reg_names[REGNO (ireg)]); } break; diff -rc2N gcc-1.34/config/sparc.md gcc-1.35/config/sparc.md *** gcc-1.34/config/sparc.md Wed Feb 22 12:31:07 1989 --- gcc-1.35/config/sparc.md Sat Apr 15 17:30:58 1989 *************** *** 1496,1503 **** "" "* ! return (GET_CODE (operands[1]) == CONST_INT ! ? \"sethi %%hi(%1),%0\;or %%lo(%1),%0,%0\" ! : \"mov %1,%0\"); ! ") ;;- and instructions (with compliment also) --- 1496,1510 ---- "" "* ! { ! if (GET_CODE (operands[1]) == CONST_INT) ! { ! if (SMALL_INT (operands[1])) ! return \"mov %1,%0\"; ! return \"sethi %%hi(%1),%0\;or %%lo(%1),%0,%0\"; ! } ! if (GET_CODE (operands[1]) == MEM) ! return \"ld %1,%0\"; ! return \"mov %1,%0\"; ! }") ;;- and instructions (with compliment also) diff -rc2N gcc-1.34/config/spur.md gcc-1.35/config/spur.md *** gcc-1.34/config/spur.md Wed Feb 22 12:31:04 1989 --- gcc-1.35/config/spur.md Tue Apr 4 20:09:35 1989 *************** *** 286,292 **** rtx tem = gen_reg_rtx (SImode); rtx addr = force_reg (SImode, XEXP (operands[1], 0)); emit_move_insn (tem, gen_rtx (MEM, SImode, addr)); ! emit_insn (gen_rtx (SET, VOIDmode, ! gen_rtx (SUBREG, SImode, operands[0], 0), gen_rtx (ZERO_EXTRACT, SImode, tem, gen_rtx (CONST_INT, VOIDmode, 8), --- 286,299 ---- rtx tem = gen_reg_rtx (SImode); rtx addr = force_reg (SImode, XEXP (operands[1], 0)); + rtx subreg; + emit_move_insn (tem, gen_rtx (MEM, SImode, addr)); ! if (GET_CODE (operands[0]) == SUBREG) ! subreg = gen_rtx (SUBREG, SImode, SUBREG_REG (operands[0]), ! SUBREG_WORD (operands[0])); ! else ! subreg = gen_rtx (SUBREG, SImode, operands[0], 0); ! ! emit_insn (gen_rtx (SET, VOIDmode, subreg, gen_rtx (ZERO_EXTRACT, SImode, tem, gen_rtx (CONST_INT, VOIDmode, 8), *************** *** 297,303 **** rtx tem = gen_reg_rtx (SImode); rtx addr = force_reg (SImode, XEXP (operands[0], 0)); emit_move_insn (tem, gen_rtx (MEM, SImode, addr)); if (! CONSTANT_ADDRESS_P (operands[1])) ! operands[1] = gen_rtx (SUBREG, SImode, operands[1], 0); emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (ZERO_EXTRACT, SImode, tem, --- 304,319 ---- rtx tem = gen_reg_rtx (SImode); rtx addr = force_reg (SImode, XEXP (operands[0], 0)); + rtx subreg; + emit_move_insn (tem, gen_rtx (MEM, SImode, addr)); if (! CONSTANT_ADDRESS_P (operands[1])) ! { ! if (GET_CODE (operands[1]) == SUBREG) ! subreg = gen_rtx (SUBREG, SImode, SUBREG_REG (operands[1]), ! SUBREG_WORD (operands[1])); ! else ! subreg = gen_rtx (SUBREG, SImode, operands[1], 0); ! } ! emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (ZERO_EXTRACT, SImode, tem, *************** *** 304,308 **** gen_rtx (CONST_INT, VOIDmode, 8), addr), ! operands[1])); emit_move_insn (gen_rtx (MEM, SImode, addr), tem); } --- 320,324 ---- gen_rtx (CONST_INT, VOIDmode, 8), addr), ! subreg)); emit_move_insn (gen_rtx (MEM, SImode, addr), tem); } *************** *** 374,377 **** --- 390,395 ---- ;; Operand 4 is a temporary (QImode). + ;; Operand 5 is an internal temporary (HImode). + (define_expand "loadhi" [(set (match_operand:SI 2 "register_operand" "") *************** *** 400,403 **** --- 418,423 ---- ;; Operand 4 is a temporary (QImode). + ;; Operand 5 is an internal variable made from operand 1. + (define_expand "storehi" [(set (match_operand:SI 2 "register_operand" "") *************** *** 405,409 **** ;; Insert the low byte. (set (zero_extract:SI (match_dup 2) (const_int 8) (match_dup 0)) ! (subreg:SI (match_operand:HI 1 "register_operand" "") 0)) ;; Form address of high byte. (set (match_operand:SI 3 "register_operand" "") --- 425,429 ---- ;; Insert the low byte. (set (zero_extract:SI (match_dup 2) (const_int 8) (match_dup 0)) ! (match_dup 5)) ;; Form address of high byte. (set (match_operand:SI 3 "register_operand" "") *************** *** 411,415 **** ;; Extract the high byte from the source. (set (subreg:SI (match_operand:QI 4 "register_operand" "") 0) ! (zero_extract:SI (match_dup 1) (const_int 8) (const_int 1))) ;; Store high byte into the memory word (set (zero_extract:SI (match_dup 2) (const_int 8) (match_dup 3)) --- 431,436 ---- ;; Extract the high byte from the source. (set (subreg:SI (match_operand:QI 4 "register_operand" "") 0) ! (zero_extract:SI (match_operand:HI 1 "register_operand" "") ! (const_int 8) (const_int 1))) ;; Store high byte into the memory word (set (zero_extract:SI (match_dup 2) (const_int 8) (match_dup 3)) *************** *** 419,423 **** (match_dup 2))] "" ! "") ;; Like storehi but operands[1] is a CONST_INT. --- 440,451 ---- (match_dup 2))] "" ! " ! { ! if (GET_CODE (operands[1]) == SUBREG) ! operands[5] = gen_rtx (SUBREG, SImode, SUBREG_REG (operands[1]), ! SUBREG_WORD (operands[1])); ! else ! operands[5] = gen_rtx (SUBREG, SImode, operands[1], 0); ! }") ;; Like storehi but operands[1] is a CONST_INT. *************** *** 663,667 **** (define_expand "zero_extendhisi2" [(set (match_operand:SI 0 "register_operand" "") ! (and:SI (subreg:SI (match_operand:HI 1 "register_operand" "") 0) ;; This constant is invalid, but reloading will handle it. ;; It's useless to generate here the insns to construct it --- 691,695 ---- (define_expand "zero_extendhisi2" [(set (match_operand:SI 0 "register_operand" "") ! (and:SI (match_operand:HI 1 "register_operand" "") ;Changed to SI below ;; This constant is invalid, but reloading will handle it. ;; It's useless to generate here the insns to construct it *************** *** 669,673 **** (match_dup 2)))] "" ! " operands[2] = force_reg (SImode, gen_rtx (CONST_INT, VOIDmode, 65535)); ") (define_insn "zero_extendqihi2" --- 697,710 ---- (match_dup 2)))] "" ! " ! { ! if (GET_CODE (operands[1]) == SUBREG) ! operands[1] = gen_rtx (SUBREG, SImode, SUBREG_REG (operands[1]), ! SUBREG_WORD (operands[1])); ! else ! operands[1] = gen_rtx (SUBREG, SImode, operands[1], 0); ! ! operands[2] = force_reg (SImode, gen_rtx (CONST_INT, VOIDmode, 65535)); ! }") (define_insn "zero_extendqihi2" *************** *** 691,695 **** (define_expand "extendhisi2" [(set (match_dup 2) ! (and:SI (subreg:SI (match_operand:HI 1 "register_operand" "") 0) (match_dup 4))) (set (match_dup 3) (plus:SI (match_dup 2) (match_dup 5))) --- 728,732 ---- (define_expand "extendhisi2" [(set (match_dup 2) ! (and:SI (match_operand:HI 1 "register_operand" "") ;Changed to SI below (match_dup 4))) (set (match_dup 3) (plus:SI (match_dup 2) (match_dup 5))) *************** *** 699,702 **** --- 736,745 ---- " { + if (GET_CODE (operands[1]) == SUBREG) + operands[1] = gen_rtx (SUBREG, SImode, SUBREG_REG (operands[1]), + SUBREG_WORD (operands[1])); + else + operands[1] = gen_rtx (SUBREG, SImode, operands[1], 0); + operands[2] = gen_reg_rtx (SImode); operands[3] = gen_reg_rtx (SImode); *************** *** 707,711 **** (define_expand "extendqihi2" [(set (match_dup 2) ! (and:HI (subreg:HI (match_operand:QI 1 "register_operand" "") 0) (const_int 255))) (set (match_dup 3) --- 750,754 ---- (define_expand "extendqihi2" [(set (match_dup 2) ! (and:HI (match_operand:QI 1 "register_operand" "") ;Changed to SI below (const_int 255))) (set (match_dup 3) *************** *** 716,719 **** --- 759,768 ---- " { + if (GET_CODE (operands[1]) == SUBREG) + operands[1] = gen_rtx (SUBREG, HImode, SUBREG_REG (operands[1]), + SUBREG_WORD (operands[1])); + else + operands[1] = gen_rtx (SUBREG, HImode, operands[1], 0); + operands[2] = gen_reg_rtx (HImode); operands[3] = gen_reg_rtx (HImode); *************** *** 722,726 **** (define_expand "extendqisi2" [(set (match_dup 2) ! (and:SI (subreg:SI (match_operand:QI 1 "register_operand" "") 0) (const_int 255))) (set (match_dup 3) (plus:SI (match_dup 2) (const_int -128))) --- 771,775 ---- (define_expand "extendqisi2" [(set (match_dup 2) ! (and:SI (match_operand:QI 1 "register_operand" "") ;Changed to SI below (const_int 255))) (set (match_dup 3) (plus:SI (match_dup 2) (const_int -128))) *************** *** 730,733 **** --- 779,788 ---- " { + if (GET_CODE (operands[1]) == SUBREG) + operands[1] = gen_rtx (SUBREG, SImode, SUBREG_REG (operands[1]), + SUBREG_WORD (operands[1])); + else + operands[1] = gen_rtx (SUBREG, SImode, operands[1], 0); + operands[2] = gen_reg_rtx (SImode); operands[3] = gen_reg_rtx (SImode); diff -rc2N gcc-1.34/config/tm-3b1.h gcc-1.35/config/tm-3b1.h *** gcc-1.34/config/tm-3b1.h Wed Feb 22 12:28:17 1989 --- gcc-1.35/config/tm-3b1.h Wed Mar 29 17:36:38 1989 *************** *** 53,61 **** #define SCCS_DIRECTIVE - /* Allow #ident but output nothing for it. */ - - #define IDENT_DIRECTIVE - #define ASM_OUTPUT_IDENT(FILE, NAME) - /* Make output for SDB. */ --- 53,56 ---- *************** *** 192,202 **** { \ case REG: \ ! fprintf (FILE, "(%s)", reg_name [REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "-(%s)", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "(%s)+", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ --- 187,197 ---- { \ case REG: \ ! fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ *************** *** 278,286 **** fprintf (FILE, "LD%%%d(%%pc,%s.w", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "LD%%%d(%%pc,%s.l", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ fprintf (FILE, ")"); \ --- 273,281 ---- fprintf (FILE, "LD%%%d(%%pc,%s.w", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "LD%%%d(%%pc,%s.l", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ fprintf (FILE, ")"); \ *************** *** 289,293 **** { fprintf (FILE, "LD%%%d(%%pc,%s.l", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (breg)]); \ putc (')', FILE); \ break; } \ --- 284,288 ---- { fprintf (FILE, "LD%%%d(%%pc,%s.l", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (breg)]); \ putc (')', FILE); \ break; } \ *************** *** 298,302 **** if (addr != 0) \ output_addr_const (FILE, addr); \ ! fprintf (FILE, "(%s", reg_name[REGNO (breg)]); \ if (ireg != 0) \ putc (',', FILE); \ --- 293,297 ---- if (addr != 0) \ output_addr_const (FILE, addr); \ ! fprintf (FILE, "(%s", reg_names[REGNO (breg)]); \ if (ireg != 0) \ putc (',', FILE); \ *************** *** 305,311 **** ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s.w", reg_name[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s.l", reg_name[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ putc (')', FILE); \ --- 300,306 ---- ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ putc (')', FILE); \ *************** *** 315,319 **** { fprintf (FILE, "LD%%%d(%%pc,%s.w)", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (reg1)]); \ break; } \ default: \ --- 310,314 ---- { fprintf (FILE, "LD%%%d(%%pc,%s.w)", \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (reg1)]); \ break; } \ default: \ diff -rc2N gcc-1.34/config/tm-alliant.h gcc-1.35/config/tm-alliant.h *** gcc-1.34/config/tm-alliant.h Wed Feb 22 12:28:14 1989 --- gcc-1.35/config/tm-alliant.h Wed Mar 29 17:37:45 1989 *************** *** 1254,1258 **** '+' for an operand pushing on the stack: sp@+, (sp)+ or (%sp)+ depending on the style of syntax. ! 's' for a reference to the top word on the stack: sp@, (sp) or (%sp) depending on the style of syntax. '#' for an immediate operand prefix (# in MIT and Motorola syntax --- 1254,1258 ---- '+' for an operand pushing on the stack: sp@+, (sp)+ or (%sp)+ depending on the style of syntax. ! '@' for a reference to the top word on the stack: sp@, (sp) or (%sp) depending on the style of syntax. '#' for an immediate operand prefix (# in MIT and Motorola syntax *************** *** 1274,1278 **** else if (CODE == '-') fprintf (FILE, "sp@-"); \ else if (CODE == '+') fprintf (FILE, "sp@+"); \ ! else if (CODE == 's') fprintf (FILE, "sp@"); \ else if (CODE == '!') fprintf (FILE, "cc"); \ else if ((X) == 0 ) ; \ --- 1274,1278 ---- else if (CODE == '-') fprintf (FILE, "sp@-"); \ else if (CODE == '+') fprintf (FILE, "sp@+"); \ ! else if (CODE == '@') fprintf (FILE, "sp@"); \ else if (CODE == '!') fprintf (FILE, "cc"); \ else if ((X) == 0 ) ; \ *************** *** 1279,1285 **** else if (GET_CODE (X) == REG) \ { if (REGNO (X) < 16 && (CODE == 'y' || CODE == 'x') && GET_MODE (X) == DFmode) \ ! fprintf (FILE, "%s,%s", reg_name [REGNO (X)], reg_name [REGNO (X)+1]); \ else \ ! fprintf (FILE, "%s", reg_name[REGNO (X)]); \ } \ else if (GET_CODE (X) == MEM) \ --- 1279,1285 ---- else if (GET_CODE (X) == REG) \ { if (REGNO (X) < 16 && (CODE == 'y' || CODE == 'x') && GET_MODE (X) == DFmode) \ ! fprintf (FILE, "%s,%s", reg_names[REGNO (X)], reg_names[REGNO (X)+1]); \ else \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ } \ else if (GET_CODE (X) == MEM) \ *************** *** 1316,1326 **** { \ case REG: \ ! fprintf (FILE, "%s@", reg_name [REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "%s@-", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "%s@+", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ --- 1316,1326 ---- { \ case REG: \ ! fprintf (FILE, "%s@", reg_names[REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "%s@-", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "%s@+", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ *************** *** 1403,1407 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "pc@(L%d-LI%d-2:B)[%s:L", \ --- 1403,1407 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "pc@(L%d-LI%d-2:B)[%s:L", \ *************** *** 1408,1412 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (ireg)]); \ fprintf (FILE, ":%c", sz[scale]); \ putc (']', FILE); \ --- 1408,1412 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (ireg)]); \ fprintf (FILE, ":%c", sz[scale]); \ putc (']', FILE); \ *************** *** 1416,1420 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (breg)]); \ break; } \ if (ireg != 0 || breg != 0) \ --- 1416,1420 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (breg)]); \ break; } \ if (ireg != 0 || breg != 0) \ *************** *** 1423,1427 **** abort (); \ if (addr && GET_CODE (addr) == LABEL_REF) abort (); \ ! fprintf (FILE, "%s@", reg_name[REGNO (breg)]); \ if (addr != 0) { \ putc( '(', FILE ); \ --- 1423,1427 ---- abort (); \ if (addr && GET_CODE (addr) == LABEL_REF) abort (); \ ! fprintf (FILE, "%s@", reg_names[REGNO (breg)]); \ if (addr != 0) { \ putc( '(', FILE ); \ *************** *** 1445,1451 **** ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s:W", reg_name[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s:L", reg_name[REGNO (ireg)]); \ fprintf (FILE, ":%c", sz[scale]); \ putc (']', FILE); \ --- 1445,1451 ---- ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s:W", reg_names[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s:L", reg_names[REGNO (ireg)]); \ fprintf (FILE, ":%c", sz[scale]); \ putc (']', FILE); \ *************** *** 1457,1461 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (reg1)]); \ break; } \ default: \ --- 1457,1461 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (reg1)]); \ break; } \ default: \ diff -rc2N gcc-1.34/config/tm-altos3068.h gcc-1.35/config/tm-altos3068.h *** gcc-1.34/config/tm-altos3068.h Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/tm-altos3068.h Fri Apr 14 11:37:00 1989 *************** *** 0 **** --- 1,94 ---- + /* Definitions of target machine for GNU compiler. Altos 3068 68020 version. + Copyright (C) 1988,1989 Free Software Foundation, Inc. + + Written by Jyrki Kuoppala <jkp@cs.hut.fi> + Last modified: Mon Mar 6 22:47:58 1989 + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + + #include "tm-m68k.h" + + /* See tm-m68k.h. 7 means 68020 with 68881. */ + /* 5 is without 68881. Change to 7 if you have 68881 */ + + #ifndef TARGET_DEFAULT + #define TARGET_DEFAULT 5 + #endif + + /* Define __HAVE_68881__ in preprocessor, + according to the -m flags. + This will control the use of inline 68881 insns in certain macros. + Also inform the program which CPU this is for. */ + + #if TARGET_DEFAULT & 02 + + /* -m68881 is the default */ + #define CPP_SPEC \ + "%{!msoft-float:-D__HAVE_68881__ }\ + %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" + + #else + + /* -msoft-float is the default */ + #define CPP_SPEC \ + "%{m68881:-D__HAVE_68881__ }\ + %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{!mc68000:%{!m68000:-Dmc68020}}}" + + #endif + + /* -m68000 requires special flags to the assembler. */ + + #define ASM_SPEC \ + "%{m68000:-mc68010}%{mc68000:-mc68010}%{!mc68000:%{!m68000:-mc68020}}" + + /* Names to predefine in the preprocessor for this target machine. */ + + #define CPP_PREDEFINES "-Dmc68000 -DPORTAR -Dmc68k32 -Uvax -Dm68k -Dunix" + + /* Every structure or union's size must be a multiple of 2 bytes. */ + + #define STRUCTURE_SIZE_BOUNDARY 16 + + /* Generate calls to memcpy, memcmp and memset. */ + #define TARGET_MEM_FUNCTIONS + + /* We use gnu assembler, linker and gdb, so we want DBX format. */ + + #define DBX_DEBUGGING_INFO + + /* This is how to output an assembler line defining a `double' constant. */ + + #undef ASM_OUTPUT_DOUBLE + #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ + fprintf (FILE, "\t.double 0r%.20e\n", (VALUE)) + + /* This is how to output an assembler line defining a `float' constant. */ + + #undef ASM_OUTPUT_FLOAT + #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ + fprintf (FILE, "\t.single 0r%.20e\n", (VALUE)) + + #undef ASM_OUTPUT_FLOAT_OPERAND + #define ASM_OUTPUT_FLOAT_OPERAND(FILE,VALUE) \ + fprintf (FILE, "#0r%.9g", (VALUE)) + + #undef ASM_OUTPUT_DOUBLE_OPERAND + #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \ + fprintf (FILE, "#0r%.20g", (VALUE)) + + #define USE_GAS diff -rc2N gcc-1.34/config/tm-convex.h gcc-1.35/config/tm-convex.h *** gcc-1.34/config/tm-convex.h Wed Feb 22 12:28:01 1989 --- gcc-1.35/config/tm-convex.h Mon Apr 10 23:22:32 1989 *************** *** 21,25 **** /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-Dconvex -Dunix" /* Print subsidiary information on the compiler version in use. */ --- 21,25 ---- /* Names to predefine in the preprocessor for this target machine. */ ! #define CPP_PREDEFINES "-Dconvex -Dparsec -Dunix" /* Print subsidiary information on the compiler version in use. */ *************** *** 120,123 **** --- 120,126 ---- #define STRUCTURE_SIZE_BOUNDARY 8 + /* A bitfield declared as `int' forces `int' alignment for the struct. */ + #define PCC_BITFIELD_TYPE_MATTERS + /* No data type wants to be aligned rounder than this. */ /* beware of doubles in structs -- 64 is incompatible with pcc */ *************** *** 243,251 **** or could index an array. */ #define S_REGNO_P(REGNO) ((REGNO) < 8) #define A_REGNO_P(REGNO) ((REGNO) >= 8) ! #define REGNO_REG_CLASS(REGNO) \ ! (S_REGNO_P (REGNO) ? S_REGS : A_REGS) /* The class value for index registers, and the one for base regs. */ --- 246,257 ---- or could index an array. */ + #define REGNO_REG_CLASS(REGNO) \ + (S_REGNO_P (REGNO) ? S_REGS : A_REGS) + #define S_REGNO_P(REGNO) ((REGNO) < 8) #define A_REGNO_P(REGNO) ((REGNO) >= 8) ! #define S_REG_P(X) (REG_P (X) && S_REGNO_P (REGNO (X))) ! #define A_REG_P(X) (REG_P (X) && A_REGNO_P (REGNO (X))) /* The class value for index registers, and the one for base regs. */ *************** *** 471,477 **** #define REGNO_OK_FOR_INDEX_P(regno) \ ! (((regno) ^ 010) < 8 || ((reg_renumber[regno] ^ 010) & -8) == 0) ! #define REGNO_OK_FOR_BASE_P(regno) \ ! (((regno) ^ 010) < 8 || ((reg_renumber[regno] ^ 010) & -8) == 0) \f /* Maximum number of registers that can appear in a valid memory address. */ --- 477,484 ---- #define REGNO_OK_FOR_INDEX_P(regno) \ ! ((((regno) ^ 010) < 8 || ((reg_renumber[regno] ^ 010) & -8) == 0) \ ! && regno != 8) ! ! #define REGNO_OK_FOR_BASE_P(regno) REGNO_OK_FOR_INDEX_P (regno) \f /* Maximum number of registers that can appear in a valid memory address. */ *************** *** 509,516 **** /* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. */ ! #define REG_OK_FOR_INDEX_P(X) (REGNO (X) >= 8) /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */ ! #define REG_OK_FOR_BASE_P(X) (REGNO (X) >= 8) #else --- 516,523 ---- /* Nonzero if X is a hard reg that can be used as an index or if it is a pseudo reg. */ ! #define REG_OK_FOR_INDEX_P(X) (REGNO (X) > 8) /* Nonzero if X is a hard reg that can be used as a base reg or if it is a pseudo reg. */ ! #define REG_OK_FOR_BASE_P(X) (REGNO (X) > 8) #else *************** *** 930,934 **** #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ --- 937,941 ---- #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ *************** *** 980,983 **** \ if (index) \ ! fprintf (FILE, "(%s)", reg_name[REGNO (index)]); \ } --- 987,991 ---- \ if (index) \ ! fprintf (FILE, "(%s)", reg_names[REGNO (index)]); \ } + diff -rc2N gcc-1.34/config/tm-encore.h gcc-1.35/config/tm-encore.h *** gcc-1.34/config/tm-encore.h Wed Feb 22 12:27:57 1989 --- gcc-1.35/config/tm-encore.h Wed Mar 29 17:41:26 1989 *************** *** 58,64 **** /* Ignore certain cpp directives used in header files on sysV. */ - #define IDENT_DIRECTIVE #define SCCS_DIRECTIVE /* The .file command should always begin the output. */ #define ASM_FILE_START(FILE) sdbout_filename ((FILE), main_input_filename) --- 58,66 ---- /* Ignore certain cpp directives used in header files on sysV. */ #define SCCS_DIRECTIVE + /* Output #ident as a .ident. */ + #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); + /* The .file command should always begin the output. */ #define ASM_FILE_START(FILE) sdbout_filename ((FILE), main_input_filename) *************** *** 95,99 **** #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! fprintf (FILE, "\t.long 0l%.20e\n", (VALUE)) #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ --- 97,101 ---- #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ ! fprintf (FILE, "\t.long 0f%.20e\n", (VALUE)) #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ *************** *** 136,140 **** /* * Dollar signs are required before immediate operands, double ! * floating point constants use $0l syntax, and external addresses * should be prefixed with a question mark to avoid assembler warnings * about undefined symbols. --- 138,142 ---- /* * Dollar signs are required before immediate operands, double ! * floating point constants use $0f syntax, and external addresses * should be prefixed with a question mark to avoid assembler warnings * about undefined symbols. *************** *** 145,149 **** else if (CODE == '?') fputc ('?', FILE); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ { \ --- 147,151 ---- else if (CODE == '?') fputc ('?', FILE); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ { \ *************** *** 157,161 **** fprintf (FILE, "0(0(sp))"); \ else fprintf (FILE, "0(0(%s))", \ ! reg_name [REGNO (XEXP (xfoo, 0))]); \ else \ { \ --- 159,163 ---- fprintf (FILE, "0(0(sp))"); \ else fprintf (FILE, "0(0(%s))", \ ! reg_names[REGNO (XEXP (xfoo, 0))]); \ else \ { \ *************** *** 166,170 **** break; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_name [REGNO (xfoo)]); \ break; \ case PRE_DEC: \ --- 168,172 ---- break; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]); \ break; \ case PRE_DEC: \ *************** *** 184,188 **** { union { double d; int i[2]; } u; \ u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ ! fprintf (FILE, "$0l%.20e", u.d); } \ else { union { double d; int i[2]; } u; \ u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ --- 186,190 ---- { union { double d; int i[2]; } u; \ u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ ! fprintf (FILE, "$0f%.20e", u.d); } \ else { union { double d; int i[2]; } u; \ u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ diff -rc2N gcc-1.34/config/tm-genix.h gcc-1.35/config/tm-genix.h *** gcc-1.34/config/tm-genix.h Wed Feb 22 12:27:54 1989 --- gcc-1.35/config/tm-genix.h Wed Mar 29 17:41:24 1989 *************** *** 103,107 **** else if (CODE == '?'); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ { \ --- 103,107 ---- else if (CODE == '?'); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ { \ *************** *** 115,119 **** fprintf (FILE, "0(0(sp))"); \ else fprintf (FILE, "0(0(%s))", \ ! reg_name [REGNO (XEXP (xfoo, 0))]); \ else \ { \ --- 115,119 ---- fprintf (FILE, "0(0(sp))"); \ else fprintf (FILE, "0(0(%s))", \ ! reg_names[REGNO (XEXP (xfoo, 0))]); \ else \ { \ *************** *** 128,132 **** break; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_name [REGNO (xfoo)]); \ break; \ case PRE_DEC: \ --- 128,132 ---- break; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]); \ break; \ case PRE_DEC: \ diff -rc2N gcc-1.34/config/tm-hp9k320.h gcc-1.35/config/tm-hp9k320.h *** gcc-1.34/config/tm-hp9k320.h Wed Feb 22 17:59:05 1989 --- gcc-1.35/config/tm-hp9k320.h Fri Apr 14 11:11:14 1989 *************** *** 144,148 **** { register int regno; \ register int mask = 0; \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ int fsize = (SIZE); \ --- 144,147 ---- *************** *** 178,182 **** int offset, foffset; \ extern char call_used_regs[]; \ - static char *reg_names[] = REGISTER_NAMES; \ extern int current_function_pops_args; \ extern int current_function_args_size; \ --- 177,180 ---- *************** *** 345,352 **** else if (CODE == '-') fprintf (FILE, "-(%%sp)"); \ else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ ! else if (CODE == 's') fprintf (FILE, "(%%sp)"); \ else if (CODE == '!') fprintf (FILE, "%%cc"); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ --- 343,350 ---- else if (CODE == '-') fprintf (FILE, "-(%%sp)"); \ else if (CODE == '+') fprintf (FILE, "(%%sp)+"); \ ! else if (CODE == '@') fprintf (FILE, "(%%sp)"); \ else if (CODE == '!') fprintf (FILE, "%%cc"); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ *************** *** 373,383 **** { \ case REG: \ ! fprintf (FILE, "(%s)", reg_name [REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "-(%s)", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "(%s)+", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ --- 371,381 ---- { \ case REG: \ ! fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ *************** *** 460,464 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "L%d-LI%d(%%pc,%s.l", \ --- 458,462 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "L%d-LI%d(%%pc,%s.l", \ *************** *** 465,469 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, "*%d", scale); \ putc (')', FILE); \ --- 463,467 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, "*%d", scale); \ putc (')', FILE); \ *************** *** 475,479 **** if (addr != 0) \ output_addr_const (FILE, addr); \ ! fprintf (FILE, "(%s", reg_name[REGNO (breg)]); \ if (ireg != 0) \ putc (',', FILE); \ --- 473,477 ---- if (addr != 0) \ output_addr_const (FILE, addr); \ ! fprintf (FILE, "(%s", reg_names[REGNO (breg)]); \ if (ireg != 0) \ putc (',', FILE); \ *************** *** 482,488 **** ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s.w", reg_name[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s.l", reg_name[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, "*%d", scale); \ putc (')', FILE); \ --- 480,486 ---- ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, "*%d", scale); \ putc (')', FILE); \ *************** *** 493,497 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (reg1)]); \ break; } \ default: \ --- 491,495 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (reg1)]); \ break; } \ default: \ *************** *** 563,566 **** --- 561,568 ---- { fprintf ((FILE), "mov"); (PTR) += 4; } \ } + + /* Prevent output of `gcc_compiled.:'. + + #define ASM_IDENTIFY_GCC(FILE) #else /* not HPUX_ASM */ diff -rc2N gcc-1.34/config/tm-i386gas.h gcc-1.35/config/tm-i386gas.h *** gcc-1.34/config/tm-i386gas.h Wed Feb 22 12:27:45 1989 --- gcc-1.35/config/tm-i386gas.h Wed Mar 29 17:31:07 1989 *************** *** 51,58 **** #define CPP_PREDEFINES "-Dunix -Di386" ! /* Allow #ident and #sccs in preprocessor. */ - #define IDENT_DIRECTIVE #define SCCS_DIRECTIVE /* We do not want to output SDB debugging information. */ --- 51,61 ---- #define CPP_PREDEFINES "-Dunix -Di386" ! /* Allow #sccs in preprocessor. */ #define SCCS_DIRECTIVE + + /* Output #ident as a .ident. */ + + #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); /* We do not want to output SDB debugging information. */ diff -rc2N gcc-1.34/config/tm-i386v.h gcc-1.35/config/tm-i386v.h *** gcc-1.34/config/tm-i386v.h Wed Feb 22 12:27:43 1989 --- gcc-1.35/config/tm-i386v.h Wed Mar 29 17:31:06 1989 *************** *** 40,47 **** #define CPP_PREDEFINES "-Dunix -Di386" ! /* Allow #ident and #sccs in preprocessor. */ - #define IDENT_DIRECTIVE #define SCCS_DIRECTIVE /* We want to output SDB debugging information. */ --- 40,50 ---- #define CPP_PREDEFINES "-Dunix -Di386" ! /* Allow #sccs in preprocessor. */ #define SCCS_DIRECTIVE + + /* Output #ident as a .ident. */ + + #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); /* We want to output SDB debugging information. */ diff -rc2N gcc-1.34/config/tm-m68k.h gcc-1.35/config/tm-m68k.h *** gcc-1.34/config/tm-m68k.h Wed Feb 22 12:27:39 1989 --- gcc-1.35/config/tm-m68k.h Tue Apr 11 15:57:06 1989 *************** *** 596,600 **** { register int regno; \ register int mask = 0; \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ int fsize = ((SIZE) + 3) & -4; \ --- 596,599 ---- *************** *** 633,637 **** #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\ttstl LPBX0\n\tbne LPI%d\n\tpea LPBX0\n\tcall ___bb_init_func\n\taddql #4,sp\nLPI%d:\n", \ LABELNO, LABELNO); --- 632,636 ---- #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\ttstl LPBX0\n\tbne LPI%d\n\tpea LPBX0\n\tjsr ___bb_init_func\n\taddql #4,sp\nLPI%d:\n", \ LABELNO, LABELNO); *************** *** 665,669 **** int offset, foffset, fpoffset; \ extern char call_used_regs[]; \ - static char *reg_names[] = REGISTER_NAMES; \ extern int current_function_pops_args; \ extern int current_function_args_size; \ --- 664,667 ---- *************** *** 1109,1126 **** { CC_STATUS_INIT; } \ else if (GET_CODE (EXP) == SET) \ ! { if (ADDRESS_REG_P (XEXP (EXP, 0))) \ { if (cc_status.value1 \ ! && reg_overlap_mentioned_p (XEXP (EXP, 0), cc_status.value1)) \ cc_status.value1 = 0; \ if (cc_status.value2 \ ! && reg_overlap_mentioned_p (XEXP (EXP, 0), cc_status.value2)) \ cc_status.value2 = 0; } \ ! else if (!FP_REG_P (XEXP (EXP, 0)) \ ! && XEXP (EXP, 0) != cc0_rtx \ ! && (FP_REG_P (XEXP (EXP, 1)) \ ! || GET_CODE (XEXP (EXP, 1)) == FIX \ ! || GET_CODE (XEXP (EXP, 1)) == FLOAT_TRUNCATE \ ! || GET_CODE (XEXP (EXP, 1)) == FLOAT_EXTEND)) \ { CC_STATUS_INIT; } \ else if (GET_CODE (SET_SRC (EXP)) == CALL) \ { CC_STATUS_INIT; } \ --- 1107,1132 ---- { CC_STATUS_INIT; } \ else if (GET_CODE (EXP) == SET) \ ! { if (ADDRESS_REG_P (SET_DEST (EXP))) \ { if (cc_status.value1 \ ! && reg_overlap_mentioned_p (SET_DEST (EXP), cc_status.value1)) \ cc_status.value1 = 0; \ if (cc_status.value2 \ ! && reg_overlap_mentioned_p (SET_DEST (EXP), cc_status.value2)) \ cc_status.value2 = 0; } \ ! else if (!FP_REG_P (SET_DEST (EXP)) \ ! && SET_DEST (EXP) != cc0_rtx \ ! && (FP_REG_P (SET_SRC (EXP)) \ ! || GET_CODE (SET_SRC (EXP)) == FIX \ ! || GET_CODE (SET_SRC (EXP)) == FLOAT_TRUNCATE \ ! || GET_CODE (SET_SRC (EXP)) == FLOAT_EXTEND)) \ { CC_STATUS_INIT; } \ + /* A pair of move insns doesn't produce a useful overall cc. */ \ + else if (!FP_REG_P (SET_DEST (EXP)) \ + && !FP_REG_P (SET_SRC (EXP)) \ + && GET_MODE_SIZE (GET_MODE (SET_SRC (EXP))) > 4 \ + && (GET_CODE (SET_SRC (EXP)) == REG \ + || GET_CODE (SET_SRC (EXP)) == MEM \ + || GET_CODE (SET_SRC (EXP)) == CONST_DOUBLE))\ + { CC_STATUS_INIT; } \ else if (GET_CODE (SET_SRC (EXP)) == CALL) \ { CC_STATUS_INIT; } \ *************** *** 1379,1384 **** On the 68000, we use several CODE characters: - 'f' for float insn (print a CONST_DOUBLE as a float rather than in hex) - 'b' for byte insn (no effect, on the Sun; this is for the ISI). '.' for dot needed in Motorola-style opcode names. '-' for an operand pushing on the stack: --- 1385,1388 ---- *************** *** 1386,1390 **** '+' for an operand pushing on the stack: sp@+, (sp)+ or (%sp)+ depending on the style of syntax. ! 's' for a reference to the top word on the stack: sp@, (sp) or (%sp) depending on the style of syntax. '#' for an immediate operand prefix (# in MIT and Motorola syntax --- 1390,1394 ---- '+' for an operand pushing on the stack: sp@+, (sp)+ or (%sp)+ depending on the style of syntax. ! '@' for a reference to the top word on the stack: sp@, (sp) or (%sp) depending on the style of syntax. '#' for an immediate operand prefix (# in MIT and Motorola syntax *************** *** 1392,1395 **** --- 1396,1402 ---- '!' for the cc register (used in an `and to cc' insn). + 'b' for byte insn (no effect, on the Sun; this is for the ISI). + 'd' to force memory addressing to be absolute, not relative. + 'f' for float insn (print a CONST_DOUBLE as a float rather than in hex) 'w' for FPA insn (print a CONST_DOUBLE as a SunFPA constant rather than directly). Second part of 'y' below. *************** *** 1406,1419 **** else if (CODE == '-') fprintf (FILE, "sp@-"); \ else if (CODE == '+') fprintf (FILE, "sp@+"); \ ! else if (CODE == 's') fprintf (FILE, "sp@"); \ else if (CODE == '!') fprintf (FILE, "cc"); \ else if (GET_CODE (X) == REG) \ { if (REGNO (X) < 16 && (CODE == 'y' || CODE == 'x') && GET_MODE (X) == DFmode) \ ! fprintf (FILE, "%s:%s", reg_name [REGNO (X)], reg_name [REGNO (X)+1]); \ else \ ! fprintf (FILE, "%s", reg_name[REGNO (X)]); \ } \ else if (GET_CODE (X) == MEM) \ ! output_address (XEXP (X, 0)); \ else if ((CODE == 'y' || CODE == 'w') \ && GET_CODE(X) == CONST_DOUBLE \ --- 1413,1431 ---- else if (CODE == '-') fprintf (FILE, "sp@-"); \ else if (CODE == '+') fprintf (FILE, "sp@+"); \ ! else if (CODE == '@') fprintf (FILE, "sp@"); \ else if (CODE == '!') fprintf (FILE, "cc"); \ else if (GET_CODE (X) == REG) \ { if (REGNO (X) < 16 && (CODE == 'y' || CODE == 'x') && GET_MODE (X) == DFmode) \ ! fprintf (FILE, "%s:%s", reg_names[REGNO (X)], reg_names[REGNO (X)+1]); \ else \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ } \ else if (GET_CODE (X) == MEM) \ ! { \ ! output_address (XEXP (X, 0)); \ ! if (CODE == 'd' && ! TARGET_68020 \ ! && CONSTANT_ADDRESS_P (XEXP (X, 0))) \ ! fprintf (FILE, ":l"); \ ! } \ else if ((CODE == 'y' || CODE == 'w') \ && GET_CODE(X) == CONST_DOUBLE \ *************** *** 1446,1456 **** { \ case REG: \ ! fprintf (FILE, "%s@", reg_name [REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "%s@-", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "%s@+", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ --- 1458,1468 ---- { \ case REG: \ ! fprintf (FILE, "%s@", reg_names[REGNO (addr)]); \ break; \ case PRE_DEC: \ ! fprintf (FILE, "%s@-", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ ! fprintf (FILE, "%s@+", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case PLUS: \ *************** *** 1533,1537 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "pc@(L%d-LI%d-2:b,%s:l", \ --- 1545,1549 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (XEXP (ireg, 0))]); \ else \ fprintf (FILE, "pc@(L%d-LI%d-2:b,%s:l", \ *************** *** 1538,1542 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ putc (')', FILE); \ --- 1550,1554 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ putc (')', FILE); \ *************** *** 1546,1550 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (breg)]); \ putc (')', FILE); \ break; } \ --- 1558,1562 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (breg)]); \ putc (')', FILE); \ break; } \ *************** *** 1554,1558 **** abort (); \ if (addr && GET_CODE (addr) == LABEL_REF) abort (); \ ! fprintf (FILE, "%s@(", reg_name[REGNO (breg)]); \ if (addr != 0) \ output_addr_const (FILE, addr); \ --- 1566,1570 ---- abort (); \ if (addr && GET_CODE (addr) == LABEL_REF) abort (); \ ! fprintf (FILE, "%s@(", reg_names[REGNO (breg)]); \ if (addr != 0) \ output_addr_const (FILE, addr); \ *************** *** 1563,1569 **** ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s:w", reg_name[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s:l", reg_name[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ putc (')', FILE); \ --- 1575,1581 ---- ireg = XEXP (ireg, 0); } \ if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ ! fprintf (FILE, "%s:w", reg_names[REGNO (XEXP (ireg, 0))]); \ else if (ireg != 0) \ ! fprintf (FILE, "%s:l", reg_names[REGNO (ireg)]); \ if (scale != 1) fprintf (FILE, ":%d", scale); \ putc (')', FILE); \ *************** *** 1574,1578 **** CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_name[REGNO (reg1)]); \ break; } \ default: \ --- 1586,1590 ---- CODE_LABEL_NUMBER (XEXP (addr, 0)), \ CODE_LABEL_NUMBER (XEXP (addr, 0)), \ ! reg_names[REGNO (reg1)]); \ break; } \ default: \ diff -rc2N gcc-1.34/config/tm-m88k.h gcc-1.35/config/tm-m88k.h *** gcc-1.34/config/tm-m88k.h Wed Feb 22 12:27:37 1989 --- gcc-1.35/config/tm-m88k.h Wed Mar 29 17:48:43 1989 *************** *** 441,445 **** #define FUNCTION_PROLOGUE(FILE, SIZE) \ { \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ extern int current_function_pretend_args_size; \ --- 441,444 ---- *************** *** 509,513 **** #define FUNCTION_EPILOGUE(FILE, SIZE) \ { \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ extern int may_call_alloca; \ --- 508,511 ---- *************** *** 1068,1072 **** #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ --- 1066,1070 ---- #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ *************** *** 1097,1101 **** { \ case REG: \ ! fprintf (FILE, "r0,%s", reg_name [REGNO (addr)]); \ break; \ case PLUS: \ --- 1095,1099 ---- { \ case REG: \ ! fprintf (FILE, "r0,%s", reg_names[REGNO (addr)]); \ break; \ case PLUS: \ *************** *** 1107,1121 **** if (REG_P (reg1)) \ fprintf (FILE, "%s,%s", \ ! reg_name [REGNO (reg0)], \ ! reg_name[REGNO (reg1)]); \ else if (GET_CODE (reg1) == CONST_INT) \ { \ int offset = INTVAL (reg1); \ ! fprintf (FILE, "%s,%d", reg_name [REGNO (reg0)], offset); \ } \ else if (GET_CODE (reg1) == MULT) \ fprintf (FILE, "%s[%s]", \ ! reg_name[REGNO (reg0)], \ ! reg_name[REGNO (XEXP (reg1, 0))]); \ else fatal ("bad XEXP (1) to PRINT_OPERAND_ADDRESS"); \ else fatal ("unknown PLUS case in PRINT_OPERAND_ADDRESS"); \ --- 1105,1119 ---- if (REG_P (reg1)) \ fprintf (FILE, "%s,%s", \ ! reg_names[REGNO (reg0)], \ ! reg_names[REGNO (reg1)]); \ else if (GET_CODE (reg1) == CONST_INT) \ { \ int offset = INTVAL (reg1); \ ! fprintf (FILE, "%s,%d", reg_names[REGNO (reg0)], offset); \ } \ else if (GET_CODE (reg1) == MULT) \ fprintf (FILE, "%s[%s]", \ ! reg_names[REGNO (reg0)], \ ! reg_names[REGNO (XEXP (reg1, 0))]); \ else fatal ("bad XEXP (1) to PRINT_OPERAND_ADDRESS"); \ else fatal ("unknown PLUS case in PRINT_OPERAND_ADDRESS"); \ *************** *** 1122,1126 **** break; \ case MULT: \ ! fprintf (FILE, "r0[%s]", reg_name[REGNO (XEXP (addr, 0))]); \ break; \ default: \ --- 1120,1124 ---- break; \ case MULT: \ ! fprintf (FILE, "r0[%s]", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ default: \ diff -rc2N gcc-1.34/config/tm-mips.h gcc-1.35/config/tm-mips.h *** gcc-1.34/config/tm-mips.h Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/tm-mips.h Fri Apr 7 15:40:44 1989 *************** *** 0 **** --- 1,1588 ---- + /* Definitions of target machine for GNU compiler. MIPS version. + Contributed by A. Lichnewsky, lich@inria.inria.fr + Copyright (C) 1989 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /* ??? This file needs to be reformatted so that it looks like the + rest of GCC. ??? */ + + /* Currently we know of 2 MIPS machines: MIPS- M series, and DECStations. */ + /* Therefore we discriminate by declaring DECStations with */ + /* #define DECSTATION */ + \f + /* Names to predefine in the preprocessor for this target machine. */ + + #define CPP_PREDEFINES "-Dmips" + #ifdef DECSTATION + #define CPP_SPEC " -DR3000 -DLANGUAGE_C -DMIPSEL -DSYSTYPE_BSD " + #else + #define CPP_SPEC " -DR3000 -Dhost_mips -DMIPSEB -DSYSTYPE_BSD -DLANGUAGE_C " + #endif + + /* Extra switches sometimes passed to the assembler. */ + + #define ASM_SPEC "%{O:-O2}" + + /* Print subsidiary information on the compiler version in use. */ + + #define TARGET_VERSION printf (" (AL-MIPS 1.04) <Naive-MIPS>\n"); + /* Depends on MIPS ASM format */ + #define TARGET_VERSNUM "1 04" + + /* Do not Generate DBX debugging information. */ + + /* #define DBX_DEBUGGING_INFO */ + + /* Run-time compilation parameters selecting different hardware subsets. */ + + extern int target_flags; + + /* Macros used in the machine description to test the flags. */ + + /* Nonzero if compiling code that Unix assembler can assemble. */ + #define TARGET_UNIX_ASM (target_flags & 1) + /* Debug Mode + */ + #define TARGET_DEBUG_MODE (target_flags & 2) + #define TARGET_DEBUGA_MODE (target_flags & 4) + #define TARGET_DEBUGB_MODE (target_flags & 16) + #define TARGET_DEBUGC_MODE (target_flags & 32) + #define TARGET_DEBUGD_MODE (target_flags & 64) + #define TARGET_NAME_REGS (target_flags & 8) + #define TARGET_NOFIXED_OVFL (target_flags & 128) + + #define AL_DEBUG + + /* Macro to define tables used to set the flags. + This is a list in braces of pairs in braces, + each pair being { "NAME", VALUE } + where VALUE is the bits to set or minus the bits to clear. + An empty string NAME is used to identify the default VALUE. */ + + #define TARGET_SWITCHES \ + { {"unix", 1}, \ + {"gnu", -1}, \ + {"debug", 2 }, /* RELOAD and CONSTRAINTS Related DEBUG */\ + {"nodebug", -2 }, \ + {"debuga", 4 }, /* CALLING SEQUENCE RELATED DEBUG */\ + {"nodebuga", -4 }, \ + {"debugb", 16 }, /* GLOBAL/LOCAL ALLOC DEBUG */\ + {"nodebugb", -16 }, \ + {"debugc", 32 }, /* SPILL/RELOAD REGISTER ALLOCATOR DEBUG */\ + {"nodebugc", -32 }, \ + {"debugd", 64 }, /* CSE DEBUG */\ + {"nodebugd", -64 }, \ + {"rnames", 8 }, /* Output register names like $a0 */\ + {"nornames", -8 }, /* Output register numbers like $21 */\ + {"nofixed-ovfl",128}, /* use addu and subu */\ + {"fixed-ovfl", -128}, /* use addu and subu */\ + { "", TARGET_DEFAULT}} + + /* Default target_flags if no switches specified. */ + + #define TARGET_DEFAULT 129 + \f + /* Target machine storage layout */ + + /* Define this if most significant bit is lowest numbered + in instructions that operate on numbered bit-fields. + */ + /* #define BITS_BIG_ENDIAN */ + + /* Define this if most significant byte of a word is the lowest numbered. + */ + #ifndef DECSTATION + #define BYTES_BIG_ENDIAN + #endif + /* Define this if most significant word of a multiword number is numbered. + */ + #ifndef DECSTATION + #define WORDS_BIG_ENDIAN + #endif + /* Number of bits in an addressible storage unit */ + #define BITS_PER_UNIT 8 + + /* Width in bits of a "word", which is the contents of a machine register. + Note that this is not necessarily the width of data type `int'; + if using 16-bit ints on a 68000, this would still be 32. + But on a machine with 16-bit registers, this would be 16. */ + #define BITS_PER_WORD 32 + + /* Width of a word, in units (bytes). */ + #define UNITS_PER_WORD 4 + + /* Width in bits of a pointer. + See also the macro `Pmode' defined below. */ + #define POINTER_SIZE 32 + + /* Allocation boundary (in *bits*) for storing pointers in memory. */ + #define POINTER_BOUNDARY 32 + + /* Allocation boundary (in *bits*) for storing arguments in argument list. */ + #define PARM_BOUNDARY 32 + + /* Give parms extra alignment, up to this much, if their types want it. */ + #define MAX_PARM_BOUNDARY 64 + + /* Allocation boundary (in *bits*) for the code of a function. */ + #define FUNCTION_BOUNDARY 32 + + /* Alignment of field after `int : 0' in a structure. */ + #define EMPTY_FIELD_BOUNDARY 32 + + /* Every structure's size must be a multiple of this. */ + #define STRUCTURE_SIZE_BOUNDARY 16 + + /* There is no point aligning anything to a rounder boundary than this. */ + #define BIGGEST_ALIGNMENT 64 + + /* Define this if move instructions will actually fail to work + when given unaligned data. */ + #define STRICT_ALIGNMENT + \f + /* Standard register usage. */ + + /* Number of actual hardware registers. + The hardware registers are assigned numbers for the compiler + from 0 to just below FIRST_PSEUDO_REGISTER. + All registers that the compiler knows about must be given numbers, + even those that are not normally considered general registers. */ + #define FIRST_PSEUDO_REGISTER 64 + + /* 1 for registers that have pervasive standard uses + and are not available for the register allocator. + + On the MIPS, see conventions, page D-2 + + I have chosen not to take Multiply/Divide HI,LO or PC into + account. + */ + #define FIXED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1,\ + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,\ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\ + } + + + /* 1 for registers not available across function calls. + These must include the FIXED_REGISTERS and also any + registers that can be used without being saved. + The latter must include the registers where values are returned + and the register where structure-value addresses are passed. + Aside from that, you can include as many other registers as you like. */ + #define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1,\ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\ + 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\ + } + + + /* Return number of consecutive hard regs needed starting at reg REGNO + to hold something of mode MODE. + This is ordinarily the length in words of a value of mode MODE + but can be less for certain modes in special long registers. + + On the MIPS, all general registers are one word long. I have chosen to + use Floating point register pairs. + */ + #define HARD_REGNO_NREGS(REGNO, MODE) \ + (((MODE == SFmode) ||(MODE == DFmode)) ? 2 :\ + ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) + + /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE. + On the MIPS, all general registers can hold all modes, except + FLOATING POINT. */ + + #define HARD_REGNO_MODE_OK(REGNO, MODE) \ + (((REGNO) <32) ? ((MODE) != SFmode) && ((MODE) != DFmode)\ + : ( ((MODE) == SFmode) || ((MODE) == DFmode)) \ + && (((REGNO) % 2 ) == 0)) + + + /* Value is 1 if it is a good idea to tie two pseudo registers + when one has mode MODE1 and one has mode MODE2. + If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2, + for any hard reg, then this must be 0 for correct output. */ + #define MODES_TIEABLE_P(MODE1, MODE2) \ + ( ((MODE1) == SFmode || (MODE1) == DFmode) \ + == ((MODE2) == SFmode || (MODE2) == DFmode)) + + /* MIPS pc is apparently not overloaded on a register. */ + /* #define PC_REGNUM 15 */ + + /* Register to use for pushing function arguments. */ + #define STACK_POINTER_REGNUM 29 + + /* Base register for access to local variables of the function. */ + #define FRAME_POINTER_REGNUM 30 + + /* Value should be nonzero if functions must have frame pointers. + Zero means the frame pointer need not be set up (and parms + may be accessed via the stack pointer) in functions that seem suitable. + This is computed in `reload', in reload1.c. */ + #define FRAME_POINTER_REQUIRED 0 + + /* Base register for access to arguments of the function. */ + #define ARG_POINTER_REGNUM FRAME_POINTER_REGNUM + + /* Register in which static-chain is passed to a function. */ + #define STATIC_CHAIN_REGNUM 2 + + /* Register in which address to store a structure value + is passed to a function. */ + #define STRUCT_VALUE_REGNUM 3 + \f + /* Define the classes of registers for register constraints in the + machine description. Also define ranges of constants. + + One of the classes must always be named ALL_REGS and include all hard regs. + If there is more than one class, another class must be named NO_REGS + and contain no registers. + + The name GENERAL_REGS must be the name of a class (or an alias for + another name such as ALL_REGS). This is the class of registers + that is allowed by "g" or "r" in a register constraint. + Also, registers outside this class are allocated only when + instructions express preferences for them. + + The classes must be numbered in nondecreasing order; that is, + a larger-numbered class must never be contained completely + in a smaller-numbered class. + + For any two classes, it is very desirable that there be another + class that represents their union. */ + + /* The MIPS has general and floating point registers, + */ + + + enum reg_class { NO_REGS, GR_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES } ; + + #define N_REG_CLASSES (int) LIM_REG_CLASSES + + /* Since GENERAL_REGS is the same class as ALL_REGS, + don't give it a different class number; just make it an alias. */ + + #define GENERAL_REGS GR_REGS + + /* Give names of register classes as strings for dump file. */ + + #define REG_CLASS_NAMES \ + {"NO_REGS", "GR_REGS", "FP_REGS", "ALL_REGS" } + + /* Define which registers fit in which classes. + This is an initializer for a vector of HARD_REG_SET + of length N_REG_CLASSES. */ + + #define REG_CLASS_CONTENTS {{0x00000000, 0x00000000},\ + {0xffffffff, 0x00000000},\ + {0x00000000, 0xffffffff},\ + {0xffffffff, 0xffffffff}} + + + /* The same information, inverted: + Return the class number of the smallest class containing + reg number REGNO. This could be a conditional expression + or could index an array. */ + + #define REGNO_REG_CLASS(REGNO) \ + ( (REGNO >= 32) ? FP_REGS : GR_REGS) + + /* Define a table that lets us find quickly all the reg classes + containing a given one. This is the initializer for an + N_REG_CLASSES x N_REG_CLASSES array of reg class codes. + Row N is a sequence containing all the class codes for + classes that contain all the regs in class N. Each row + contains no duplicates, and is terminated by LIM_REG_CLASSES. */ + + /* We give just a dummy for the first element, which is for NO_REGS. */ + /* #define REG_CLASS_SUPERCLASSES {{LIM_REG_CLASSES},\ + {GR_REGS,ALL_REGS,LIM_REG_CLASSES},\ + {FP_REGS,ALL_REGS,LIM_REG_CLASSES},\ + {ALL_REGS,LIM_REG_CLASSES}\ + } + */ + /* We give just a dummy for the first element, which is for NO_REGS. */ + #define REG_CLASS_SUPERCLASSES {{LIM_REG_CLASSES},\ + {ALL_REGS,LIM_REG_CLASSES},\ + {ALL_REGS,LIM_REG_CLASSES},\ + {LIM_REG_CLASSES}\ + } + + /* The inverse relationship: + for each class, a list of all reg classes contained in it. */ + #define REG_CLASS_SUBCLASSES \ + {{LIM_REG_CLASSES},\ + {GR_REGS,LIM_REG_CLASSES},\ + {FP_REGS,LIM_REG_CLASSES},\ + {GR_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES}\ + } + + /* Define a table that lets us find quickly the class + for the subunion of any two classes. + + We say "subunion" because the result need not be exactly + the union; it may instead be a subclass of the union + (though the closer to the union, the better). + But if it contains anything beyond union of the two classes, + you will lose! + + This is an initializer for an N_REG_CLASSES x N_REG_CLASSES + array of reg class codes. The subunion of classes C1 and C2 + is just element [C1, C2]. */ + + #define REG_CLASS_SUBUNION {{NO_REGS, GR_REGS, FP_REGS, ALL_REGS}, \ + {GR_REGS, GR_REGS, ALL_REGS, ALL_REGS},\ + {FP_REGS, ALL_REGS, FP_REGS, ALL_REGS},\ + {ALL_REGS, ALL_REGS, ALL_REGS, ALL_REGS}} + + /* The class value for index registers, and the one for base regs. */ + + #define INDEX_REG_CLASS GR_REGS + #define BASE_REG_CLASS GR_REGS + + \f + /* REGISTER AND CONSTANT CLASSES + */ + + /* Get reg_class from a letter such as appears in the machine + description. */ + /* DEFINED REGISTER CLASSES: + ** + ** 'f' : Floating point registers + ** 'y' : General register when used to + ** transfer chunks of Floating point + ** with mfc1 mtc1 insn + */ + + #define REG_CLASS_FROM_LETTER(C) \ + ((C) == 'f' ? FP_REGS:\ + (C) == 'y' ? GR_REGS:NO_REGS) + + /* The letters I, J, K, L and M in a register constraint string + can be used to stand for particular ranges of immediate operands. + This macro defines what the ranges are. + C is the letter, and VALUE is a constant value. + Return 1 if VALUE is in the range specified by C. */ + + /* DEFINED INTEGER CONSTANT CLASSES: + ** + ** 'I' : any 16 bit integer + ** 'J' : 0 (use register $0) + */ + /* For MIPS, `I' is used for the range of constants an insn + can actually contain. + `J' is used for the range which is just zero (since that is R0). + */ + + #define SMALL_INT(X) ((unsigned) (INTVAL (X) + 0x10000) < 0x20000) + + #define CONST_OK_FOR_LETTER_P(VALUE, C) \ + ((C) == 'I' ? (unsigned) ((VALUE) + 0x10000) < 0x20000 \ + : (C) == 'J' ? (VALUE) == 0 \ + : 0) + + /* Similar, but for floating constants, and defining letters G and H. + Here VALUE is the CONST_DOUBLE rtx itself. */ + + /* DEFINED FLOATING CONSTANT CLASSES: + ** + ** 'G' : Floating point 0 + */ + #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \ + ((C) == 'G' && XINT (VALUE, 0) == 0 && XINT (VALUE, 1) == 0) + + /* Given an rtx X being reloaded into a reg required to be + in class CLASS, return the class of reg to actually use. + In general this is just CLASS; but on some machines + in some cases it is preferable to use a more restrictive class. */ + + #define PREFERRED_RELOAD_CLASS(X,CLASS) \ + (((GET_MODE(X) == SFmode) || (GET_MODE(X) == DFmode))? FP_REGS :\ + ((GET_MODE(X) == VOIDmode) ? GR_REGS :(CLASS))) + + /* Same but Mode has been extracted already + */ + + #define PREFERRED_RELOAD_CLASS_FM(X,CLASS) \ + ((((X) == SFmode) || ((X) == DFmode))? FP_REGS :\ + (((X) == VOIDmode) ? GR_REGS :(CLASS))) + + /* Return the maximum number of consecutive registers + needed to represent mode MODE in a register of class CLASS. */ + + #define CLASS_MAX_NREGS(CLASS, MODE) \ + ((((MODE) == DFmode) || ((MODE) == SFmode)) ? 2 \ + : ((MODE) == VOIDmode)? ((CLASS) == FP_REGS ? 2 :1) \ + : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) + + \f + /* Stack layout; function entry, exit and calling. */ + + /* Define this if pushing a word on the stack + makes the stack pointer a smaller address. */ + #define STACK_GROWS_DOWNWARD + + /* Define this if the nominal address of the stack frame + is at the high-address end of the local variables; + that is, each additional local variable allocated + goes at a more negative offset in the frame. */ + #define FRAME_GROWS_DOWNWARD + + /* Offset within stack frame to start allocating local variables at. + If FRAME_GROWS_DOWNWARD, this is the offset to the END of the + first local allocated. Otherwise, it is the offset to the BEGINNING + of the first local allocated. */ + #define STARTING_FRAME_OFFSET -4 + + /* If we generate an insn to push BYTES bytes, + this says how many the stack pointer really advances by. + On the vax, sp@- in a byte insn really pushes a word. */ + /* #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)*/ + + + /* Offset of first parameter from the argument pointer register value. */ + #define FIRST_PARM_OFFSET(FNDECL) 0 + + /* Offset from top-of-stack address to location to store the + function parameter if it can't go in a register. + Addresses for following parameters are computed relative to this one. */ + #define FIRST_PARM_CALLER_OFFSET(FNDECL) 0 + + /* When a parameter is passed in a register, stack space is still + allocated for it. */ + /* For the MIPS, stack space must be allocated, cf Asm Lang Prog Guide + page 7-8 + + BEWARE that some space is also allocated for non existing arguments + in register. In case an argument list is of form + GF used registers are a0 (a2,a3), but we should push over a1... not + used.. + */ + #define REG_PARM_STACK_SPACE + /* Align stack frames on 64 bits (Double Word ) + */ + + #define STACK_BOUNDARY 64 + \f + /* For the MIPS, there seems to be a minimum to the amount of stack space + used... evidence comes from the dis-assembled version of printf: + + cc (cc) + Mips Computer Systems 1.31 + /usr/lib/cpp1.31 + + + printf: + [printf.c: 14] 0x400510: 27bdffe8 addiu sp,sp,-24 + [printf.c: 14] 0x400514: afbf0014 sw ra,20(sp) + [printf.c: 14] 0x400518: afa5001c sw a1,28(sp) + [printf.c: 14] 0x40051c: afa60020 sw a2,32(sp) + [printf.c: 14] 0x400520: afa70024 sw a3,36(sp) + [printf.c: 18] 0x400524: 27a5001c addiu a1,sp,28 + */ + + #define STACK_ARG_ADJUST(SIZE) \ + { \ + SIZE.constant += 4; \ + if (SIZE.var) \ + { \ + rtx size1 = ARGS_SIZE_RTX (SIZE); \ + rtx rounded = gen_reg_rtx (SImode); \ + rtx label = gen_label_rtx (); \ + emit_move_insn (rounded, size1); \ + /* Needed: insns to jump to LABEL if ROUNDED is < 16. */ \ + abort (); \ + emit_move_insn (rounded, gen_rtx (CONST_INT, VOIDmode, 16)); \ + emit_label (label); \ + SIZE.constant = 0; \ + SIZE.var = rounded; \ + } \ + else if (SIZE.constant < 16) \ + SIZE.constant = 16; \ + } + \f + /* Value is 1 if returning from a function call automatically + pops the arguments described by the number-of-args field in the call. + FUNTYPE is the data type of the function (as a tree), + or for a library call it is an identifier node for the subroutine name. */ + + #define RETURN_POPS_ARGS(FUNTYPE) 0 + + /* Some subroutine macros specific to this machine. */ + #define BASE_RETURN_VALUE_REG(MODE) \ + ((MODE) == SFmode || (MODE) == DFmode ? 44 : 4) + #define BASE_OUTGOING_VALUE_REG(MODE) \ + ((MODE) == SFmode || (MODE) == DFmode ? 44 : 4) + #define BASE_PASSING_ARG_REG(MODE) (\ + ((MODE) == SFmode || (MODE) == DFmode ? 44 : 4) + #define BASE_INCOMING_ARG_REG(MODE) \ + ((MODE) == SFmode || (MODE) == DFmode ? 44 : 4) + + /* Define how to find the value returned by a function. + VALTYPE is the data type of the value (as a tree). + If the precise function being called is known, FUNC is its FUNCTION_DECL; + otherwise, FUNC is 0. */ + + #define FUNCTION_VALUE(VALTYPE, FUNC) \ + gen_rtx (REG, TYPE_MODE (VALTYPE), \ + (TYPE_MODE (VALTYPE) == SFmode) ||(TYPE_MODE (VALTYPE) == DFmode)?32 : 2) + + /* Define how to find the value returned by a library function + assuming the value has mode MODE. */ + + + #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE,\ + ((MODE) == DFmode || ( MODE) == SFmode) ? 32 : 2) + + /* 1 if N is a possible register number for a function value. + On the MIPS, R2 R3 and F0 F2 are the only register thus used. */ + /* Currently, R2 and F0 are only implemented here ( C has no complex type) + */ + + #define FUNCTION_VALUE_REGNO_P(N) ((N) == 2 || (N) == 32) + + /* 1 if N is a possible register number for function argument passing. + */ + + #define FUNCTION_ARG_REGNO_P(N) (((N) < 8 && (N) > 3) \ + ||((N) < 48 && (N) > 44 && (0 == (N) % 2))) + \f + /* Define a data type for recording info about an argument list + during the scan of that argument list. This data type should + hold all necessary information about the function itself + and about the args processed so far, enough to enable macros + such as FUNCTION_ARG to determine where the next arg should go. + */ + /* On MIPS the following automaton decides */ + /* where to put things. */ + /* If you dont believe it, look at Gerry Kane*/ + /* 's book page D-22 */ + + #define CUMULATIVE_ARGS struct { enum arg_state arg_rec_state;int restype,arg_num;} + + enum arg_state { ARG_STA_INIT =0, + ARG_STA_F =1, /* $f12 */ + ARG_STA_FF =2, /* $f12 $f14 */ + ARG_STA_FG =3, /* $f12 $6 */ + ARG_STA_FGG =4, /* $f12 $6 $7 */ + ARG_STA_FGF =5, /* $f12 $6 STACK */ + ARG_STA_G =6, /* $4 */ + ARG_STA_GF =7, /* $4 ($6,$7) */ + ARG_STA_GG =8, /* $4 $5 */ + ARG_STA_GGF =9, /* $4 $5 ($6,$7) */ + ARG_STA_GGG =10,/* $4 $5 $6 */ + ARG_STA_GGGF =11,/* $4 $5 $6 STACK */ + ARG_STA_GGGG =12 /* $4 $5 $6 $7 */ + }; + #define ARG_STA_AUTOMA \ + {\ + {ARG_STA_F,ARG_STA_G,44,4 }, /* ARG_STA_INIT */\ + {ARG_STA_FF,ARG_STA_FG,46,6 }, /* ARG_STA_F */\ + {ARG_STA_FF,ARG_STA_FF,-1,-1 }, /* ARG_STA_FF */\ + {ARG_STA_FGF,ARG_STA_FGG,-1,7 }, /* ARG_STA_FG */\ + {ARG_STA_FGG,ARG_STA_FGG,-1,-1 }, /* ARG_STA_FGG */\ + {ARG_STA_FGF,ARG_STA_FGF,-1,-1 }, /* ARG_STA_FGF */\ + {ARG_STA_GF,ARG_STA_GG,-2,5 }, /* ARG_STA_G */\ + {ARG_STA_GF,ARG_STA_GF,-1,-1 }, /* ARG_STA_GF */\ + {ARG_STA_GGF,ARG_STA_GGG,-2,6 }, /* ARG_STA_GG */\ + {ARG_STA_GGF,ARG_STA_GGF,-1,-1 }, /* ARG_STA_GGF */\ + {ARG_STA_GGGF,ARG_STA_GGGG,-1,7 }, /* ARG_STA_GGG */\ + {ARG_STA_GGGF,ARG_STA_GGGF,-1,-1 }, /* ARG_STA_GGGF */\ + {ARG_STA_GGGG,ARG_STA_GGGG,-1,-1 } /* ARG_STA_GGGG */\ + } + /* Initialize a variable CUM of type CUMULATIVE_ARGS + for a call to a function whose data type is FNTYPE. + For a library call, FNTYPE is 0. + + */ + + #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE) ((CUM.arg_rec_state) = ARG_STA_INIT,\ + (CUM.arg_num) = 0, (CUM.restype = (int)VOIDmode)) + + /* Update the data in CUM to advance over an argument + of mode MODE and data type TYPE. + (TYPE is null for libcalls where that information may not be available.) */ + + #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \ + ( function_arg_advance(&CUM,MODE,TYPE)); + + extern enum arg_state function_arg_advance(); + + /* Determine where to put an argument to a function. + Value is zero to push the argument on the stack, + or a hard register in which to store the argument. + + MODE is the argument's machine mode. + TYPE is the data type of the argument (as a tree). + This is null for libcalls where that information may + not be available. + CUM is a variable of type CUMULATIVE_ARGS which gives info about + the preceding args and about the function being called. + NAMED is nonzero if this argument is a named parameter + (otherwise it is an extra parameter matching an ellipsis). */ + + + + #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \ + ( (rtx) function_arg(&CUM,MODE,TYPE,NAMED)) + + /* Define where a function finds its arguments. + This is different from FUNCTION_ARG because of register windows. */ + + #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \ + ( (rtx) function_inarg(&CUM,MODE,TYPE,NAMED)) + + + /* For an arg passed partly in registers and partly in memory, + this is the number of registers used. + For args passed entirely in registers or entirely in memory, zero. + */ + + #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \ + ( 0) + \f + + /* This macro generates the assembly code for function entry. + FILE is a stdio stream to output the code to. + SIZE is an int: how many units of temporary storage to allocate. + Refer to the array `regs_ever_live' to determine which registers + to save; `regs_ever_live[I]' is nonzero if register number I + is ever used in the function. This macro is responsible for + knowing which registers should not be saved even if used. */ + + + /* ALIGN FRAMES on double word boundaries */ + + #define AL_ADJUST_ALIGN(LOC) (((LOC)+7) & 0xfffffff8) + + \f + /* The problem of Varargs comes from the register passing conventions + for Floating Point data. There is a conflict when we send registers + back to stack between registers $4,$5 $6,$7 and $f12, $f14. + + The current implementation: + a/ tries to figure out if the current routines uses varargs.(It becomes + ``suspect''. + + b/when a function is suspected of using varags, (is our varargs.h + has been included, and ``we think'' the macro va_start has been + used in this function, a larger reg save_area is allocated which + will hold regs f12 and f14. The varargs macros then have to find + where is the argument they are looking for. This is made easier + by a modification in stack frame layout for these functions:the + stack frame-size is accessible on stack at location 4($30). + + Total overhead in PROLOGUE: 2 inns to put stacksize on stack + 2 sw.d to save floating registers. + (Only when Varargs suspected) + + The only problem with ``thinking'', is that when functions are + thought using varargs and dont do it, they get the above entry + overhead. + + + See va-mips.h for more information on varargs + + */ + extern int varargs_suspect; + extern int this_varargs_suspect ; + + #if 0 + extern int function_suspect; + + #define FUNCTION_SUSPECT(COND) function_suspect |= (COND) + #define FUNCTION_NOTSUSPECT function_suspect = 0 + #define FUNCTION_SUSPECTED (function_suspect == 0xf ) + #endif + + #define VARARGS_SUSPECT(COND) varargs_suspect |= (COND) + #define VARARGS_NOTSUSPECT varargs_suspect = 0 + #define VARARGS_SUSPECTED (varargs_suspect) + + #define THIS_VARARGS_SUSPECT(COND) this_varargs_suspect |= (COND) + #define THIS_VARARGS_NOTSUSPECT this_varargs_suspect = 0 + #define THIS_VARARGS_SUSPECTED (this_varargs_suspect) + \f + + #define FUNCTION_PROLOGUE(FILE, SIZE) \ + { register int regno; \ + register int mask = 0, fmask=0; \ + static char dont_save_regs[] = CALL_USED_REGISTERS; \ + register int push_loc = 0,tsize = SIZE - (STARTING_FRAME_OFFSET)+4;\ + char *fp_str;\ + extern char *reg_numchar[];\ + extern int current_function_total_framesize; \ + this_varargs_suspect = VARARGS_SUSPECTED ;\ + fp_str = TARGET_NAME_REGS ? reg_names[STACK_POINTER_REGNUM]\ + : reg_numchar[STACK_POINTER_REGNUM];\ + for (regno = 0; regno < 32; regno++) \ + if (MUST_SAVE_REG_LOGUES || (regs_ever_live[regno] && !dont_save_regs[regno]))\ + {tsize += 4; mask |= 1 << regno;}\ + for (regno = 32; regno < FIRST_PSEUDO_REGISTER; regno += 2) \ + if (regs_ever_live[regno] && !dont_save_regs[regno]) \ + {tsize += 8; fmask |= 1 << (regno-32);}\ + if (THIS_VARARGS_SUSPECTED) tsize += 16; \ + fprintf(FILE," #PROLOGUE\n");\ + regno = STACK_POINTER_REGNUM; \ + tsize = AL_ADJUST_ALIGN(tsize); \ + \ + if(!frame_pointer_needed)\ + fprintf(FILE,"#define __0__gcc %d\n",tsize);\ + \ + push_loc = 0; current_function_total_framesize = tsize;\ + fprintf (FILE, " #\t.mask\t0x%x\n", mask); \ + for (regno = 31; regno >= 30; regno--) \ + {\ + if (MUST_SAVE_REG_LOGUES ||(regs_ever_live[regno] && !dont_save_regs[regno])){ \ + push_loc += 4;\ + fprintf(FILE,"\tsw\t%s,%d(%s)\n", TARGET_NAME_REGS ? reg_names[regno]\ + : reg_numchar[regno],push_loc-tsize,fp_str);}\ + \ + \ + } \ + if (THIS_VARARGS_SUSPECTED)\ + { int fregno;\ + fprintf(FILE,"\taddi\t%s,$0,%d\t#Varargs suspicion\n",\ + TARGET_NAME_REGS ? reg_names[9]\ + : reg_numchar[9],tsize);\ + fprintf(FILE,"\tsw\t%s,-4(%s)\t#Varargs suspicion\n",\ + TARGET_NAME_REGS ? reg_names[9]\ + : reg_numchar[9],\ + TARGET_NAME_REGS ? reg_names[29]\ + : reg_numchar[29]);\ + for (fregno = 44; fregno< 48; fregno += 2)\ + {push_loc += 8; \ + fprintf(FILE,"\ts.d\t%s,%d(%s)\t#Varargs Suspicion\n",\ + ((TARGET_NAME_REGS)\ + ?reg_names[fregno]: reg_numchar[fregno]),\ + push_loc-tsize,fp_str);}\ + }\ + for (regno = 29; regno >= 0; regno--) \ + {\ + if (MUST_SAVE_REG_LOGUES ||(regs_ever_live[regno] && !dont_save_regs[regno])){ \ + push_loc += 4;\ + fprintf(FILE,"\tsw\t%s,%d(%s)\n", TARGET_NAME_REGS ? reg_names[regno]\ + : reg_numchar[regno],push_loc-tsize,fp_str);}\ + \ + \ + } \ + fprintf (FILE, " #\t.fmask\t0x%x\n", fmask); \ + for (regno = 32; regno < FIRST_PSEUDO_REGISTER; regno += 2) \ + if (regs_ever_live[regno] && !dont_save_regs[regno]){push_loc += 8; \ + fprintf(FILE,"\ts.d\t%s,%d(%s)\n",((TARGET_NAME_REGS) ?reg_names[regno]\ + : reg_numchar[regno]),push_loc-tsize,fp_str);}\ + if(frame_pointer_needed)\ + fprintf(FILE,"\tadd\t%s,$0,%s\n",\ + (TARGET_NAME_REGS ? reg_names[FRAME_POINTER_REGNUM] :\ + reg_numchar[FRAME_POINTER_REGNUM]),\ + (TARGET_NAME_REGS ? reg_names[29] : reg_numchar[29]));\ + fprintf(FILE,"\tsubu\t%s,%d\t#temp=%5d,saveregs=%5d, sfo=%5d\n",\ + TARGET_NAME_REGS ? reg_names[29]\ + :reg_numchar[29],tsize,SIZE,tsize-SIZE+ (STARTING_FRAME_OFFSET),\ + STARTING_FRAME_OFFSET);\ + fprintf(FILE," #END PROLOGUE\n");\ + } + + /* Output assembler code to FILE to increment profiler label # LABELNO + for profiling a function entry. */ + + #define FUNCTION_PROFILER(FILE, LABELNO) \ + fprintf (FILE, "ERROR\t profiler LP%d,r0\n", (LABELNO)); + + /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, + the stack pointer does not matter. The value is tested only in + functions that have frame pointers. + No definition is equivalent to always zero. */ + + extern int may_call_alloca; + extern int current_function_pretend_args_size; + + #define EXIT_IGNORE_STACK 0 + + + /* This declaration is needed due to traditional/ANSI + incompatibilities which cannot be #ifdefed away + because they occur inside of macros. Sigh. */ + + + extern union tree_node *current_function_decl; + extern char *current_function_name; + + /* Tell prologue and epilogue if Register containing return + address should be saved / restored + */ + + #define MUST_SAVE_REG_LOGUES (( frame_pointer_needed && (regno == 30))\ + ||( (regno == 31) && regs_ever_live[31])\ + ) + + + /* This macro generates the assembly code for function exit, + on machines that need it. If FUNCTION_EPILOGUE is not defined + then individual return instructions are generated for each + return statement. Args are same as for FUNCTION_PROLOGUE. */ + + + #define FUNCTION_EPILOGUE(FILE, SIZE) \ + { register int regno; \ + register int mask = 0; \ + char *fp_str;\ + static char dont_save_regs[] = CALL_USED_REGISTERS; \ + register int push_loc ;\ + extern char *reg_numchar[]; \ + extern char *current_function_name; \ + extern int current_function_total_framesize; \ + push_loc = -current_function_total_framesize; \ + regno = STACK_POINTER_REGNUM; \ + fp_str = TARGET_NAME_REGS ? reg_names[STACK_POINTER_REGNUM]\ + : reg_numchar[STACK_POINTER_REGNUM];\ + fprintf(FILE," #EPILOGUE\n");\ + if(frame_pointer_needed)\ + fprintf(FILE,"\taddu\t%s,$0,%s\t# sp not trusted here \n",\ + TARGET_NAME_REGS ? reg_names[STACK_POINTER_REGNUM]\ + :reg_numchar[STACK_POINTER_REGNUM],\ + TARGET_NAME_REGS ? reg_names[FRAME_POINTER_REGNUM]\ + :reg_numchar[FRAME_POINTER_REGNUM]\ + );\ + else\ + fprintf(FILE,"\taddu\t%s,%d\t\n",TARGET_NAME_REGS ? reg_names[29]\ + :reg_numchar[29],current_function_total_framesize);\ + if(!frame_pointer_needed)\ + fprintf(FILE,"#undef __0__gcc\n");\ + for (regno = 0; regno < 32; regno++) \ + if ( MUST_SAVE_REG_LOGUES ||(regs_ever_live[regno] && !dont_save_regs[regno]))\ + mask |= 1 << regno; \ + fprintf (FILE, " #\t.mask\t0x%x\n", mask); \ + for (regno = 31; regno >= 0; regno--) \ + { if ( MUST_SAVE_REG_LOGUES ||(regs_ever_live[regno] && !dont_save_regs[regno])){ \ + push_loc += 4;\ + fprintf(FILE,"\tlw\t%s,%d(%s)\n", TARGET_NAME_REGS ? reg_names[regno]\ + : reg_numchar[regno],push_loc,fp_str);}\ + if( THIS_VARARGS_SUSPECTED && (regno == 30)) push_loc += 16;\ + }\ + mask =0;\ + for (regno = 32; regno < FIRST_PSEUDO_REGISTER; regno += 2) \ + if (regs_ever_live[regno] && !dont_save_regs[regno]) \ + mask |= 1 << (regno-32); \ + fprintf (FILE, " #\t.fmask\t0x%x\n", mask); \ + for (regno = 32; regno < FIRST_PSEUDO_REGISTER; regno += 2){ \ + if (regs_ever_live[regno] && !dont_save_regs[regno]){ \ + push_loc += 8;\ + fprintf(FILE,"\tl.d\t%s,%d(%s)\n",(( TARGET_NAME_REGS) ? reg_names[regno]\ + : reg_numchar[regno]),push_loc,fp_str);\ + }}\ + fprintf(FILE,"\tj\t$31\n");\ + fprintf(FILE," #END EPILOGUE\n");\ + fprintf(FILE," \t.end\t%s\n",current_function_name);\ + THIS_VARARGS_NOTSUSPECT; VARARGS_NOTSUSPECT;}\ + + /* If the memory Address ADDR is relative to the frame pointer, + correct it to be relative to the stack pointer. This is for + when we don't use a frame pointer. + ADDR should be a variable name. */ + + #define FIX_FRAME_POINTER_ADDRESS(ADDR,DEPTH) \ + { rtx newaddr;\ + int frame_offset = -1;\ + /* fprintf(stderr,"FIX_FRAME depth=%d\n",DEPTH); */\ + if(ADDR == frame_pointer_rtx)\ + frame_offset = 0;\ + else\ + if (GET_CODE(ADDR) == PLUS)\ + if(XEXP(ADDR,0) == frame_pointer_rtx)\ + if(GET_CODE(XEXP(ADDR,1)) == CONST_INT)\ + frame_offset = INTVAL(XEXP(ADDR,1));\ + else abort_with_insn(ADDR,"Unable to FIX");\ + else if (XEXP(ADDR,1) == frame_pointer_rtx)\ + if(GET_CODE(XEXP(ADDR,0)) == CONST_INT)\ + frame_offset = INTVAL(XEXP(ADDR,0));\ + else abort_with_insn(ADDR,"Unable to FIX");\ + else;\ + if (frame_offset >= 0)\ + { newaddr=gen_rtx(PLUS,Pmode,stack_pointer_rtx,\ + gen_rtx(PLUS,Pmode,\ + gen_rtx(CONST_INT,VOIDmode,frame_offset+(DEPTH)),\ + gen_rtx(SYMBOL_REF,SImode,"__0__gcc")));\ + ADDR = newaddr;\ + } \ + } + + + \f + /* Addressing modes, and classification of registers for them. */ + + /* #define HAVE_POST_INCREMENT */ + /* #define HAVE_POST_DECREMENT */ + + /* #define HAVE_PRE_DECREMENT */ + /* #define HAVE_PRE_INCREMENT */ + + /* These assume that REGNO is a hard or pseudo reg number. + They give nonzero only if REGNO is a hard reg of the suitable class + or a pseudo reg currently allocated to a suitable hard reg. + These definitions are NOT overridden anywhere. */ + + #define REGNO_OK_FOR_INDEX_P(regno) \ + ((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0) + #define REGNO_OK_FOR_BASE_P(regno) \ + ((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0) + #define REGNO_OK_FOR_FP_P(REGNO) \ + (((REGNO) ^ 0x20) < 32 || (unsigned) (reg_renumber[REGNO] ^ 0x20) < 32) + + /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx + and check its validity for a certain class. + We have two alternate definitions for each of them. + The usual definition accepts all pseudo regs; the other rejects them all. + The symbol REG_OK_STRICT causes the latter definition to be used. + + Most source files want to accept pseudo regs in the hope that + they will get allocated to the class that the insn wants them to be in. + Some source files that are used after register allocation + need to be strict. */ + + #ifndef REG_OK_STRICT + + /* Nonzero if X is a hard reg that can be used as an index or if + it is a pseudo reg. */ + #define REG_OK_FOR_INDEX_P(X) 1 + /* Nonzero if X is a hard reg that can be used as a base reg + of if it is a pseudo reg. */ + #define REG_OK_FOR_BASE_P(X) 1 + + #else + + /* Nonzero if X is a hard reg that can be used as an index. */ + #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X)) + /* Nonzero if X is a hard reg that can be used as a base reg. */ + #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X)) + + #endif + + #define REG_OK_FOR_CLASS_P(X, C) 0 + + #define REGNO_OK_FOR_CLASS_P(X, C) 0 + + #define ADDRESS_REG_P(X) \ + (GET_CODE (X) == REG ) + + /* 1 if X is an fp register. */ + + #define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_P (REGNO (X))) + \f + /* Maximum number of registers that can appear in a valid memory address. */ + + #define MAX_REGS_PER_ADDRESS 1 + + /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression + that is a valid memory address for an instruction. + The MODE argument is the machine mode for the MEM expression + that wants to use this address. + + The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS, + except for CONSTANT_ADDRESS_P which is actually machine-independent. */ + + /* 1 if X is an address that we could indirect through. */ + #define INDIRECTABLE_ADDRESS_P(X) \ + (CONSTANT_ADDRESS_P (X) \ + || (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \ + || (GET_CODE (X) == PLUS \ + && GET_CODE (XEXP (X, 0)) == REG \ + && REG_OK_FOR_BASE_P (XEXP (X, 0)) \ + && CONSTANT_ADDRESS_P (XEXP (X, 1)))) + + + + /* 1 if X is an address which is (+ (reg) (+ (const_int) (symbol_ref) )) */ + #define FIXED_FRAME_PTR_REL_P(X)\ + ( (GET_CODE(X) == PLUS)\ + && (GET_CODE(XEXP((X),0)) == REG)\ + && (GET_CODE(XEXP((X),1)) == PLUS)\ + && (GET_CODE(XEXP(XEXP((X),1),0)) == CONST_INT)\ + && (GET_CODE(XEXP(XEXP((X),1),1)) == SYMBOL_REF)) + + /* Go to ADDR if X is a valid address not using indexing. + (This much is the easy part.) */ + #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \ + { register rtx xfoob = (X); \ + if (GET_CODE (xfoob) == REG) goto ADDR; \ + if (INDIRECTABLE_ADDRESS_P (xfoob)) goto ADDR; \ + if (FIXED_FRAME_PTR_REL_P (xfoob)) goto ADDR; \ + } + + + + + #define CONSTANT_ADDRESS_P(X) \ + (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \ + || GET_CODE (X) == CONST_INT \ + || GET_CODE (X) == CONST) + + + /* Nonzero if the constant value X is a legitimate general operand. + It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. + + Anything but a CONST_DOUBLE can be made to work. */ + + #define LEGITIMATE_CONSTANT_P(X) \ + (GET_CODE (X) != CONST_DOUBLE) + + #define REG_P(X) \ + (GET_CODE (X) == REG) + + /* Try machine-dependent ways of modifying an illegitimate address + to be legitimate. If we find one, return the new, valid address. + This macro is used in only one place: `memory_address' in explow.c. + + OLDX is the address as it was before break_out_memory_refs was called. + In some cases it is useful to look at this to decide what needs to be done. + + MODE and WIN are passed so that this macro can use + GO_IF_LEGITIMATE_ADDRESS. + + It is always safe for this macro to do nothing. It exists to recognize + opportunities to optimize the output. + + For the MIPS (so far ..), nothing needs to be done. + + ACHTUNG this is actually used by the FLOW analysis to get rid + of statements.... + + */ + + #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) {} + + /* Go to LABEL if ADDR (a legitimate address expression) + has an effect that depends on the machine mode it is used for. + */ + \f + /* See if this is of any use here */ + + #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \ + { } + + + /* Specify the machine mode that this machine uses + for the index in the tablejump instruction. */ + #define CASE_VECTOR_MODE SImode + + /* Define this if the tablejump instruction expects the table + to contain offsets from the address of the table. + Do not define this if the table should contain absolute addresses. */ + /* #define CASE_VECTOR_PC_RELATIVE */ + + /* Specify the tree operation to be used to convert reals to integers. */ + #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR + + /* This is the kind of divide that is easiest to do in the general case. */ + #define EASY_DIV_EXPR TRUNC_DIV_EXPR + + /* Define this as 1 if `char' should by default be signed; else as 0. */ + #define DEFAULT_SIGNED_CHAR 0 + + /* Max number of bytes we can move from memory to memory + in one reasonably fast instruction. */ + #define MOVE_MAX 4 + + /* Nonzero if access to memory by bytes is slow and undesirable. */ + #define SLOW_BYTE_ACCESS 0 + + /* On Sun 4, this limit is 2048. We use 1500 to be safe, + since the length can run past this up to a continuation point. */ + #define DBX_CONTIN_LENGTH 1500 + + /* We assume that the store-condition-codes instructions store 0 for false + and some other value for true. This is the value stored for true. */ + + #define STORE_FLAG_VALUE 1 + + /* Define this if zero-extension is slow (more than one real instruction). */ + #define SLOW_ZERO_EXTEND + + /* Define if shifts truncate the shift count + which implies one can omit a sign-extension or zero-extension + of a shift count. + + Only 5 bits are used in SLLV and SRLV + */ + #define SHIFT_COUNT_TRUNCATED + + + /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits + is done just by pretending it is already truncated. */ + #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 + + /* Specify the machine mode that pointers have. + After generation of rtl, the compiler makes no further distinction + between pointers and any other objects of this machine mode. */ + #define Pmode SImode + + /* A function address in a call instruction + is a word address (for indexing purposes) + so give the MEM rtx a words's mode. */ + + #define FUNCTION_MODE SImode + + /* Compute the cost of computing a constant rtl expression RTX + whose rtx-code is CODE. The body of this macro is a portion + of a switch statement. If the code is computed here, + return it with a return statement. Otherwise, break from the switch. */ + + #define CONST_COSTS(RTX,CODE) \ + case CONST_INT: \ + /* Constant zero is super cheap due to register 0. */ \ + if (RTX == const0_rtx) return 0; \ + if ((INTVAL (RTX) < 0x7fff) && (- INTVAL(RTX) < 0x7fff)) return 1; \ + case CONST: \ + case LABEL_REF: \ + case SYMBOL_REF: \ + return 3; \ + case CONST_DOUBLE: \ + return 5; + \f + /* Tell final.c how to eliminate redundant test instructions. */ + + /* Here we define machine-dependent flags and fields in cc_status + (see `conditions.h'). No extra ones are needed for the vax. */ + /* Tell final.c how to eliminate redundant test instructions. */ + \f + /* Tell final.c how to eliminate redundant test instructions. */ + + /* Here we define machine-dependent flags and fields in cc_status + (see `conditions.h'). No extra ones are needed for the vax. */ + + /* Store in cc_status the expressions + that the condition codes will describe + after execution of an instruction whose pattern is EXP. + Do not alter them if the instruction would not alter the cc's. */ + + #define NOTICE_UPDATE_CC(EXP, INSN) \ + CC_STATUS_INIT; + + + /* Here we define machine-dependent flags and fields in cc_status + (see `conditions.h'). */ + + \f + /* Control the assembler format that we output. */ + + /* Output at beginning of assembler file. */ + + #define ASM_FILE_START(FILE) \ + if(TARGET_NAME_REGS) \ + fprintf(FILE,"#include <regdef.h>\n\t.verstamp\t%s\n",TARGET_VERSNUM);\ + else fprintf(FILE," #\t.verstamp\t%s\n",TARGET_VERSNUM);\ + print_options(FILE); + + + /* Output to assembler file text saying following lines + may contain character constants, extra white space, comments, etc. */ + + #define ASM_APP_ON " #APP\n" + + /* Output to assembler file text saying following lines + no longer contain unusual constructs. */ + + #define ASM_APP_OFF " #NO_APP\n" + + /* Output before read-only data. */ + + #define TEXT_SECTION_ASM_OP ".text" + + /* Output before writable data. */ + + #define DATA_SECTION_ASM_OP ".data" + + /* How to refer to registers in assembler output. + This sequence is indexed by compiler's hard-register-number (see above). */ + + #define REGISTER_NAMES \ + {"$0", "at", "v0", "v1", "a0", "a1", "a2", "a3", "t0", \ + "t1", "t2", "t3", "t4", "t5", "t6", "t7","s0",\ + "s1","s2","s3","s4","s5","s6","s7","t8","t9",\ + "k0","k1","gp","sp","fp","ra",\ + "$f0","$f1","$f2","$f3","$f4","$f5","$f6","$f7","$f8","$f9",\ + "$f10","$f11","$f12","$f13","$f14","$f15","$f16","$f17","$f18","$f19",\ + "$f20","$f21","$f22","$f23","$f24","$f25","$f26","$f27","$f28","$f29",\ + "$f30","$f31"\ + } + #define REGISTER_NUMCHAR \ + {\ + "$0","$1","$2","$3","$4","$5","$6","$7","$8","$9",\ + "$10","$11","$12","$13","$14","$15","$16","$17","$18","$19",\ + "$20","$21","$22","$23","$24","$25","$26","$27","$28","$29",\ + "$30","$31",\ + "$f0","$f1","$f2","$f3","$f4","$f5","$f6","$f7","$f8","$f9",\ + "$f10","$f11","$f12","$f13","$f14","$f15","$f16","$f17","$f18","$f19",\ + "$f20","$f21","$f22","$f23","$f24","$f25","$f26","$f27","$f28","$f29",\ + "$f30","$f31"\ + } + + + /* How to renumber registers for dbx and gdb. + MIPS needs no change in the numeration. */ + + #define DBX_REGISTER_NUMBER(REGNO) (REGNO) + + /* Define results of standard character escape sequences. */ + #define TARGET_BELL 007 + #define TARGET_BS 010 + #define TARGET_TAB 011 + #define TARGET_NEWLINE 012 + #define TARGET_VT 013 + #define TARGET_FF 014 + #define TARGET_CR 015 + + /* LIST OF PRINT OPERAND CODES + + + /* 'x' X is CONST_INT, prints 16 bits in + ** Hexadecimal format = "0x%4x" + */ + + + /* Print an instruction operand X on file FILE. + CODE is the code from the %-spec that requested printing this operand; + if `%z3' was used to print operand 3, then CODE is 'z'. + Codes used on the MIPS include `u', `x' and `z'. + ??? SOMEONE PLEASE DOCUMENT THEM??? */ + + #define PRINT_OPERAND(FILE, X, CODE) \ + { if ((CODE) == 'u')\ + if (TARGET_NOFIXED_OVFL)fprintf(FILE,"u"); \ + else if (GET_CODE (X) == REG) \ + { extern char *reg_numchar[];\ + fprintf (FILE, "%s", TARGET_NAME_REGS ?reg_names[REGNO (X)]\ + :reg_numchar[REGNO (X) ]); \ + }\ + else + { \ + if (GET_CODE (X) == MEM) \ + output_address (XEXP (X, 0)); \ + else if (GET_CODE (X) == CONST_DOUBLE) \ + { union { double d; int i[2]; } u; \ + union { float f; int i; } u1; \ + u.i[0] = CONST_DOUBLE_LOW (X); \ + u.i[1] = CONST_DOUBLE_HIGH (X); \ + u1.f = u.d; \ + if (GET_MODE (X) == SFmode) \ + u.d = u1.f; \ + fprintf (FILE, "%.20e", u.d); } \ + else \ + { if ((CODE == 'x') && (GET_CODE(X) == CONST_INT))\ + fprintf(FILE,"0x%x",0xffff & (INTVAL(X)));\ + else { if ((CODE == 'd') && (GET_CODE(X) == CONST_INT))\ + fprintf(FILE,"%d",(INTVAL(X)));\ + else\ + {\ + if ((CODE) == 'd') my_print_rtx(X);\ + else output_addr_const (FILE, X);}\ + }}}} + + + + /* Print a memory operand whose address is X, on file FILE. */ + + #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ + { register rtx reg1, reg2, breg, ireg; \ + register rtx addr = ADDR; \ + rtx offset; \ + extern char *reg_numchar[];\ + /* my_print_rtx(addr);*/\ + retry: \ + switch (GET_CODE (addr)) \ + { \ + case MEM: \ + fprintf (FILE, "ERROR:*"); \ + addr = XEXP (addr, 0); \ + goto retry; \ + case REG: \ + fprintf (FILE, "0(%s)", TARGET_NAME_REGS ? reg_names[REGNO (addr)]\ + : reg_numchar[REGNO(addr)]); \ + break; \ + case PRE_DEC: \ + fprintf (FILE, "(ERROR)-(%s)", reg_names[REGNO (XEXP (addr, 0))]);\ + break; \ + case POST_INC: \ + fprintf (FILE, "(ERROR)(%s)+", reg_names[REGNO (XEXP (addr, 0))]);\ + my_print_rtx(addr); \ + break; \ + case PLUS: \ + if( (GET_CODE (XEXP(addr,0)) == REG)\ + && (GET_CODE (XEXP(addr,1)) == PLUS)\ + && (GET_CODE (XEXP(XEXP(addr,1),1)) == SYMBOL_REF)\ + && (GET_CODE (XEXP(XEXP(addr,1),0)) == CONST_INT))\ + {output_address(XEXP(XEXP(addr,1),0));\ + fprintf(FILE,"+");\ + output_address(XEXP(XEXP(addr,1),1));\ + breg = XEXP(addr,0);\ + fprintf(FILE,"(%s)", TARGET_NAME_REGS ?\ + reg_names[REGNO (breg)]: reg_numchar[REGNO(breg)]);\ + break;\ + }\ + \ + reg1 = 0; reg2 = 0; \ + ireg = 0; breg = 0; \ + offset = 0; \ + /*fprintf(stderr,"PRINT_OPERAND_ADDRESS"); */ \ + if (CONSTANT_ADDRESS_P (XEXP (addr, 0)) \ + || GET_CODE (XEXP (addr, 0)) == MEM) \ + { \ + offset = XEXP (addr, 0); \ + addr = XEXP (addr, 1); \ + } \ + else if (CONSTANT_ADDRESS_P (XEXP (addr, 1)) \ + || GET_CODE (XEXP (addr, 1)) == MEM) \ + { \ + offset = XEXP (addr, 1); \ + addr = XEXP (addr, 0); \ + } \ + if (GET_CODE (addr) != PLUS) ; \ + else if (GET_CODE (XEXP (addr, 0)) == MULT) \ + { \ + reg1 = XEXP (addr, 0); \ + addr = XEXP (addr, 1); \ + } \ + else if (GET_CODE (XEXP (addr, 1)) == MULT) \ + { \ + reg1 = XEXP (addr, 1); \ + addr = XEXP (addr, 0); \ + } \ + else if (GET_CODE (XEXP (addr, 0)) == REG) \ + { \ + reg1 = XEXP (addr, 0); \ + addr = XEXP (addr, 1); \ + } \ + else if (GET_CODE (XEXP (addr, 1)) == REG) \ + { \ + reg1 = XEXP (addr, 1); \ + addr = XEXP (addr, 0); \ + } \ + if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT) \ + { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; } \ + if (offset != 0) { if (addr != 0) abort (); addr = offset; } \ + if (reg1 != 0 && GET_CODE (reg1) == MULT) \ + { breg = reg2; ireg = reg1; } \ + else if (reg2 != 0 && GET_CODE (reg2) == MULT) \ + { breg = reg1; ireg = reg2; } \ + else if (reg2 != 0 || GET_CODE (addr) == MEM) \ + { breg = reg2; ireg = reg1; } \ + else \ + { breg = reg1; ireg = reg2; } \ + if (addr != 0) \ + output_address (offset); \ + if (breg != 0) \ + { if (GET_CODE (breg) != REG) abort (); \ + fprintf (FILE, "(%s)", TARGET_NAME_REGS ?\ + reg_names[REGNO (breg)]: reg_numchar[REGNO(breg)]); } \ + if (ireg != 0) \ + { if (GET_CODE (ireg) == MULT) ireg = XEXP (ireg, 0); \ + if (GET_CODE (ireg) != REG) abort (); \ + fprintf (FILE, "[%s]", TARGET_NAME_REGS ?\ + reg_names[REGNO (ireg)]: reg_numchar[REGNO(ireg)]); } \ + break; \ + default: \ + output_addr_const (FILE, addr); \ + }} + + + /* This is how to output a note to DBX telling it the line number + to which the following sequence of instructions corresponds. + + This is needed for SunOS 4.0, and should not hurt for 3.2 + versions either. */ + #define ASM_OUTPUT_SOURCE_LINE(file, line) \ + { static int sym_lineno = 1; \ + fprintf (file, " #.stabn 68,0,%d,LM%d\nLM%d:\n", \ + line, sym_lineno, sym_lineno); \ + sym_lineno += 1; } + + /* This is how to output the definition of a user-level label named NAME, + such as the label on a static function or variable NAME. */ + + #define ASM_OUTPUT_LABEL(FILE,NAME) \ + do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0) + + /* This is how to output a command to make the user-level label named NAME + defined for reference from other files. */ + + #define ASM_GLOBALIZE_LABEL(FILE,NAME) \ + do { fputs ("\t.globl ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0) + + #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL)\ + fprintf(FILE,"\t.ent\t%s\n",NAME);\ + current_function_name = NAME;\ + ASM_OUTPUT_LABEL(FILE,NAME); + + /* This is how to output a reference to a user-level label named NAME. + `assemble_name' uses this. */ + + #define ASM_OUTPUT_LABELREF(FILE,NAME) \ + fprintf (FILE, "%s", NAME) + + /* This is how to output an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. */ + + #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \ + fprintf (FILE, "%s%d:\n", PREFIX, NUM) + + /* This is how to store into the string LABEL + the symbol_ref name of an internal numbered label where + PREFIX is the class of label and NUM is the number within the class. + This is suitable for output with `assemble_name'. */ + + #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \ + sprintf (LABEL, "*%s%d", PREFIX, NUM) + + /* This is how to output an assembler line defining a `double' constant. */ + + #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ + fprintf (FILE, "\t.double %.20e\n", (VALUE)) + + /* This is how to output an assembler line defining a `float' constant. */ + + #define ASM_OUTPUT_FLOAT(FILE,VALUE) \ + fprintf (FILE, "\t.float %.12e\n", (VALUE)) + + /* This is how to output an assembler line defining an `int' constant. */ + + #define ASM_OUTPUT_INT(FILE,VALUE) \ + ( fprintf (FILE, "\t.word "), \ + output_addr_const (FILE, (VALUE)), \ + fprintf (FILE, "\n")) + + /* Likewise for `char' and `short' constants. */ + + #define ASM_OUTPUT_SHORT(FILE,VALUE) \ + ( fprintf (FILE, "\t.half "), \ + output_addr_const (FILE, (VALUE)), \ + fprintf (FILE, "\n")) + + #define ASM_OUTPUT_CHAR(FILE,VALUE) \ + ( fprintf (FILE, "\t.byte "), \ + output_addr_const (FILE, (VALUE)), \ + fprintf (FILE, "\n")) + + /* This is how to output an assembler line for a numeric constant byte. */ + + #define ASM_OUTPUT_BYTE(FILE,VALUE) \ + fprintf (FILE, "\t.byte 0x%x\n", (VALUE)) + + /* This is how to output an element of a case-vector that is absolute. */ + + #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ + fprintf (FILE, "\t.word L%d\n", VALUE) + + /* This is how to output an element of a case-vector that is relative. + (We do not use such vectors, + but we must define this macro anyway.) */ + + #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ + fprintf (FILE, "\t.word L%d-L%d\n", VALUE, REL) + + /* This is how to output an assembler line + that says to advance the location counter + to a multiple of 2**LOG bytes. */ + + #define ASM_OUTPUT_ALIGN(FILE,LOG) \ + fprintf (FILE, "\t.align %d\n", (LOG)) + + #define ASM_OUTPUT_SKIP(FILE,SIZE) \ + fprintf (FILE, "\t.space %d\n", (SIZE)) + + /* This says how to output an assembler line + to define a global common symbol. */ + + #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ + ( fputs ("\n.comm ", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (ROUNDED))) + + /* This says how to output an assembler line + to define a local common symbol. */ + + #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ + ( fputs ("\t.lcomm\t", (FILE)), \ + assemble_name ((FILE), (NAME)), \ + fprintf ((FILE), ",%d\n", (ROUNDED))) + + /* Store in OUTPUT a string (made with alloca) containing + an assembler-name for a local static variable named NAME. + LABELNO is an integer which is different for each call. */ + + #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \ + sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO))) + + #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ + (fprintf (FILE,"ERROR: ASM_OUTPUT_REG_POP\n")) + #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ + (fprintf (FILE,"ERROR: ASM_OUTPUT_REG_PUSH\n")) + + /* The following macro is taken from the */ + /* C-text of varasm.c. It has been modified */ + /* to handle the VARARG_SUSPECTED hack */ + #define ASM_OUTPUT_ASCII(FILE, P , SIZE)\ + { int i;\ + fprintf ((FILE), "\t.ascii \"");\ + VARARGS_SUSPECT( 0 == strncmp((P),"__%%VARARGS",11));\ + for (i = 0; i < (SIZE); i++)\ + {\ + register int c = (P)[i];\ + if (c == '\"' || c == '\\')\ + putc ('\\', (FILE));\ + if (c >= ' ' && c < 0177)\ + putc (c, (FILE));\ + else\ + {\ + fprintf ((FILE), "\\%o", c);\ + /* After an octal-escape, if a digit follows,\ + terminate one string constant and start another.\ + The Vax assembler fails to stop reading the escape\ + after three digits, so this is the only way we\ + can get it to parse the data properly. */\ + if (i < (SIZE) - 1 && (P)[i + 1] >= '0' && (P)[i + 1] <= '9')\ + fprintf ((FILE), "\"\n\t.ascii \"");\ + }\ + }\ + fprintf ((FILE), "\"\n");\ + } + + + + /* Define the parentheses used to group arithmetic operations + in assembler code. */ + + #define ASM_OPEN_PAREN "(" + #define ASM_CLOSE_PAREN ")" + + /* Specify what to precede various sizes of constant with + in the output file. */ + + #define ASM_INT_OP ".word " + #define ASM_SHORT_OP ".half " + #define ASM_CHAR_OP ".byte " + + \f + #define DEBUG_LOG_INSN(X) {\ + extern rtx al_log_insn_debug;\ + al_log_insn_debug=(X); } + + + + diff -rc2N gcc-1.34/config/tm-news.h gcc-1.35/config/tm-news.h *** gcc-1.34/config/tm-news.h Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/tm-news.h Thu Mar 30 00:38:35 1989 *************** *** 0 **** --- 1,410 ---- + /* Definitions of target machine for GNU compiler. SONY NEWS-OS 3.0 version. + Copyright (C) 1987, 1989 Free Software Foundation, Inc. + + This file is part of GNU CC. + + GNU CC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + GNU CC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU CC; see the file COPYING. If not, write to + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + /* Use the GNU Assembler, because the system's assembler + has no way to assemble the difference of two labels + for the displacement in a switch-dispatch instruction. */ + + #ifndef USE_GAS + /* This controls conditionals in tm-m68k.h. */ + #define MOTOROLA + #define SONY_ASM + #endif + + #include "tm-m68k.h" + + /* See tm-m68k.h. 7 means 68020 with 68881. */ + + #define TARGET_DEFAULT 7 + + /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. + This will control the use of inline 68881 insns in certain macros. */ + + #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__}" + + /* Names to predefine in the preprocessor for this target machine. */ + + #ifdef news700 + #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dnews700" + #endif + #ifdef news800 + #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dnews800" + #endif + #ifdef news900 + #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dnews900" + #endif + #ifdef news1500 + #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dmc68030 -Dnews1500" + #endif + #ifdef news1700 + #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dmc68030 -Dnews1700" + #endif + #ifdef news1800 + #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dmc68030 -Dnews1800" + #endif + #ifdef news1900 + #define CPP_PREDEFINES "-Dunix -Dbsd43 -Dsony -Dsony_news -Dmc68020 -Dmc68030 -Dnews1900" + #endif + + /* This is BSD, so it wants DBX format. */ + + #define DBX_DEBUGGING_INFO + + /* Override parts of tm-m68k.h to fit Sony's assembler syntax. */ + + #undef POINTER_BOUNDARY + #undef BIGGEST_ALIGNMENT + #undef CALL_USED_REGISTERS + #undef FUNCTION_VALUE + #undef LIBCALL_VALUE + #undef FUNCTION_PROFILER + + #ifdef MOTOROLA + #undef FUNCTION_PROLOGUE + #undef FUNCTION_EPILOGUE + #undef REGISTER_NAMES + #undef ASM_OUTPUT_REG_PUSH + #undef ASM_OUTPUT_REG_POP + #undef ASM_OUTPUT_DOUBLE + #undef ASM_OUTPUT_SKIP + #undef ASM_FORMAT_PRIVATE_NAME + #undef PRINT_OPERAND + #undef PRINT_OPERAND_ADDRESS + #endif + + #undef ASM_OUTPUT_ALIGN + + /* Allocation boundary (in *bits*) for storing pointers in memory. */ + #define POINTER_BOUNDARY 32 + + /* There is no point aligning anything to a rounder boundary than this. */ + #define BIGGEST_ALIGNMENT 32 + + /* A bitfield declared as `int' forces `int' alignment for the struct. */ + #define PCC_BITFIELD_TYPE_MATTERS + + /* NEWS makes d2, d3, fp2 and fp3 unsaved registers, unlike the Sun system. */ + + #define CALL_USED_REGISTERS \ + {1, 1, 1, 1, 0, 0, 0, 0, \ + 1, 1, 0, 0, 0, 0, 0, 1, \ + 1, 1, 1, 1, 0, 0, 0, 0} + + /* NEWS returns floats and doubles in fp0, not d0/d1. */ + + #define FUNCTION_VALUE(VALTYPE,FUNC) LIBCALL_VALUE (TYPE_MODE (VALTYPE)) + + #define LIBCALL_VALUE(MODE) \ + gen_rtx (REG, (MODE), ((TARGET_68881 && ((MODE) == SFmode || (MODE) == DFmode)) ? 16 : 0)) + + #define ASM_OUTPUT_ALIGN(FILE,LOG) \ + fprintf (FILE, "\t.align %d\n", (LOG)) + \f + #ifdef MOTOROLA + + /* Don't try to define `gcc_compiled.' since the assembler does not + accept symbols with periods. This is no real loss since GDB only + really needs it for parms passed in registers. */ + #define ASM_IDENTIFY_GCC(FILE) + + #define FUNCTION_PROLOGUE(FILE, SIZE) \ + { register int regno; \ + register int mask = 0; \ + extern char call_used_regs[]; \ + int fsize = ((SIZE) + 3) & -4; \ + if (frame_pointer_needed) \ + { if (TARGET_68020 || fsize < 0x8000) \ + fprintf (FILE, "\tlink fp,#%d\n", -fsize); \ + else \ + fprintf (FILE, "\tlink fp,#0\n\tsub.l #%d,sp\n", fsize); } \ + for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++) \ + if (regs_ever_live[regno] && ! call_used_regs[regno]) \ + mask |= 1 << (regno - 16); \ + if (mask != 0) \ + fprintf (FILE, "\tfmovem.x #0x%x,-(sp)\n", mask & 0xff); \ + mask = 0; \ + for (regno = 0; regno < 16; regno++) \ + if (regs_ever_live[regno] && ! call_used_regs[regno]) \ + mask |= 1 << (15 - regno); \ + if (frame_pointer_needed) \ + mask &= ~ (1 << (15-FRAME_POINTER_REGNUM)); \ + if (exact_log2 (mask) >= 0) \ + fprintf (FILE, "\tmove.l %s,-(sp)\n", reg_names[15 - exact_log2 (mask)]); \ + else if (mask) fprintf (FILE, "\tmovem.l #0x%x,-(sp)\n", mask); } + + #define FUNCTION_PROFILER(FILE, LABEL_NO) \ + fprintf (FILE, "\tmove.l #LP%d,d0\n\tjsr mcount\n", (LABEL_NO)); + + #define FUNCTION_EPILOGUE(FILE, SIZE) \ + { register int regno; \ + register int mask, fmask; \ + register int nregs; \ + int offset, foffset; \ + extern char call_used_regs[]; \ + extern int current_function_pops_args; \ + extern int current_function_args_size; \ + int fsize = ((SIZE) + 3) & -4; \ + int big = 0; \ + nregs = 0; fmask = 0; \ + for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++) \ + if (regs_ever_live[regno] && ! call_used_regs[regno]) \ + { nregs++; fmask |= 1 << (23 - regno); } \ + foffset = nregs * 12; \ + nregs = 0; mask = 0; \ + if (frame_pointer_needed) regs_ever_live[FRAME_POINTER_REGNUM] = 0; \ + for (regno = 0; regno < 16; regno++) \ + if (regs_ever_live[regno] && ! call_used_regs[regno]) \ + { nregs++; mask |= 1 << regno; } \ + offset = foffset + nregs * 4; \ + if (offset + fsize >= 0x8000 \ + && frame_pointer_needed \ + && (mask || fmask)) \ + { fprintf (FILE, "\tmove.l #%d,a0\n", -fsize); \ + fsize = 0, big = 1; } \ + if (exact_log2 (mask) >= 0) { \ + if (big) \ + fprintf (FILE, "\tmove.l (-%d,fp,a0.l),%s\n", \ + offset + fsize, reg_names[exact_log2 (mask)]); \ + else if (! frame_pointer_needed) \ + fprintf (FILE, "\tmove.l (sp)+,%s\n", \ + reg_names[exact_log2 (mask)]); \ + else \ + fprintf (FILE, "\tmove.l (-%d,fp),%s\n", \ + offset + fsize, reg_names[exact_log2 (mask)]); } \ + else if (mask) { \ + if (big) \ + fprintf (FILE, "\tmovem.l (-%d,fp,a0.l),#0x%x\n", \ + offset + fsize, mask); \ + else if (! frame_pointer_needed) \ + fprintf (FILE, "\tmovem.l (sp)+,#0x%x\n", mask); \ + else \ + fprintf (FILE, "\tmovem.l (-%d,fp),#0x%x\n", \ + offset + fsize, mask); } \ + if (fmask) { \ + if (big) \ + fprintf (FILE, "\tfmovem.x (-%d,fp,a0.l),#0x%x\n", \ + foffset + fsize, fmask); \ + else if (! frame_pointer_needed) \ + fprintf (FILE, "\tfmovem.x (sp)+,#0x%x\n", fmask); \ + else \ + fprintf (FILE, "\tfmovem.x (-%d,fp),#0x%x\n", \ + foffset + fsize, fmask); } \ + if (frame_pointer_needed) \ + fprintf (FILE, "\tunlk fp\n"); \ + if (current_function_pops_args && current_function_args_size) \ + fprintf (FILE, "\trtd #%d\n", current_function_args_size); \ + else fprintf (FILE, "\trts\n"); } + + /* Difference from tm-m68k.h is in `fp' instead of `a6'. */ + + #define REGISTER_NAMES \ + {"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", \ + "a0", "a1", "a2", "a3", "a4", "a5", "fp", "sp", \ + "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7"} + + /* This is how to output an insn to push a register on the stack. + It need not be very fast code. */ + + #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \ + fprintf (FILE, "\tmove.l %s,-(sp)\n", reg_names[REGNO]) + + /* This is how to output an insn to pop a register from the stack. + It need not be very fast code. */ + + #define ASM_OUTPUT_REG_POP(FILE,REGNO) \ + fprintf (FILE, "\tmove.l (sp)+,%s\n", reg_names[REGNO]) + + #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ + fprintf (FILE, "\t.double 0d%.20e\n", (VALUE)) + + #define ASM_OUTPUT_SKIP(FILE,SIZE) \ + fprintf (FILE, "\t.space %d\n", (SIZE)) + + /* Store in OUTPUT a string (made with alloca) containing + an assembler-name for a local static variable named NAME. + LABELNO is an integer which is different for each call. */ + + #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \ + ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 13), \ + sprintf ((OUTPUT), "%s$$$%d", (NAME), (LABELNO))) + + #define PRINT_OPERAND(FILE, X, CODE) \ + { if (CODE == '.') fprintf (FILE, "."); \ + else if (CODE == '#') fprintf (FILE, "#"); \ + else if (CODE == '-') fprintf (FILE, "-(sp)"); \ + else if (CODE == '+') fprintf (FILE, "(sp)+"); \ + else if (CODE == '@') fprintf (FILE, "(sp)"); \ + else if (CODE == '!') fprintf (FILE, "ccr"); \ + else if (GET_CODE (X) == REG) \ + fprintf (FILE, "%s", reg_names[REGNO (X)]); \ + else if (GET_CODE (X) == MEM) \ + output_address (XEXP (X, 0)); \ + else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode) \ + { union { double d; int i[2]; } u; \ + union { float f; int i; } u1; \ + u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ + u1.f = u.d; \ + if (CODE == 'f') \ + fprintf (FILE, "#0f%.9e", u1.f); \ + else \ + fprintf (FILE, "#0x%x", u1.i); } \ + else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != DImode) \ + { union { double d; int i[2]; } u; \ + u.i[0] = CONST_DOUBLE_LOW (X); u.i[1] = CONST_DOUBLE_HIGH (X); \ + fprintf (FILE, "#0d%.20e", u.d); } \ + else if (CODE == 'b') output_addr_const (FILE, X); \ + else { putc ('#', FILE); output_addr_const (FILE, X); }} + + #define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ + { register rtx reg1, reg2, breg, ireg; \ + register rtx addr = ADDR; \ + rtx offset; \ + switch (GET_CODE (addr)) \ + { \ + case REG: \ + fprintf (FILE, "(%s)", reg_names[REGNO (addr)]); \ + break; \ + case PRE_DEC: \ + fprintf (FILE, "-(%s)", reg_names[REGNO (XEXP (addr, 0))]); \ + break; \ + case POST_INC: \ + fprintf (FILE, "(%s)+", reg_names[REGNO (XEXP (addr, 0))]); \ + break; \ + case PLUS: \ + reg1 = 0; reg2 = 0; \ + ireg = 0; breg = 0; \ + offset = 0; \ + if (CONSTANT_ADDRESS_P (XEXP (addr, 0))) \ + { \ + offset = XEXP (addr, 0); \ + addr = XEXP (addr, 1); \ + } \ + else if (CONSTANT_ADDRESS_P (XEXP (addr, 1))) \ + { \ + offset = XEXP (addr, 1); \ + addr = XEXP (addr, 0); \ + } \ + if (GET_CODE (addr) != PLUS) ; \ + else if (GET_CODE (XEXP (addr, 0)) == SIGN_EXTEND) \ + { \ + reg1 = XEXP (addr, 0); \ + addr = XEXP (addr, 1); \ + } \ + else if (GET_CODE (XEXP (addr, 1)) == SIGN_EXTEND) \ + { \ + reg1 = XEXP (addr, 1); \ + addr = XEXP (addr, 0); \ + } \ + else if (GET_CODE (XEXP (addr, 0)) == MULT) \ + { \ + reg1 = XEXP (addr, 0); \ + addr = XEXP (addr, 1); \ + } \ + else if (GET_CODE (XEXP (addr, 1)) == MULT) \ + { \ + reg1 = XEXP (addr, 1); \ + addr = XEXP (addr, 0); \ + } \ + else if (GET_CODE (XEXP (addr, 0)) == REG) \ + { \ + reg1 = XEXP (addr, 0); \ + addr = XEXP (addr, 1); \ + } \ + else if (GET_CODE (XEXP (addr, 1)) == REG) \ + { \ + reg1 = XEXP (addr, 1); \ + addr = XEXP (addr, 0); \ + } \ + if (GET_CODE (addr) == REG || GET_CODE (addr) == MULT \ + || GET_CODE (addr) == SIGN_EXTEND) \ + { if (reg1 == 0) reg1 = addr; else reg2 = addr; addr = 0; } \ + if (offset != 0) { if (addr != 0) abort (); addr = offset; } \ + if ((reg1 && (GET_CODE (reg1) == SIGN_EXTEND \ + || GET_CODE (reg1) == MULT)) \ + || (reg2 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg2)))) \ + { breg = reg2; ireg = reg1; } \ + else if (reg1 != 0 && REGNO_OK_FOR_BASE_P (REGNO (reg1))) \ + { breg = reg1; ireg = reg2; } \ + if (ireg != 0 && breg == 0 && GET_CODE (addr) == LABEL_REF) \ + { int scale = 1; \ + if (GET_CODE (ireg) == MULT) \ + { scale = INTVAL (XEXP (ireg, 1)); \ + ireg = XEXP (ireg, 0); } \ + if (GET_CODE (ireg) == SIGN_EXTEND) \ + fprintf (FILE, "(L%d.b,pc,%s.w", \ + CODE_LABEL_NUMBER (XEXP (addr, 0)), \ + reg_name[REGNO (XEXP (ireg, 0))]); \ + else \ + fprintf (FILE, "(L%d.b,pc,%s.l", \ + CODE_LABEL_NUMBER (XEXP (addr, 0)), \ + reg_name[REGNO (ireg)]); \ + if (scale != 1) fprintf (FILE, "*%d", scale); \ + putc (')', FILE); \ + break; } \ + if (breg != 0 && ireg == 0 && GET_CODE (addr) == LABEL_REF) \ + { fprintf (FILE, "(L%d.b,pc,%s.l", \ + CODE_LABEL_NUMBER (XEXP (addr, 0)), \ + reg_name[REGNO (breg)]); \ + putc (')', FILE); \ + break; } \ + if (ireg != 0 || breg != 0) \ + { int scale = 1; \ + if (breg == 0) \ + abort (); \ + if (addr && GET_CODE (addr) == LABEL_REF) abort (); \ + fprintf (FILE, "("); \ + if (addr != 0) { \ + output_addr_const (FILE, addr); \ + putc (',', FILE); } \ + fprintf (FILE, "%s", reg_names[REGNO (breg)]); \ + if (ireg != 0) \ + putc (',', FILE); \ + if (ireg != 0 && GET_CODE (ireg) == MULT) \ + { scale = INTVAL (XEXP (ireg, 1)); \ + ireg = XEXP (ireg, 0); } \ + if (ireg != 0 && GET_CODE (ireg) == SIGN_EXTEND) \ + fprintf (FILE, "%s.w", reg_names[REGNO (XEXP (ireg, 0))]); \ + else if (ireg != 0) \ + fprintf (FILE, "%s.l", reg_names[REGNO (ireg)]); \ + if (scale != 1) fprintf (FILE, "*%d", scale); \ + putc (')', FILE); \ + break; \ + } \ + else if (reg1 != 0 && GET_CODE (addr) == LABEL_REF) \ + { fprintf (FILE, "(L%d.b,pc,%s:l)", \ + { fprintf (FILE, "(L%d-LI%d.b,pc,%s:l)", \ + CODE_LABEL_NUMBER (XEXP (addr, 0)), \ + CODE_LABEL_NUMBER (XEXP (addr, 0)), \ + reg_names[REGNO (reg1)]); \ + break; } \ + default: \ + if (GET_CODE (addr) == CONST_INT \ + && INTVAL (addr) < 0x8000 \ + && INTVAL (addr) >= -0x8000) \ + fprintf (FILE, "%d.w", INTVAL (addr)); \ + else \ + output_addr_const (FILE, addr); \ + }} + + #else /* Using GAS, which uses the MIT assembler syntax, like a Sun. */ + + #define FUNCTION_PROFILER(FILE, LABEL_NO) \ + fprintf (FILE, "\tmovl #LP%d,d0\n\tjsr mcount\n", (LABEL_NO)); + + #endif /* MOTOROLA */ diff -rc2N gcc-1.34/config/tm-newsgas.h gcc-1.35/config/tm-newsgas.h *** gcc-1.34/config/tm-newsgas.h Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/tm-newsgas.h Thu Mar 30 00:39:08 1989 *************** *** 0 **** --- 1,3 ---- + #define USE_GAS + + #include "tm-news.h" diff -rc2N gcc-1.34/config/tm-next.h gcc-1.35/config/tm-next.h *** gcc-1.34/config/tm-next.h Tue Feb 14 07:20:01 1989 --- gcc-1.35/config/tm-next.h Tue Apr 18 18:57:43 1989 *************** *** 6,9 **** #define CPP_PREDEFINES "-Dmc68000 -DNeXT -Dunix -D__MACH__" #define CPLUSPLUS ! #define DOLLARS_IN_IDENTIFIERS --- 6,13 ---- #define CPP_PREDEFINES "-Dmc68000 -DNeXT -Dunix -D__MACH__" + /* Assumes no need to run special floating-point initialization code. */ + #undef STARTFILE_SPEC + #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}" + #define CPLUSPLUS ! #define DOLLARS_IN_IDENTIFIERS 1 diff -rc2N gcc-1.34/config/tm-ns32k.h gcc-1.35/config/tm-ns32k.h *** gcc-1.34/config/tm-ns32k.h Wed Feb 22 12:27:33 1989 --- gcc-1.35/config/tm-ns32k.h Wed Mar 29 17:48:37 1989 *************** *** 1194,1198 **** else if (CODE == '?'); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ --- 1194,1198 ---- else if (CODE == '?'); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ *************** *** 1225,1229 **** goto retry; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_name [REGNO (addr)]); \ break; \ case PRE_DEC: \ --- 1225,1229 ---- goto retry; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_names[REGNO (addr)]); \ break; \ case PRE_DEC: \ *************** *** 1230,1234 **** if (REGNO(XEXP(addr, 0)) != STACK_POINTER_REGNUM) \ fprintf(FILE, ")1:%d", REGNO(XEXP(addr,0))); \ ! else fprintf (FILE, "tos", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ --- 1230,1234 ---- if (REGNO(XEXP(addr, 0)) != STACK_POINTER_REGNUM) \ fprintf(FILE, ")1:%d", REGNO(XEXP(addr,0))); \ ! else fprintf (FILE, "tos", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case POST_INC: \ *************** *** 1235,1239 **** if (REGNO(XEXP(addr, 0)) != STACK_POINTER_REGNUM) \ fprintf(FILE, ")2:%d", REGNO(XEXP(addr,0))); \ ! else fprintf (FILE, "tos", reg_name [REGNO (XEXP (addr, 0))]); \ break; \ case MULT: \ --- 1235,1239 ---- if (REGNO(XEXP(addr, 0)) != STACK_POINTER_REGNUM) \ fprintf(FILE, ")2:%d", REGNO(XEXP(addr,0))); \ ! else fprintf (FILE, "tos", reg_names[REGNO (XEXP (addr, 0))]); \ break; \ case MULT: \ *************** *** 1249,1253 **** } \ fprintf (FILE, "0[%s:%c]", \ ! reg_name[ REGNO(reg1) ], \ "XbwXdXXXq"[INTVAL (reg2)]); \ break; \ --- 1249,1253 ---- } \ fprintf (FILE, "0[%s:%c]", \ ! reg_names[ REGNO(reg1) ], \ "XbwXdXXXq"[INTVAL (reg2)]); \ break; \ *************** *** 1281,1285 **** case REG: \ sprintf (reg1_str, "(%s)", \ ! reg_name[REGNO (offset)]); \ offset = 0; \ break; \ --- 1281,1285 ---- case REG: \ sprintf (reg1_str, "(%s)", \ ! reg_names[REGNO (offset)]); \ offset = 0; \ break; \ *************** *** 1298,1302 **** } \ sprintf (reg1_str, "(%s))", \ ! reg_name[REGNO (XEXP(offset,0))]); \ offset = XEXP (offset, 1); \ break; \ --- 1298,1302 ---- } \ sprintf (reg1_str, "(%s))", \ ! reg_names[REGNO (XEXP(offset,0))]); \ offset = XEXP (offset, 1); \ break; \ *************** *** 1324,1328 **** } \ sprintf (reg2_str, "[%s:%c]", \ ! reg_name[ REGNO(XEXP (reg1, 0)) ], \ "XbwXdXXXq"[INTVAL (XEXP (reg1, 1))]); \ reg1 = 0; \ --- 1324,1328 ---- } \ sprintf (reg2_str, "[%s:%c]", \ ! reg_names[ REGNO(XEXP (reg1, 0)) ], \ "XbwXdXXXq"[INTVAL (XEXP (reg1, 1))]); \ reg1 = 0; \ *************** *** 1337,1341 **** } \ sprintf (reg2_str, "[%s:%c]", \ ! reg_name[ REGNO(XEXP (reg1, 0)) ], \ "XbwXdXXXq"[INTVAL (XEXP (reg1, 1))]); \ reg1 = 0; \ --- 1337,1341 ---- } \ sprintf (reg2_str, "[%s:%c]", \ ! reg_names[ REGNO(XEXP (reg1, 0)) ], \ "XbwXdXXXq"[INTVAL (XEXP (reg1, 1))]); \ reg1 = 0; \ *************** *** 1345,1349 **** { \ sprintf (reg2_str, "[%s:b]", \ ! reg_name[ REGNO(XEXP (addr, 0)) ]); \ addr = XEXP (addr, 1); /* CONST / REG */ \ } \ --- 1345,1349 ---- { \ sprintf (reg2_str, "[%s:b]", \ ! reg_names[ REGNO(XEXP (addr, 0)) ]); \ addr = XEXP (addr, 1); /* CONST / REG */ \ } \ *************** *** 1352,1356 **** { \ sprintf (reg2_str, "[%s:b]", \ ! reg_name[ REGNO(XEXP (addr, 1)) ]); \ addr = XEXP (addr, 0); /* CONST / REG */ \ } \ --- 1352,1356 ---- { \ sprintf (reg2_str, "[%s:b]", \ ! reg_names[ REGNO(XEXP (addr, 1)) ]); \ addr = XEXP (addr, 0); /* CONST / REG */ \ } \ *************** *** 1375,1379 **** exit (1); \ } \ ! sprintf (reg2_str, "[%s:%c]", reg_name[ REGNO(reg1) ], \ "XbwXdXXXq"[INTVAL (addr)]); \ break; \ --- 1375,1379 ---- exit (1); \ } \ ! sprintf (reg2_str, "[%s:%c]", reg_names[ REGNO(reg1) ], \ "XbwXdXXXq"[INTVAL (addr)]); \ break; \ *************** *** 1381,1390 **** if (!*reg1_str) { \ if (offset || offset_printed) \ ! sprintf (reg1_str, "(%s)", reg_name[REGNO (addr)]); \ else \ ! sprintf (reg1_str, "0(%s)", reg_name[REGNO (addr)]); \ } else if (!*reg2_str) \ sprintf (reg2_str, "[%s:b]", \ ! reg_name[REGNO (addr)]); \ else abort(); \ break; \ --- 1381,1390 ---- if (!*reg1_str) { \ if (offset || offset_printed) \ ! sprintf (reg1_str, "(%s)", reg_names[REGNO (addr)]); \ else \ ! sprintf (reg1_str, "0(%s)", reg_names[REGNO (addr)]); \ } else if (!*reg2_str) \ sprintf (reg2_str, "[%s:b]", \ ! reg_names[REGNO (addr)]); \ else abort(); \ break; \ *************** *** 1396,1403 **** if (offset || offset_printed) \ sprintf (reg1_str, "(0(%s))", \ ! reg_name[REGNO (addr)]); \ else \ sprintf (reg1_str, "0(0(%s))", \ ! reg_name[REGNO (addr)]); \ } else \ abort(); \ --- 1396,1403 ---- if (offset || offset_printed) \ sprintf (reg1_str, "(0(%s))", \ ! reg_names[REGNO (addr)]); \ else \ sprintf (reg1_str, "0(0(%s))", \ ! reg_names[REGNO (addr)]); \ } else \ abort(); \ *************** *** 1407,1411 **** if (!*reg1_str) { \ sprintf (reg1_str, "(%s))", \ ! reg_name[REGNO(XEXP(addr, 0))]); \ offset = XEXP(addr, 1); \ } else \ --- 1407,1411 ---- if (!*reg1_str) { \ sprintf (reg1_str, "(%s))", \ ! reg_names[REGNO(XEXP(addr, 0))]); \ offset = XEXP(addr, 1); \ } else \ *************** *** 1414,1418 **** if (!*reg1_str) { \ sprintf (reg1_str, "(%s))", \ ! reg_name[REGNO(XEXP(addr, 1))]); \ offset = XEXP(addr, 0); \ } else \ --- 1414,1418 ---- if (!*reg1_str) { \ sprintf (reg1_str, "(%s))", \ ! reg_names[REGNO(XEXP(addr, 1))]); \ offset = XEXP(addr, 0); \ } else \ diff -rc2N gcc-1.34/config/tm-sequent.h gcc-1.35/config/tm-sequent.h *** gcc-1.34/config/tm-sequent.h Wed Feb 22 12:27:30 1989 --- gcc-1.35/config/tm-sequent.h Wed Mar 29 17:48:34 1989 *************** *** 59,63 **** else if (CODE == '?'); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ { \ --- 59,63 ---- else if (CODE == '?'); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ { \ *************** *** 71,75 **** fprintf (FILE, "0(0(sp))"); \ else fprintf (FILE, "0(0(%s))", \ ! reg_name [REGNO (XEXP (xfoo, 0))]); \ else \ { \ --- 71,75 ---- fprintf (FILE, "0(0(sp))"); \ else fprintf (FILE, "0(0(%s))", \ ! reg_names[REGNO (XEXP (xfoo, 0))]); \ else \ { \ *************** *** 80,84 **** break; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_name [REGNO (xfoo)]); \ break; \ case PRE_DEC: \ --- 80,84 ---- break; \ case REG: \ ! fprintf (FILE, "0(%s)", reg_names[REGNO (xfoo)]); \ break; \ case PRE_DEC: \ diff -rc2N gcc-1.34/config/tm-sparc.h gcc-1.35/config/tm-sparc.h *** gcc-1.34/config/tm-sparc.h Thu Feb 23 05:55:48 1989 --- gcc-1.35/config/tm-sparc.h Wed Mar 29 17:48:30 1989 *************** *** 545,549 **** #define FUNCTION_PROLOGUE(FILE, SIZE) \ { \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ extern int current_function_pretend_args_size; \ --- 545,548 ---- *************** *** 601,605 **** #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\tsethi %%hi(LPBX0),%%o0\n\tld [%%lo(LPBX0)+%%o0],%%o1\n\ttst %%o1\n\tbne LPB%d\n\tnop\n\tcall ___bb_init_func\n\tnop\nLPB%d:\n", \ (LABELNO), (LABELNO)) --- 600,604 ---- #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ ! fprintf (FILE, "\tsethi %%hi(LPBX0),%%o0\n\tld [%%lo(LPBX0)+%%o0],%%o1\n\ttst %%o1\n\tbne LPY%d\n\tnop\n\tcall ___bb_init_func\n\tnop\nLPY%d:\n", \ (LABELNO), (LABELNO)) *************** *** 645,649 **** #define FUNCTION_EPILOGUE(FILE, SIZE) \ { \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ extern int may_call_alloca; \ --- 644,647 ---- *************** *** 1260,1268 **** On SPARC, the CODE can be `r', meaning this is a register-only operand ! and an immediate zero should be represented as `r0'. */ #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if ((CODE) == 'm') \ output_address (XEXP (X, 0)); \ --- 1258,1268 ---- On SPARC, the CODE can be `r', meaning this is a register-only operand ! and an immediate zero should be represented as `r0'. ! It can also be `m', meaning that X is a memory reference but print ! its address as a non-memory operand. */ #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if ((CODE) == 'm') \ output_address (XEXP (X, 0)); \ *************** *** 1323,1327 **** if (GET_CODE (addr) == REG) \ { \ ! fprintf (FILE, "%s", reg_name [REGNO (addr)]); \ } \ else if (GET_CODE (addr) == PLUS) \ --- 1323,1327 ---- if (GET_CODE (addr) == REG) \ { \ ! fprintf (FILE, "%s", reg_names[REGNO (addr)]); \ } \ else if (GET_CODE (addr) == PLUS) \ *************** *** 1333,1341 **** else \ base = XEXP (addr, 0), index = XEXP (addr, 1); \ ! fprintf (FILE, "%s", reg_name [REGNO (base)]); \ if (index == 0) \ fprintf (FILE, "%+d", offset); \ else \ ! fprintf (FILE, "+%s", reg_name [REGNO (index)]); \ } \ else \ --- 1333,1341 ---- else \ base = XEXP (addr, 0), index = XEXP (addr, 1); \ ! fprintf (FILE, "%s", reg_names[REGNO (base)]); \ if (index == 0) \ fprintf (FILE, "%+d", offset); \ else \ ! fprintf (FILE, "+%s", reg_names[REGNO (index)]); \ } \ else \ diff -rc2N gcc-1.34/config/tm-spur.h gcc-1.35/config/tm-spur.h *** gcc-1.34/config/tm-spur.h Wed Feb 22 12:27:26 1989 --- gcc-1.35/config/tm-spur.h Wed Mar 29 17:48:24 1989 *************** *** 458,462 **** #define FUNCTION_PROLOGUE(FILE, SIZE) \ { \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ extern int current_function_pretend_args_size; \ --- 458,461 ---- *************** *** 529,533 **** #define FUNCTION_EPILOGUE(FILE, SIZE) \ { \ - static char *reg_names[] = REGISTER_NAMES; \ extern char call_used_regs[]; \ extern int may_call_alloca; \ --- 528,531 ---- *************** *** 991,995 **** #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ --- 989,993 ---- #define PRINT_OPERAND(FILE, X, CODE) \ { if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ *************** *** 1008,1012 **** if (GET_CODE (addr) == REG) \ { \ ! fprintf (FILE, "%s,$0", reg_name [REGNO (addr)]); \ } \ else if (GET_CODE (addr) == PLUS) \ --- 1006,1010 ---- if (GET_CODE (addr) == REG) \ { \ ! fprintf (FILE, "%s,$0", reg_names[REGNO (addr)]); \ } \ else if (GET_CODE (addr) == PLUS) \ *************** *** 1018,1026 **** else \ base = XEXP (addr, 0), index = XEXP (addr, 1); \ ! fprintf (FILE, "%s,", reg_name [REGNO (base)]); \ if (index == 0) \ fprintf (FILE, "$%d", offset); \ else \ ! fprintf (FILE, "%s,", reg_name [REGNO (index)]); \ } \ else \ --- 1016,1024 ---- else \ base = XEXP (addr, 0), index = XEXP (addr, 1); \ ! fprintf (FILE, "%s,", reg_names[REGNO (base)]); \ if (index == 0) \ fprintf (FILE, "$%d", offset); \ else \ ! fprintf (FILE, "%s,", reg_names[REGNO (index)]); \ } \ else \ diff -rc2N gcc-1.34/config/tm-sun386i.h gcc-1.35/config/tm-sun386i.h *** gcc-1.34/config/tm-sun386i.h Wed Feb 22 12:27:20 1989 --- gcc-1.35/config/tm-sun386i.h Wed Mar 29 17:31:02 1989 *************** *** 42,51 **** /* Specify predefined symbols in preprocessor. */ ! #define CPP_PREDEFINES "-Dunix -Di386 -Dsun386" ! /* Allow #ident and #sccs in preprocessor. */ - #define IDENT_DIRECTIVE #define SCCS_DIRECTIVE /* We don't want to output SDB debugging information. */ --- 42,54 ---- /* Specify predefined symbols in preprocessor. */ ! #define CPP_PREDEFINES "-Dunix -Di386 -Dsun386 -Dsun" ! /* Allow #sccs in preprocessor. */ #define SCCS_DIRECTIVE + + /* Output #ident as a .ident. */ + + #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); /* We don't want to output SDB debugging information. */ diff -rc2N gcc-1.34/config/tm-vax.h gcc-1.35/config/tm-vax.h *** gcc-1.34/config/tm-vax.h Wed Feb 22 12:27:18 1989 --- gcc-1.35/config/tm-vax.h Wed Mar 29 17:48:18 1989 *************** *** 998,1002 **** { if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_name [REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ --- 998,1002 ---- { if (CODE == '#') fputc (ASM_DOUBLE_CHAR, FILE); \ else if (GET_CODE (X) == REG) \ ! fprintf (FILE, "%s", reg_names[REGNO (X)]); \ else if (GET_CODE (X) == MEM) \ output_address (XEXP (X, 0)); \ diff -rc2N gcc-1.34/config/tm-vaxv.h gcc-1.35/config/tm-vaxv.h *** gcc-1.34/config/tm-vaxv.h Wed Feb 22 12:27:16 1989 --- gcc-1.35/config/tm-vaxv.h Wed Mar 29 17:31:04 1989 *************** *** 22,27 **** /* Cope with these under SysV */ - #define IDENT_DIRECTIVE #define SCCS_DIRECTIVE #undef DBX_DEBUGGING_INFO --- 22,30 ---- /* Cope with these under SysV */ #define SCCS_DIRECTIVE + + /* Output #ident as a .ident. */ + + #define ASM_OUTPUT_IDENT(FILE, NAME) fprintf (FILE, "\t.ident \"%s\"\n", NAME); #undef DBX_DEBUGGING_INFO diff -rc2N gcc-1.34/config/tm.h gcc-1.35/config/tm.h *** gcc-1.34/config/tm.h Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/tm.h Thu Apr 6 16:59:48 1989 *************** *** 0 **** --- 1,5 ---- + /* This is needed when one xm- file includes another; + then the xm- file that includes tm.h is found explicitly in `config' + and therefore will only look in `config'. */ + + #include "../tm.h" diff -rc2N gcc-1.34/config/xm-altos3068.h gcc-1.35/config/xm-altos3068.h *** gcc-1.34/config/xm-altos3068.h Wed Dec 31 19:00:00 1969 --- gcc-1.35/config/xm-altos3068.h Wed Mar 29 10:59:14 1989 *************** *** 0 **** --- 1,7 ---- + #define USG + + #include "xm-m68k.h" + + #define bcopy(a,b,c) memcpy (b,a,c) + #define bzero(a,b) memset (a,0,b) + #define bcmp(a,b,c) memcmp (a,b,c) diff -rc2N gcc-1.34/config/xm-mips.h gcc-1.35/config/xm-mips.h *** gcc-1.34/config/xm-mips.h Wed Feb 22 12:26:57 1989 --- gcc-1.35/config/xm-mips.h Wed Apr 5 17:25:08 1989 *************** *** 32,33 **** --- 32,37 ---- tm.h is a symbolic link to the actual target specific file. */ #include "tm.h" + + /* Arguments to use with `exit'. */ + #define SUCCESS_EXIT_CODE 0 + #define FATAL_EXIT_CODE 33 diff -rc2N gcc-1.34/config.gcc gcc-1.35/config.gcc *** gcc-1.34/config.gcc Wed Feb 22 12:33:44 1989 --- gcc-1.35/config.gcc Fri Apr 7 11:56:55 1989 *************** *** 147,151 **** configuration_file=xm-hp9k320.h ;; ! hp9k320g) # with gnu as, ld and gdb cpu_type=m68k configuration_file=xm-hp9k320.h --- 147,151 ---- configuration_file=xm-hp9k320.h ;; ! hp9k320-gas | hp9k320g) # with gnu as, ld and gdb cpu_type=m68k configuration_file=xm-hp9k320.h *************** *** 154,160 **** cpu_type=m68k ;; ! news800) cpu_type=m68k ;; 3b1) cpu_type=m68k --- 154,172 ---- cpu_type=m68k ;; ! news | news800) ! configuration_file=xm-news.h ! target_machine=tm-news.h cpu_type=m68k ;; + news-gas | news-g) + configuration_file=xm-news.h + target_machine=tm-newsgas.h + cpu_type=m68k + ;; + altos | altos3068) # Altos 3068 with gnu as, ld and gdb + cpu_type=m68k + configuration_file=xm-altos3068.h + target_machine=tm-altos3068.h + ;; 3b1) cpu_type=m68k *************** *** 163,171 **** sequent-ns32k | sequent) cpu_type=ns32k ! aux_output=output-ns32k.c ;; encore) cpu_type=ns32k ! aux_output=output-ns32k.c ;; genix) --- 175,183 ---- sequent-ns32k | sequent) cpu_type=ns32k ! aux_output=out-ns32k.c ;; encore) cpu_type=ns32k ! aux_output=out-ns32k.c ;; genix) *************** *** 188,191 **** --- 200,206 ---- cpu_type=convex ;; + mips) + machine=mips + ;; # 370) # machine=370 *************** *** 195,203 **** # if cpu_type is not set, define cpu_type to machine. # ! cpu_type=${cpu_type=$machine} ! configuration_file=${configuration_file=xm-$cpu_type.h} ! target_machine=${target_machine=tm-$machine.h} machine_description=${cpu_type}.md ! aux_output=${aux_output=output-$cpu_type.c} if [ xx${vint} = xx ] --- 210,218 ---- # if cpu_type is not set, define cpu_type to machine. # ! cpu_type=${cpu_type-$machine} ! configuration_file=${configuration_file-xm-$cpu_type.h} ! target_machine=${target_machine-tm-$machine.h} machine_description=${cpu_type}.md ! aux_output=${aux_output-out-$cpu_type.c} if [ xx${vint} = xx ] *************** *** 218,225 **** set $links; link=$1; shift; links=$* ! if [ ! -r $file ] then echo "$progname: cannot create a link \`$link'," ! echo "since the file \`$file' does not exist." exit 1 fi --- 233,240 ---- set $links; link=$1; shift; links=$* ! if [ ! -r config/$file ] then echo "$progname: cannot create a link \`$link'," ! echo "since the file \`config/$file' does not exist." exit 1 fi *************** *** 228,239 **** rm -f config.status # Make a symlink if possible, otherwise try a hard link ! $symbolic_link $file $link 2>/dev/null || $hard_link $file $link if [ ! -r $link ] then ! echo "$progname: unable to link \`$link' to \`$file'." exit 1 fi ! echo "Linked \`$link' to \`$file'." done --- 243,254 ---- rm -f config.status # Make a symlink if possible, otherwise try a hard link ! $symbolic_link config/$file $link 2>/dev/null || $hard_link config/$file $link if [ ! -r $link ] then ! echo "$progname: unable to link \`$link' to \`config/$file'." exit 1 fi ! echo "Linked \`$link' to \`config/$file'." done diff -rc2N gcc-1.34/cpp.texinfo gcc-1.35/cpp.texinfo *** gcc-1.34/cpp.texinfo Sat Feb 18 03:07:23 1989 --- gcc-1.35/cpp.texinfo Sat Apr 22 00:02:48 1989 *************** *** 5,9 **** This file documents the GNU C Preprocessor. ! Copyright (C) 1987 Richard M. Stallman. Permission is granted to make and distribute verbatim copies of --- 5,9 ---- This file documents the GNU C Preprocessor. ! Copyright (C) 1987, 1989 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 33,37 **** @center First Edition @sp 1 ! @center January 1987 @sp 5 @center Richard M. Stallman --- 33,37 ---- @center First Edition @sp 1 ! @center April 1989 @sp 5 @center Richard M. Stallman *************** *** 38,42 **** @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1987 Richard M. Stallman. Permission is granted to make and distribute verbatim copies of --- 38,42 ---- @page @vskip 0pt plus 1filll ! Copyright @copyright{} 1987, 1989 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 94,100 **** users, so the GNU C preprocessor is configured to accept these constructs by default. Strictly speaking, to get ANSI Standard C, you must use the ! options @samp{-T}, @samp{-undef} and @samp{-pedantic}, but in practice the ! consequences of having strict ANSI Standard C make it undesirable to do ! this. @xref{Invocation}. @menu --- 94,100 ---- users, so the GNU C preprocessor is configured to accept these constructs by default. Strictly speaking, to get ANSI Standard C, you must use the ! options @samp{-trigraphs}, @samp{-undef} and @samp{-pedantic}, but in ! practice the consequences of having strict ANSI Standard C make it ! undesirable to do this. @xref{Invocation}. @menu *************** *** 186,191 **** recognize the trigraph. ! This exception is relevant only if you use the @samp{-T} option to ! enable trigraph processing. @xref{Invocation}. @end itemize --- 186,191 ---- recognize the trigraph. ! This exception is relevant only if you use the @samp{-trigraphs} ! option to enable trigraph processing. @xref{Invocation}. @end itemize *************** *** 233,236 **** --- 233,243 ---- @samp{#include}. + @menu + * Header Uses:: What header files are used for. + * Include Syntax:: How to write @samp{#include} commands. + * Include Operation:: What @samp{#include} does. + * Once-Only:: Preventing multiple inclusion of one header file. + @end menu + @node Header Uses, Include Syntax, Header Files, Header Files @subsection Uses of Header Files *************** *** 325,329 **** @end table ! @node Include Operation,, Include Syntax, Header Files @subsection How @samp{#include} Works --- 332,336 ---- @end table ! @node Include Operation, Once-Only, Include Syntax, Header Files @subsection How @samp{#include} Works *************** *** 378,381 **** --- 385,430 ---- newline. + @node Once-Only,, Include Operation, Header Files + @subsection Once-Only Include Files + @cindex repeated inclusion + + Very often, one header file includes another. It can easily result that a + certain header file is included more than once. This may lead to errors, + if the header file defines structure types or typedefs, and is certainly + wasteful. Therefore, we often wish to prevent multiple inclusion of a + header file. + + The standard way to do this is to enclose the entire real contents of the + file in a conditional, like this: + + @example + #ifndef __FILE_FOO_SEEN__ + #define __FILE_FOO_SEEN__ + + @var{the entire file} + + #endif /* __FILE_FOO_SEEN__ */ + @end example + + The macro @code{__FILE_FOO_SEEN__} indicates that the file has been + included once already; its name should begin with @samp{__}, and should + contain the name of the file to avoid accidental conflicts. + + A superior way which works only in GNU C is to include the following + command in the file, preferably at the beginning: + + @example + #pragma once + @end example + + This command tells the preprocessor to ignore any future commands to + include the same file (whichever file the command appears in). The + advantage of this is that it saves the preprocessor from even having to + reread the file. + + Note that @samp{#pragma once} works by file name; if a file has more + than one name, it can be included once under each name, despite + @samp{#pragma once}. + @node Macros, Conditionals, Header Files, Top @section Macros *************** *** 647,650 **** --- 696,705 ---- of a C string constant. + @item __BASE_FILE__ + @findex __BASE_FILE__ + This macro expands to the name of the main input file, in the form + of a C string constant. This is the source file that was specified + as an argument when the C compiler was invoked. + @item __LINE__ @findex __LINE__ *************** *** 800,813 **** These predefined symbols are not only nonstandard, they are contrary to the ! ANSI standard because their names do not start with underscores. However, ! the GNU C preprocessor would be useless if it did not predefine the same ! names that are normally predefined on the system and machine you are using. ! Even system header files check the predefined names and will generate ! incorrect declarations if they do not find the names that are expected. The set of nonstandard predefined names in the GNU C preprocessor is controlled by the macro @samp{CPP_PREDEFINES}, which should be a string ! containing @samp{-D} options, separated by spaces. For example, on the Sun, ! the definition @example --- 855,884 ---- These predefined symbols are not only nonstandard, they are contrary to the ! ANSI standard because their names do not start with underscores. ! Therefore, the option @samp{-ansi} inhibits the definition of these ! symbols. + This tends to make @samp{-ansi} useless, since many programs depend on the + customary nonstandard predefined symbols. Even system header files check + them and will generate incorrect declarations if they do not find the names + that are expected. You might think that the header files supplied for the + Uglix computer would not need to test what machine they are running on, + because they can simply assume it is the Uglix; but often they do, and they + do so using the customary names. As a result, very few C programs will not + compile with @samp{-ansi}. We intend to avoid such problems on the GNU + system. + + What, then, should you do in an ANSI C program to test the type of machine + it will run on? + + GNU C offers a parallel series of symbols for this purpose, whose names + are made from the customary ones by adding @samp{__} at the beginning + and end. Thus, the symbol @code{__vax__} would be available on a vax, + and so on. + The set of nonstandard predefined names in the GNU C preprocessor is controlled by the macro @samp{CPP_PREDEFINES}, which should be a string ! containing @samp{-D} options, separated by spaces. For example, on the ! Sun 3, we use the following definition: @example *************** *** 815,824 **** @end example - @noindent - is used. - - The @samp{-ansi} option which requests complete support for ANSI C - inhibits the definition of these predefined symbols. - @node Stringification, Concatenation, Predefined, Macros @subsection Stringification --- 886,889 ---- *************** *** 1566,1569 **** --- 1631,1636 ---- @node Conditional Uses, Conditional Syntax, Conditionals, Conditionals + @subsection Why Conditionals are Used + Generally there are three kinds of reason to use a conditional. *************** *** 1923,1928 **** @findex #pragma @cindex null command ! This section describes two additional preprocesor commands. They are not very useful, but are mentioned for completeness. --- 1990,1996 ---- @findex #pragma + @findex #ident @cindex null command ! This section describes three additional preprocesor commands. They are not very useful, but are mentioned for completeness. *************** *** 1937,1944 **** The @samp{#pragma} command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, ! @samp{#pragma} first attempts to run the game @code{rogue}; if that fails, ! it tries to run the game @code{hack}; if that fails, it tries to run ! GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a ! fatal error. In any case, preprocessing does not continue. @node Output, Invocation, Other Commands, Top --- 2005,2015 ---- The @samp{#pragma} command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, ! @samp{#pragma} commands are ignored, except for @samp{#pragma once} ! (@pxref{Once-Only}). ! ! The @samp{#ident} is supported for compatibility with certain other ! systems. It is followed by a line of text. On certain systems, the ! text is copied into a special place in the object file; on most systems, ! the text is ignored and this directive has no effect. @node Output, Invocation, Other Commands, Top *************** *** 2000,2012 **** output before the expansion of the macro call. ! @item -T ! @findex -T Process ANSI standard trigraph sequences. These are three-character sequences, all starting with @samp{??}, that are defined by ANSI C to stand for single characters. For example, @samp{??/} stands for ! @samp{\}, so @samp{'??/n'} is a character constant for Newline. Strictly speaking, the GNU C preprocessor does not support all ! programs in ANSI Standard C unless @samp{-T} is used, but if you ! ever notice the difference it will be with relief. You don't want to know any more about trigraphs. --- 2071,2083 ---- output before the expansion of the macro call. ! @item -trigraphs ! @findex -trigraphs Process ANSI standard trigraph sequences. These are three-character sequences, all starting with @samp{??}, that are defined by ANSI C to stand for single characters. For example, @samp{??/} stands for ! @samp{\}, so @samp{'??/n'} is a character constant for a newline. Strictly speaking, the GNU C preprocessor does not support all ! programs in ANSI Standard C unless @samp{-trigraphs} is used, but if ! you ever notice the difference it will be with relief. You don't want to know any more about trigraphs. diff -rc2N gcc-1.34/cse.c gcc-1.35/cse.c *** gcc-1.34/cse.c Wed Feb 22 11:50:00 1989 --- gcc-1.35/cse.c Wed Apr 12 23:08:43 1989 *************** *** 1531,1534 **** --- 1531,1536 ---- if (x == y) return 1; + if (x == 0 || y == 0) + return 0; code = GET_CODE (x); *************** *** 1590,1593 **** --- 1592,1598 ---- repeat: + if (x == 0) + return 0; + code = GET_CODE (x); if (code == MEM) *************** *** 3118,3121 **** --- 3123,3128 ---- MEM_VOLATILE_P (dest) = MEM_VOLATILE_P (sets[i].inner_dest); + MEM_IN_STRUCT_P (dest) + = MEM_IN_STRUCT_P (sets[i].inner_dest); SET_DEST (sets[i].rtl) = dest; sets[i].inner_dest = dest; *************** *** 3131,3136 **** if (GET_CODE (SET_DEST (sets[i].rtl)) == ZERO_EXTRACT || GET_CODE (SET_DEST (sets[i].rtl)) == SIGN_EXTRACT) ! sets[i].src_volatile = 1, src_eqv = 0; /* No further processing for this assignment if destination is volatile or if the source and destination --- 3138,3156 ---- if (GET_CODE (SET_DEST (sets[i].rtl)) == ZERO_EXTRACT || GET_CODE (SET_DEST (sets[i].rtl)) == SIGN_EXTRACT) ! { ! rtx width = XEXP (SET_DEST (sets[i].rtl), 1); ! rtx value = equiv_constant (SET_SRC (sets[i].rtl)); + if (value != 0 && GET_CODE (value) == CONST_INT + && GET_CODE (width) == CONST_INT + && INTVAL (width) < HOST_BITS_PER_INT + && ! (INTVAL (value) & (-1) << INTVAL (width))) + /* Exception: if the value is constant, + we can tell whether truncation would change it. */ + ; + else + sets[i].src_volatile = 1, src_eqv = 0; + } + /* No further processing for this assignment if destination is volatile or if the source and destination *************** *** 3593,3596 **** --- 3613,3619 ---- insn = cse_basic_block (insn, val.last); + #ifdef USE_C_ALLOCA + alloca (0); + #endif } diff -rc2N gcc-1.34/dbxout.c gcc-1.35/dbxout.c *** gcc-1.34/dbxout.c Wed Feb 22 11:49:52 1989 --- gcc-1.35/dbxout.c Fri Apr 21 13:16:27 1989 *************** *** 689,693 **** V for static storage and local scope, for those two, use N_LCSYM if data is in bss segment, ! N_STSYM if it is in data segment, or N_FUN if in text segment. no letter at all, and N_LSYM, for auto variable, r and N_RSYM for register variable. */ --- 689,693 ---- V for static storage and local scope, for those two, use N_LCSYM if data is in bss segment, ! N_STSYM otherwise. (N_FUN confuses GDB.) no letter at all, and N_LSYM, for auto variable, r and N_RSYM for register variable. */ *************** *** 709,712 **** --- 709,716 ---- if (!DECL_INITIAL (decl)) current_sym_code = N_LCSYM; + #if 0 /* Note: N_FUN confuses GDB, since GDB expects it to start a new + nest of N_LBRAC/N_RBRAC, etc. But N_STSYM probably does not + work either, since it relocates as data segment. + Probably no standard N_ code works, so we must invent one. */ else if (TREE_READONLY (decl) && ! TREE_VOLATILE (decl)) /* This is not quite right, but it's the closest *************** *** 713,716 **** --- 717,721 ---- of all the codes that Unix defines. */ current_sym_code = N_FUN; + #endif else current_sym_code = N_STSYM; *************** *** 1090,1095 **** if (depth > 0) { blocknum = next_block_number++; ! fprintf (asmfile, ".stabn %d,0,0,LBB%d\n", N_LBRAC, blocknum); } --- 1095,1104 ---- if (depth > 0) { + char buf[20]; blocknum = next_block_number++; ! ASM_GENERATE_INTERNAL_LABEL (buf, "LBB", blocknum); ! fprintf (asmfile, ".stabn %d,0,0,", N_LBRAC); ! assemble_name (asmfile, buf); ! fprintf (asmfile, "\n"); } *************** *** 1099,1103 **** /* Refer to the marker for the end of the block. */ if (depth > 0) ! fprintf (asmfile, ".stabn %d,0,0,LBE%d\n", N_RBRAC, blocknum); } stmt = TREE_CHAIN (stmt); --- 1108,1118 ---- /* Refer to the marker for the end of the block. */ if (depth > 0) ! { ! char buf[20]; ! ASM_GENERATE_INTERNAL_LABEL (buf, "LBE", blocknum); ! fprintf (asmfile, ".stabn %d,0,0,", N_RBRAC); ! assemble_name (asmfile, buf); ! fprintf (asmfile, "\n"); ! } } stmt = TREE_CHAIN (stmt); *************** *** 1118,1121 **** --- 1133,1140 ---- dbxout_parms (DECL_ARGUMENTS (decl)); dbxout_block (DECL_INITIAL (decl), 0, DECL_ARGUMENTS (decl)); + + /* If we made any temporary types in this fn that weren't + output, output them now. */ + dbxout_types (get_temporary_types ()); } \f diff -rc2N gcc-1.34/emit-rtl.c gcc-1.35/emit-rtl.c *** gcc-1.34/emit-rtl.c Wed Feb 22 11:54:05 1989 --- gcc-1.35/emit-rtl.c Mon Apr 10 23:40:21 1989 *************** *** 371,374 **** --- 371,377 ---- if (GET_CODE (x) == CONST_INT) return gen_rtx (CONST_INT, VOIDmode, INTVAL (x) & GET_MODE_MASK (mode)); + if (GET_CODE (x) == CONST_DOUBLE) + return gen_rtx (CONST_INT, VOIDmode, + CONST_DOUBLE_LOW (x) & GET_MODE_MASK (mode)); if (GET_CODE (x) == MEM) { diff -rc2N gcc-1.34/expr.c gcc-1.35/expr.c *** gcc-1.34/expr.c Wed Feb 22 11:49:38 1989 --- gcc-1.35/expr.c Tue Apr 25 15:47:06 1989 *************** *** 293,298 **** enum machine_mode to_mode = GET_MODE (to); enum machine_mode from_mode = GET_MODE (from); ! int to_real = to_mode == SFmode || to_mode == DFmode; ! int from_real = from_mode == SFmode || from_mode == DFmode; int extending = (int) to_mode > (int) from_mode; --- 293,298 ---- enum machine_mode to_mode = GET_MODE (to); enum machine_mode from_mode = GET_MODE (from); ! int to_real = GET_MODE_CLASS (to_mode) == MODE_FLOAT; ! int from_real = GET_MODE_CLASS (from_mode) == MODE_FLOAT; int extending = (int) to_mode > (int) from_mode; *************** *** 387,391 **** { convert_move (gen_lowpart (SImode, to), from, unsignedp); ! emit_unop_insn (CODE_FOR_extendsidi2, to, to, SIGN_EXTEND); } #endif --- 387,392 ---- { convert_move (gen_lowpart (SImode, to), from, unsignedp); ! emit_unop_insn (CODE_FOR_extendsidi2, to, ! gen_lowpart (SImode, to), SIGN_EXTEND); } #endif *************** *** 433,438 **** GET_MODE_BITSIZE (from_mode)) && ((GET_CODE (from) == MEM && ! mode_dependent_address_p (XEXP (from, 0))) ! || GET_CODE (from) == REG)) { emit_move_insn (to, gen_lowpart (to_mode, from)); --- 434,441 ---- GET_MODE_BITSIZE (from_mode)) && ((GET_CODE (from) == MEM + && ! MEM_VOLATILE_P (from) && ! mode_dependent_address_p (XEXP (from, 0))) ! || GET_CODE (from) == REG ! || GET_CODE (from) == SUBREG)) { emit_move_insn (to, gen_lowpart (to_mode, from)); *************** *** 531,534 **** --- 534,539 ---- } + #if 0 /* This seems to be redundant with code 100 lines up. */ + /* Now we are truncating an integer to a smaller one. If the result is a temporary, we might as well just copy it, *************** *** 563,566 **** --- 568,572 ---- #endif /* not BYTES_BIG_ENDIAN */ } + #endif /* 0 */ if (from_mode == SImode && to_mode == HImode) *************** *** 621,625 **** return x; if (integer_mode_p (mode) ! && GET_MODE_SIZE (mode) <= GET_MODE_SIZE (GET_MODE (x))) return gen_lowpart (mode, x); temp = gen_reg_rtx (mode); --- 627,632 ---- return x; if (integer_mode_p (mode) ! && GET_MODE_SIZE (mode) <= GET_MODE_SIZE (GET_MODE (x)) ! && ! (GET_CODE (x) == MEM && MEM_VOLATILE_P (x))) return gen_lowpart (mode, x); temp = gen_reg_rtx (mode); *************** *** 1279,1283 **** move_by_pieces (gen_rtx (MEM, BLKmode, temp), xinner, INTVAL (size), align); ! return; } /* Try the most limited insn first, because there's no point --- 1286,1290 ---- move_by_pieces (gen_rtx (MEM, BLKmode, temp), xinner, INTVAL (size), align); ! goto ret; } /* Try the most limited insn first, because there's no point *************** *** 1293,1297 **** xinner, size, gen_rtx (CONST_INT, VOIDmode, align))); ! return; } #endif --- 1300,1304 ---- xinner, size, gen_rtx (CONST_INT, VOIDmode, align))); ! goto ret; } #endif *************** *** 1305,1309 **** xinner, size, gen_rtx (CONST_INT, VOIDmode, align))); ! return; } #endif --- 1312,1316 ---- xinner, size, gen_rtx (CONST_INT, VOIDmode, align))); ! goto ret; } #endif *************** *** 1314,1318 **** xinner, size, gen_rtx (CONST_INT, VOIDmode, align))); ! return; } #endif --- 1321,1325 ---- xinner, size, gen_rtx (CONST_INT, VOIDmode, align))); ! goto ret; } #endif *************** *** 1442,1445 **** --- 1449,1453 ---- } + ret: if (extra && args_addr == 0 && where_pad == stack_direction) anti_adjust_stack (gen_rtx (CONST_INT, VOIDmode, extra)); *************** *** 1498,1502 **** { val = gen_reg_rtx (mode); ! convert_move (val, argvec[argnum].value, 0); } else if (GET_CODE (val) != REG && GET_CODE (val) != MEM --- 1506,1510 ---- { val = gen_reg_rtx (mode); ! convert_move (val, argvec[count].value, 0); } else if (GET_CODE (val) != REG && GET_CODE (val) != MEM *************** *** 1537,1542 **** { #ifdef STACK_ARGS_ADJUST ! stack_padding = STACK_ARGS_ADJUST (args_size); ! args_size += stack_padding; #endif argblock --- 1545,1553 ---- { #ifdef STACK_ARGS_ADJUST ! struct args_size size; ! size.constant = args_size; ! size.var = 0; ! STACK_ARGS_ADJUST (size); ! args_size = size.constant; #endif argblock *************** *** 2168,2172 **** if (GET_CODE (DECL_RTL (exp)) == MEM && GET_CODE (XEXP (DECL_RTL (exp), 0)) == REG) ! return change_address (DECL_RTL (exp), BLKmode, XEXP (DECL_RTL (exp), 0)); if (GET_CODE (DECL_RTL (exp)) == MEM --- 2179,2183 ---- if (GET_CODE (DECL_RTL (exp)) == MEM && GET_CODE (XEXP (DECL_RTL (exp), 0)) == REG) ! return change_address (DECL_RTL (exp), GET_MODE (DECL_RTL (exp)), XEXP (DECL_RTL (exp), 0)); if (GET_CODE (DECL_RTL (exp)) == MEM *************** *** 2540,2546 **** && CONSTANT_P (XEXP (op1, 1))) { op0 = gen_rtx (PLUS, mode, XEXP (op1, 0), op0); if (GET_CODE (XEXP (op1, 1)) == CONST_INT) ! return plus_constant (op0, INTVAL (XEXP (op1, 1))); else return gen_rtx (PLUS, mode, op0, XEXP (op1, 1)); --- 2551,2567 ---- && CONSTANT_P (XEXP (op1, 1))) { + rtx tem; + int constant_term = 0; + op0 = gen_rtx (PLUS, mode, XEXP (op1, 0), op0); + /* Let's also eliminate constants from op0 if possible. */ + tem = eliminate_constant_term (op0, &constant_term); if (GET_CODE (XEXP (op1, 1)) == CONST_INT) ! { ! if (constant_term != 0) ! return plus_constant (tem, INTVAL (XEXP (op1, 1)) + constant_term); ! else ! return plus_constant (op0, INTVAL (XEXP (op1, 1))); ! } else return gen_rtx (PLUS, mode, op0, XEXP (op1, 1)); *************** *** 3388,3393 **** != NOT_BUILT_IN)) return; if (CALL_EXPR_RTL (exp) == 0 ! && TYPE_MODE (TREE_TYPE (exp)) != BLKmode) CALL_EXPR_RTL (exp) = expand_call (exp, 0, 0); return; --- 3409,3416 ---- != NOT_BUILT_IN)) return; + /* Precompute calls that don't return values in memory. */ if (CALL_EXPR_RTL (exp) == 0 ! && TYPE_MODE (TREE_TYPE (exp)) != BLKmode ! && ! RETURN_IN_MEMORY (TREE_TYPE (exp))) CALL_EXPR_RTL (exp) = expand_call (exp, 0, 0); return; *************** *** 3652,3657 **** /* Nonzero means count reg-parms' size in ARGS_SIZE. */ int stack_count_regparms = 0; - /* Number of bytes of padding BELOW the first argument. */ - int stack_padding = 0; /* Data on reg parms scanned so far. */ CUMULATIVE_ARGS args_so_far; --- 3675,3678 ---- *************** *** 3734,3737 **** --- 3755,3759 ---- if (TYPE_MODE (TREE_TYPE (exp)) == BLKmode + || RETURN_IN_MEMORY (TREE_TYPE (exp)) || (flag_pcc_struct_return && (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE *************** *** 3748,3752 **** #endif { ! if (target) { structure_value_addr = XEXP (target, 0); --- 3770,3774 ---- #endif { ! if (target && GET_CODE (target) == MEM) { structure_value_addr = XEXP (target, 0); *************** *** 3835,3839 **** and it would go in memory if treated as an extra parameter, treat it that way. */ ! if (structure_value_addr && GET_CODE (struct_value_rtx) == MEM) { rtx tem; --- 3857,3865 ---- and it would go in memory if treated as an extra parameter, treat it that way. */ ! if (structure_value_addr && GET_CODE (struct_value_rtx) == MEM ! && (GET_CODE (XEXP (struct_value_rtx, 0)) == PRE_DEC ! || GET_CODE (XEXP (struct_value_rtx, 0)) == PRE_INC ! || GET_CODE (XEXP (struct_value_rtx, 0)) == POST_DEC ! || GET_CODE (XEXP (struct_value_rtx, 0)) == POST_INC)) { rtx tem; *************** *** 3842,3846 **** tem = FUNCTION_ARG (args_so_far, Pmode, build_pointer_type (TREE_TYPE (funtype)), 1); ! if (tem != 0 && GET_CODE (tem) == MEM) { actparms = tree_cons (error_mark_node, --- 3868,3872 ---- tem = FUNCTION_ARG (args_so_far, Pmode, build_pointer_type (TREE_TYPE (funtype)), 1); ! if (tem == 0) { actparms = tree_cons (error_mark_node, *************** *** 3916,3919 **** --- 3942,3975 ---- args[i].reg = FUNCTION_ARG (args_so_far, TYPE_MODE (type), type, i < n_named_args); + /* If this argument needs more than the usual parm alignment, do + extrinsic padding to reach that alignment. */ + + #ifdef MAX_PARM_BOUNDARY + /* If MAX_PARM_BOUNDARY is not defined, it means that the usual + alignment requirements are relaxed for parms, and that no parm + needs more than PARM_BOUNDARY, regardless of data type. */ + + if (PARM_BOUNDARY < TYPE_ALIGN (type)) + { + int boundary = PARM_BOUNDARY; + + /* Determine the boundary to pad up to. */ + if (TYPE_ALIGN (type) > boundary) + boundary = TYPE_ALIGN (type); + if (boundary > MAX_PARM_BOUNDARY) + boundary = MAX_PARM_BOUNDARY; + + /* If the previous args don't reach such a boundary, + advance to the next one. */ + args[i].offset.constant += boundary - 1; + args[i].offset.constant &= boundary - 1; + args_size.constant += boundary - 1; + args_size.constant &= boundary - 1; + + if (args_size.var != 0) + abort (); /* This case not implemented yet */ + } + #endif /* MAX_PARM_BOUNDARY */ + #ifdef FUNCTION_ARG_PARTIAL_NREGS args[i].partial *************** *** 3943,3947 **** /* Compute how much space the argument should get: maybe pad to a multiple of the alignment for arguments. */ ! if (none == FUNCTION_ARG_PADDING (TYPE_MODE (type), (rtx)0)) args[i].size.constant = size; else --- 3999,4003 ---- /* Compute how much space the argument should get: maybe pad to a multiple of the alignment for arguments. */ ! if (none == FUNCTION_ARG_PADDING (TYPE_MODE (type), const0_rtx)) args[i].size.constant = size; else *************** *** 4041,4048 **** /* First, see if this is a precomputed struct-returning function call and other subsequent parms are also such. */ ! if (TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode && TREE_CODE (args[i].tree_value) == CALL_EXPR) for (j = i + 1; j < num_actuals; j++) ! if (TYPE_MODE (TREE_TYPE (args[j].tree_value)) == BLKmode && TREE_CODE (args[j].tree_value) == CALL_EXPR && args[j].reg != 0 || is_const) --- 4097,4106 ---- /* First, see if this is a precomputed struct-returning function call and other subsequent parms are also such. */ ! if ((TYPE_MODE (TREE_TYPE (args[i].tree_value)) == BLKmode ! || RETURN_IN_MEMORY (TREE_TYPE (args[i].tree_value))) && TREE_CODE (args[i].tree_value) == CALL_EXPR) for (j = i + 1; j < num_actuals; j++) ! if ((TYPE_MODE (TREE_TYPE (args[j].tree_value)) == BLKmode ! || RETURN_IN_MEMORY (TREE_TYPE (args[j].tree_value))) && TREE_CODE (args[j].tree_value) == CALL_EXPR && args[j].reg != 0 || is_const) *************** *** 4096,4099 **** --- 4154,4162 ---- insn_before = get_last_insn (); + /* Maybe do additional rounding on the size of the arguments. */ + #ifdef STACK_ARGS_ADJUST + STACK_ARGS_ADJUST (args_size); + #endif + /* If we have no actual push instructions, or shouldn't use them, or we need a variable amount of space, make space for all args right now. *************** *** 4104,4111 **** old_stack_level = copy_to_mode_reg (Pmode, stack_pointer_rtx); old_pending_adj = pending_stack_adjust; - #ifdef STACK_ARGS_ADJUST - stack_padding = STACK_ARGS_ADJUST (args_size.constant); - args_size.constant += stack_padding; - #endif argblock = push_block (round_push (ARGS_SIZE_RTX (args_size))); } --- 4167,4170 ---- *************** *** 4114,4121 **** int needed = args_size.constant; - #ifdef STACK_ARGS_ADJUST - stack_padding = STACK_ARGS_ADJUST (needed); - needed += stack_padding; - #endif #ifdef STACK_BOUNDARY needed = (needed + STACK_BYTES - 1) / STACK_BYTES * STACK_BYTES; --- 4173,4176 ---- *************** *** 4157,4161 **** #endif ! #ifdef STACK_ARGS_ADJUST /* If stack needs padding below the args, increase all arg offsets so the args are stored above the padding. */ --- 4212,4216 ---- #endif ! #if 0 /* If stack needs padding below the args, increase all arg offsets so the args are stored above the padding. */ *************** *** 4327,4332 **** else if (structure_value_addr) { ! if (target == 0) ! target = gen_rtx (MEM, BLKmode, memory_address (BLKmode, structure_value_addr)); } --- 4382,4387 ---- else if (structure_value_addr) { ! if (target == 0 || GET_CODE (target) != MEM) ! target = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)), memory_address (BLKmode, structure_value_addr)); } *************** *** 4333,4343 **** else if (pcc_struct_value) { ! if (target != 0) ! { ! valreg = hard_function_value (build_pointer_type (TREE_TYPE (exp)), ! fndecl); ! target = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)), ! copy_to_reg (valreg)); ! } else if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode) emit_move_insn (target, gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)), --- 4388,4396 ---- else if (pcc_struct_value) { ! valreg = hard_function_value (build_pointer_type (TREE_TYPE (exp)), ! fndecl); ! if (target == 0) ! target = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)), ! copy_to_reg (valreg)); else if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode) emit_move_insn (target, gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)), *************** *** 4502,4506 **** /* Compute how much space the argument should get: round up to a multiple of the alignment for arguments. */ ! if (none != FUNCTION_ARG_PADDING (TYPE_MODE (TREE_TYPE (pval)), (rtx)0)) used = (((size + PARM_BOUNDARY / BITS_PER_UNIT - 1) / (PARM_BOUNDARY / BITS_PER_UNIT)) --- 4555,4559 ---- /* Compute how much space the argument should get: round up to a multiple of the alignment for arguments. */ ! if (none != FUNCTION_ARG_PADDING (TYPE_MODE (TREE_TYPE (pval)), const0_rtx)) used = (((size + PARM_BOUNDARY / BITS_PER_UNIT - 1) / (PARM_BOUNDARY / BITS_PER_UNIT)) *************** *** 4778,4788 **** do_pending_stack_adjust (); { ! rtx zero; ! if (GET_MODE (temp) == SFmode) ! zero = fconst0_rtx; ! else if (GET_MODE (temp) == DFmode) ! zero = dconst0_rtx; ! else ! zero = const0_rtx; if (GET_CODE (temp) == CONST_INT) --- 4831,4835 ---- do_pending_stack_adjust (); { ! rtx zero = CONST0_RTX (GET_MODE (temp)); if (GET_CODE (temp) == CONST_INT) *************** *** 4843,4847 **** if (GET_CODE (XVECEXP (pat, 0, i)) == JUMP_INSN) abort (); ! invert_exp (PATTERN (XVECEXP (pat, 0, XVECLEN (pat, 0) - 1))); } else --- 4890,4895 ---- if (GET_CODE (XVECEXP (pat, 0, i)) == JUMP_INSN) abort (); ! invert_exp (PATTERN (XVECEXP (pat, 0, XVECLEN (pat, 0) - 1)), ! 0, 0); } else *************** *** 4945,4949 **** /* If one operand is 0, make it the second one. */ ! if (op0 == const0_rtx || op0 == fconst0_rtx || op0 == dconst0_rtx) { rtx tem = op0; --- 4993,4998 ---- /* If one operand is 0, make it the second one. */ ! if (op0 == const0_rtx ! || (GET_MODE_CLASS (mode) == MODE_FLOAT && op0 == CONST0_RTX (mode))) { rtx tem = op0; *************** *** 4992,4996 **** /* If one operand is 0, make it the second one. */ ! if (op0 == const0_rtx || op0 == fconst0_rtx || op0 == dconst0_rtx) { rtx tem = op0; --- 5041,5046 ---- /* If one operand is 0, make it the second one. */ ! if (op0 == const0_rtx ! || (GET_MODE_CLASS (mode) == MODE_FLOAT && op0 == CONST0_RTX (mode))) { rtx tem = op0; diff -rc2N gcc-1.34/expr.h gcc-1.35/expr.h *** gcc-1.34/expr.h Wed Feb 22 11:49:33 1989 --- gcc-1.35/expr.h Wed Mar 29 16:56:02 1989 *************** *** 109,112 **** --- 109,120 ---- #endif #endif + + /* Nonzero if type TYPE should be returned in memory + (even though its mode is not BLKmode). + Most machines can use the following default definition. */ + + #ifndef RETURN_IN_MEMORY + #define RETURN_IN_MEMORY(type) 0 + #endif \f /* Optabs are tables saying how to generate insn bodies diff -rc2N gcc-1.34/final.c gcc-1.35/final.c *** gcc-1.34/final.c Wed Feb 22 11:49:30 1989 --- gcc-1.35/final.c Wed Mar 29 17:36:09 1989 *************** *** 105,112 **** static int insn_noperands; - /* Indexed by hard register, the name of the register for assembler code. */ - - static char *reg_name[] = REGISTER_NAMES; - /* File in which assembler code is being written. */ --- 105,108 ---- *************** *** 1052,1055 **** --- 1048,1052 ---- #endif PUT_CODE (x, MEM); + MEM_VOLATILE_P (x) = MEM_VOLATILE_P (y); XEXP (x, 0) = plus_constant (XEXP (y, 0), offset); } *************** *** 1320,1325 **** c = atoi (p); ! if (this_is_asm_operands ! && c >= (unsigned) insn_noperands && *p >= '0' && *p <= '9') output_operand_lossage ("operand number out of range"); else if (letter == 'l') --- 1317,1323 ---- c = atoi (p); ! if (! (*p >= '0' && *p <= '9')) ! output_operand_lossage ("operand number missing after %-letter"); ! else if (this_is_asm_operands && c >= (unsigned) insn_noperands) output_operand_lossage ("operand number out of range"); else if (letter == 'l') *************** *** 1344,1352 **** } } - else if (*p >= '0' && *p <= '9') - output_operand (operands[c], letter); else ! /* No operand-number follows the letter. */ ! output_operand (0, letter); while ((c = *p) >= '0' && c <= '9') p++; --- 1342,1347 ---- } } else ! output_operand (operands[c], letter); while ((c = *p) >= '0' && c <= '9') p++; diff -rc2N gcc-1.34/fixincludes gcc-1.35/fixincludes *** gcc-1.34/fixincludes Sat Jan 14 16:03:23 1989 --- gcc-1.35/fixincludes Sun Apr 23 18:38:25 1989 *************** *** 9,15 **** LIB=/usr/local/lib/gcc-include echo 'Making directories:' cd /usr/include ! files=`find . -type d -print` for file in $files; do mkdir $LIB/$file > /dev/null 2>&1 --- 9,28 ---- LIB=/usr/local/lib/gcc-include + # Determine whether this system has symbolic links. + if ln -s X $LIB/ShouldNotExist 2>/dev/null; then + rm -f $LIB/ShouldNotExist + LINKS=true + else + LINKS=false + fi + echo 'Making directories:' cd /usr/include ! mkdir $LIB > /dev/null 2>&1 ! if $LINKS; then ! files=`ls -LR | sed -n s/:$//p` ! else ! files=`find . -type d -print` ! fi for file in $files; do mkdir $LIB/$file > /dev/null 2>&1 *************** *** 16,46 **** done ! echo 'Finding header files:' ! cd /usr/include ! files=`find . -type f -print` ! echo 'Checking header files:' ! for file in $files; do ! if egrep -s '[ ]_IO[A-Z]*\(|#define._IO|CTRL' $file; then ! echo Fixing $file ! if [ -r $file ]; then ! cp $file ${LIB}/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w ${LIB}/$file ! ex ${LIB}/$file <<EOF ! g/[ ]_IO[A-Z]*(/s/(\(.\),/('\1',/ ! g/#define._IO/s/'x'/x/g ! g/[^A-Z]CTRL[ ]*(/s/\(.\))/'\1')/ ! g/#define.CTRL/s/'c'/c/g ! wq EOF ! if cmp $file ${LIB}/$file >/dev/null 2>&1; then ! echo Deleting ${LIB}/$file\; no fixes were needed. ! rm ${LIB}/$file fi fi ! fi done - # Fix one other error in this file: a mismatched quote not inside a C comment. file=sundev/vuid_event.h --- 29,86 ---- done ! # treetops gets an alternating list ! # of old directories to copy ! # and the new directories to copy to. ! treetops="/usr/include ${LIB}" ! ! if $LINKS; then ! echo 'Making internal symbolic directory links' ! for file in $files; do ! dest=`ls -ld $file | sed -n 's/.*-> //p'` ! if [ "$dest" ]; then ! if expr $dest : '[^/].*' > /dev/null; then ! rmdir ${LIB}/$file > /dev/null 2>&1 ! rm -f ${LIB}/$file > /dev/null 2>&1 ! ln -s $dest ${LIB}/$file > /dev/null 2>&1 ! else # dont make links outside /usr/include ! treetops="$treetops $dest ${LIB}/$file" ! fi ! fi ! done ! fi ! ! set - $treetops ! while [ $# != 0 ]; do ! # $1 is an old directory to copy, and $2 is the new directory to copy to. ! echo 'Finding header files in $1:' ! cd $1 ! files=`find . -type f -print` ! echo 'Checking header files:' ! for file in $files; do ! if egrep -s '[ ]_IO[A-Z]*\(|#define._IO|CTRL' $file; then ! echo Fixing $file ! if [ -r $file ]; then ! cp $file $2/$file >/dev/null 2>&1 \ ! || echo "Can't copy $file" ! chmod +w $2/$file ! ex $2/$file <<EOF ! g/[ ]_IO[A-Z]*(/s/(\(.\),/('\1',/ ! g/[ ]_IO[A-Z]*(.*\\$/.,+1s/(\(.\),/('\1',/ ! g/#define._IO/s/'x'/x/g ! g/#define._IO.*\\$/.,+1s/'x'/x/g ! g/[^A-Z]CTRL[ ]*(/s/\(.\))/'\1')/ ! g/#define.CTRL/s/'c'/c/g ! wq EOF ! if cmp $file $2/$file >/dev/null 2>&1; then ! echo Deleting $2/$file\; no fixes were needed. ! rm $2/$file ! fi fi fi ! done ! shift; shift done # Fix one other error in this file: a mismatched quote not inside a C comment. file=sundev/vuid_event.h *************** *** 60,61 **** --- 100,109 ---- EOF fi + + echo 'Removing unneeded directories:' + cd $LIB + files=`find . -type d -print | sort -r` + for file in $files; do + rmdir $LIB/$file > /dev/null 2>&1 + done + diff -rc2N gcc-1.34/flags.h gcc-1.35/flags.h *** gcc-1.34/flags.h Wed Feb 22 11:49:29 1989 --- gcc-1.35/flags.h Wed Mar 29 18:58:37 1989 *************** *** 59,62 **** --- 59,76 ---- extern int warn_unused; + /* Nonzero means warn about all declarations which shadow others. */ + + extern int warn_shadow; + + /* Warn if a switch on an enum fails to have a case for every enum value. */ + + extern int warn_switch; + + /* Nonzero means warn about any identifiers that match in the first N + characters. The value N is in `id_clash_len'. */ + + extern int warn_id_clash; + extern int id_clash_len; + /* Nonzero if generating code to do profiling. */ diff -rc2N gcc-1.34/flow.c gcc-1.35/flow.c *** gcc-1.34/flow.c Wed Feb 22 11:49:25 1989 --- gcc-1.35/flow.c Tue Apr 25 16:53:31 1989 *************** *** 769,772 **** --- 769,775 ---- } } + #ifdef USE_C_ALLOCA + alloca (0); + #endif } first_pass = 0; *************** *** 800,803 **** --- 803,809 ---- propagate_block (basic_block_live_at_end[i], basic_block_head[i], basic_block_end[i], 1, 0, i); + #ifdef USE_C_ALLOCA + alloca (0); + #endif } } *************** *** 1317,1320 **** --- 1323,1327 ---- register int regno; register rtx reg = SET_DEST (x); + int subreg_p = 0; if (reg == 0) *************** *** 1321,1332 **** return; ! if (GET_CODE (reg) == SUBREG) ! { ! /* Modifying just one hardware register ! of a multi-register value does not count as "setting" ! for live-dead analysis. Parts of the previous value ! might still be significant below this insn. */ if (REG_SIZE (SUBREG_REG (reg)) > REG_SIZE (reg)) ! return; reg = SUBREG_REG (reg); --- 1328,1344 ---- return; ! if (GET_CODE (reg) == STRICT_LOW_PART) ! reg = XEXP (reg, 0); ! ! if (GET_CODE (reg) == SUBREG || GET_CODE (reg) == ZERO_EXTRACT ! || GET_CODE (reg) == SIGN_EXTRACT) ! { ! /* Modifying just one hardware register of a multi-reg value ! or just a byte field of a register ! does not mean the value from before this insn is now dead. ! But it does mean liveness of that register at the end of the block ! is significant. */ if (REG_SIZE (SUBREG_REG (reg)) > REG_SIZE (reg)) ! subreg_p = 1; reg = SUBREG_REG (reg); *************** *** 1343,1351 **** int is_needed = 0; - /* Mark the reg being set as dead before this insn. */ - dead[offset] |= bit; /* Mark it as a significant register for this basic block. */ if (significant) significant[offset] |= bit; /* A hard reg in a wide mode may really be multiple registers. If so, mark all of them just like the first. */ --- 1355,1367 ---- int is_needed = 0; /* Mark it as a significant register for this basic block. */ if (significant) significant[offset] |= bit; + /* That's all we do, if we are setting only part of the register. */ + if (subreg_p) + return; + + /* If entire register being set, mark it as as dead before this insn. */ + dead[offset] |= bit; /* A hard reg in a wide mode may really be multiple registers. If so, mark all of them just like the first. */ diff -rc2N gcc-1.34/fold-const.c gcc-1.35/fold-const.c *** gcc-1.34/fold-const.c Thu Feb 23 13:08:59 1989 --- gcc-1.35/fold-const.c Sat Mar 11 17:44:20 1989 *************** *** 1397,1416 **** case TRUTH_NOT_EXPR: ! if (wins) ! { ! if (TREE_CODE (arg0) == INTEGER_CST) ! { ! t = build_int_2 ((TREE_INT_CST_LOW (arg0) == 0 ! && TREE_INT_CST_HIGH (arg0) == 0), ! 0); ! TREE_TYPE (t) = integer_type_node; ! } ! #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) ! if (TREE_CODE (arg0) == REAL_CST) ! { ! t = build_int_2 (real_zerop (arg0), 0); ! TREE_TYPE (t) = integer_type_node; ! } ! #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ } return t; --- 1397,1410 ---- case TRUTH_NOT_EXPR: ! /* Note that the operand of this must be an int ! and its values must be 0 or 1. ! ("true" is a fixed value perhaps depending on the language, ! but we don't handle values other than 1 correctly yet.) */ ! if (TREE_CODE (arg0) == INTEGER_CST) ! { ! t = build_int_2 ((TREE_INT_CST_LOW (arg0) == 0 ! && TREE_INT_CST_HIGH (arg0) == 0), ! 0); ! TREE_TYPE (t) = integer_type_node; } return t; *************** *** 1417,1489 **** case TRUTH_ANDIF_EXPR: ! /* If first arg is constant zero, we know the answer. */ if (TREE_CODE (arg0) == INTEGER_CST && integer_zerop (arg0)) ! { ! t = build_int_2 (0, 0); ! TREE_TYPE (t) = type; ! return t; ! } ! #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) ! if (TREE_CODE (arg0) == REAL_CST && real_zerop (arg0)) ! { ! t = build_int_2 (0, 0); ! TREE_TYPE (t) = type; ! return t; ! } ! #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ case TRUTH_AND_EXPR: ! if (wins) ! { ! if (TREE_CODE (arg0) == INTEGER_CST ! && TREE_CODE (arg1) == INTEGER_CST) ! { ! t = build_int_2 (! integer_zerop (arg0) && ! integer_zerop (arg1), ! 0); ! TREE_TYPE (t) = type; ! } ! #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) ! if (TREE_CODE (arg0) == REAL_CST && TREE_CODE (arg1) == REAL_CST) ! { ! t = build_int_2 (! real_zerop (arg0) && ! real_zerop (arg1), 0); ! TREE_TYPE (t) = type; ! } ! #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ ! } return t; case TRUTH_ORIF_EXPR: ! /* If first arg is nonzero constant, we know the answer. */ if (TREE_CODE (arg0) == INTEGER_CST && ! integer_zerop (arg0)) ! { ! t = build_int_2 (1, 0); ! TREE_TYPE (t) = type; ! return t; ! } ! #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) ! if (TREE_CODE (arg0) == REAL_CST && ! real_zerop (arg0)) ! { ! t = build_int_2 (1, 0); ! TREE_TYPE (t) = type; ! return t; ! } ! #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ case TRUTH_OR_EXPR: ! if (wins) ! { ! if (TREE_CODE (arg0) == INTEGER_CST ! && TREE_CODE (arg1) == INTEGER_CST) ! { ! t = build_int_2 (! integer_zerop (arg0) || ! integer_zerop (arg1), ! 0); ! TREE_TYPE (t) = type; ! } ! #if !defined (REAL_IS_NOT_DOUBLE) || defined (REAL_ARITHMETIC) ! if (TREE_CODE (arg0) == REAL_CST && TREE_CODE (arg1) == REAL_CST) ! { ! t = build_int_2 (! real_zerop (arg0) || ! real_zerop (arg1), 0); ! TREE_TYPE (t) = type; ! } ! #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ ! } return t; --- 1411,1447 ---- case TRUTH_ANDIF_EXPR: ! /* Note that the operands of this must be ints ! and their values must be 0 or 1. ! ("true" is a fixed value perhaps depending on the language.) */ ! /* If first arg is constant zero, return it. */ if (TREE_CODE (arg0) == INTEGER_CST && integer_zerop (arg0)) ! return arg0; case TRUTH_AND_EXPR: ! /* If either arg is constant true, drop it. */ ! if (TREE_CODE (arg0) == INTEGER_CST && ! integer_zerop (arg0)) ! return arg1; ! if (TREE_CODE (arg1) == INTEGER_CST && ! integer_zerop (arg1)) ! return arg0; ! /* Both known to be zero => return zero. */ ! if (TREE_CODE (arg0) == INTEGER_CST && TREE_CODE (arg1) == INTEGER_CST) ! return arg0; return t; case TRUTH_ORIF_EXPR: ! /* Note that the operands of this must be ints ! and their values must be 0 or true. ! ("true" is a fixed value perhaps depending on the language.) */ ! /* If first arg is constant true, return it. */ if (TREE_CODE (arg0) == INTEGER_CST && ! integer_zerop (arg0)) ! return arg0; case TRUTH_OR_EXPR: ! /* If either arg is constant zero, drop it. */ ! if (TREE_CODE (arg0) == INTEGER_CST && integer_zerop (arg0)) ! return arg1; ! if (TREE_CODE (arg1) == INTEGER_CST && integer_zerop (arg1)) ! return arg0; ! /* Both known to be true => return true. */ ! if (TREE_CODE (arg0) == INTEGER_CST && TREE_CODE (arg1) == INTEGER_CST) ! return arg0; return t; diff -rc2N gcc-1.34/gcc.c gcc-1.35/gcc.c *** gcc-1.34/gcc.c Wed Feb 22 11:51:20 1989 --- gcc-1.35/gcc.c Fri Apr 21 23:50:14 1989 *************** *** 100,103 **** --- 100,106 ---- They are processed as usual, as described above. + The character | is used to indicate that a command should be piped to + the following command, but only if -pipe is specified. + Note that it is built into CC which switches take arguments and which do not. You might think it would be useful to generalize this to *************** *** 109,113 **** CC also knows implicitly that arguments starting in `-l' are to ! be treated as output files, and passed to the linker in their proper position among the other output files. --- 112,116 ---- CC also knows implicitly that arguments starting in `-l' are to ! be treated as compiler output files, and passed to the linker in their proper position among the other output files. *************** *** 114,118 **** */ ! /* This defines which switches take arguments. */ #define SWITCH_TAKES_ARG(CHAR) \ --- 117,121 ---- */ ! /* This defines which switch letters take arguments. */ #define SWITCH_TAKES_ARG(CHAR) \ *************** *** 122,125 **** --- 125,132 ---- || (CHAR) == 'L') + /* This defines which multi-letter switches take arguments. */ + + #define WORD_SWITCH_TAKES_ARG(STR) (!strcmp (STR, "Tdata")) + #include <stdio.h> #include <sys/types.h> *************** *** 126,129 **** --- 133,138 ---- #include <signal.h> #include <sys/file.h> + #include <varargs.h> + #include "config.h" #include "obstack.h" *************** *** 157,160 **** --- 166,171 ---- char *find_file (); static char *find_exec_file (); + void validate_switches (); + void validate_all_switches (); /* config.h can define ASM_SPEC to provide extra args to the assembler *************** *** 215,222 **** { {".c", ! "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{T} \ ! -undef -D__GNUC__ %{ansi:-T -$ -D__STRICT_ANSI__} %{!ansi:%p} %P\ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ ! %{Wcomment} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ %{!M*:%{!E:cc1 %{!pipe:%g.cpp} %1 \ --- 226,233 ---- { {".c", ! "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{trigraphs} -undef \ ! -D__GNUC__ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!ansi:%p} %P\ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ ! %{Wcomment*} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ %{!M*:%{!E:cc1 %{!pipe:%g.cpp} %1 \ *************** *** 227,237 **** %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ ! %{!pipe:%g.s}\ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\n }}}"}, {".cc", ! "cpp -+ %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{T}\ -undef -D__GNUC__ %p %P\ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ ! %{Wcomment} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ %{!M*:%{!E:cc1plus %{!pipe:%g.cpp} %1\ --- 238,248 ---- %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\ ! %{!pipe:%g.s}\n }}}"}, {".cc", ! "cpp -+ %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} \ -undef -D__GNUC__ %p %P\ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ ! %{Wcomment*} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ %{!M*:%{!E:cc1plus %{!pipe:%g.cpp} %1\ *************** *** 242,247 **** %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ ! %{!pipe:%g.s}\ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\n }}}"}, {".i", "cc1 %i %1 %{!Q:-quiet} %{Y*} %{d*} %{m*} %{f*} %{a}\ --- 253,258 ---- %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\ ! %{!pipe:%g.s}\n }}}"}, {".i", "cc1 %i %1 %{!Q:-quiet} %{Y*} %{d*} %{m*} %{f*} %{a}\ *************** *** 250,265 **** %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ ! %{!pipe:%g.s} %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\n }"}, {".s", "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \ ! %i %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\n }"}, {".S", ! "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{T} \ -undef -D__GNUC__ -$ %p %P\ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ ! %{Wcomment} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ ! %{!M*:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{!pipe:%g.s} \ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\n }}}"}, /* Mark end of table */ {0, 0} --- 261,277 ---- %{S:%{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %{!pipe:%g.s}\n }"}, {".s", "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i\n }"}, {".S", ! "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{trigraphs} \ -undef -D__GNUC__ -$ %p %P\ %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic}\ ! %{Wcomment*} %{Wtrigraphs} %{Wall} %C\ %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%{o*}}%{M*:%{o*}} |\n\ ! %{!M*:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a \ ! %{c:%{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\ ! %{!pipe:%g.s}\n }}}"}, /* Mark end of table */ {0, 0} *************** *** 294,333 **** char *name; struct temp_file *next; - int success_only; /* Nonzero means delete this file - only if compilation succeeds fully. */ - int fail_only; /* Nonzero means delete this file - only if compilation fails. */ }; ! struct temp_file *temp_file_queue; /* Record FILENAME as a file to be deleted automatically. ! SUCCESS_ONLY nonzero means delete it only if all compilation succeeds; otherwise delete it in any case. ! FAIL_ONLY nonzero means delete it only if a compilation step fails; otherwise delete it in any case. */ void ! record_temp_file (filename, success_only, fail_only) char *filename; ! int success_only; ! int fail_only; { - register struct temp_file *temp; register char *name; - temp = (struct temp_file *) xmalloc (sizeof (struct temp_file)); name = (char *) xmalloc (strlen (filename) + 1); strcpy (name, filename); ! temp->next = temp_file_queue; ! temp->name = name; ! temp->success_only = success_only; ! temp->fail_only = fail_only; ! temp_file_queue = temp; } /* Delete all the temporary files whose names we previously recorded. ! SUCCESS nonzero means "delete on success only" files should be deleted. ! When we use -pipe option, delete all tempoarry ! without checking of success flag. */ void --- 306,353 ---- char *name; struct temp_file *next; }; ! /* Queue of files to delete on success or failure of compilation. */ ! struct temp_file *always_delete_queue; ! /* Queue of files to delete on failure of compilation. */ ! struct temp_file *failure_delete_queue; /* Record FILENAME as a file to be deleted automatically. ! ALWAYS_DELETE nonzero means delete it if all compilation succeeds; otherwise delete it in any case. ! FAIL_DELETE nonzero means delete it if a compilation step fails; otherwise delete it in any case. */ void ! record_temp_file (filename, always_delete, fail_delete) char *filename; ! int always_delete; ! int fail_delete; { register char *name; name = (char *) xmalloc (strlen (filename) + 1); strcpy (name, filename); ! ! if (always_delete) ! { ! register struct temp_file *temp; ! temp = (struct temp_file *) xmalloc (sizeof (struct temp_file)); ! temp->next = always_delete_queue; ! temp->name = name; ! always_delete_queue = temp; ! } ! ! if (fail_delete) ! { ! register struct temp_file *temp; ! temp = (struct temp_file *) xmalloc (sizeof (struct temp_file)); ! temp->next = failure_delete_queue; ! temp->name = name; ! failure_delete_queue = temp; ! } } /* Delete all the temporary files whose names we previously recorded. ! SUCCESS zero means "delete on failure only" files should be deleted. */ void *************** *** 336,341 **** { register struct temp_file *temp; ! for (temp = temp_file_queue; temp; temp = temp->next) ! if (success ? !temp->fail_only : !temp->success_only) { #ifdef DEBUG --- 356,376 ---- { register struct temp_file *temp; ! ! for (temp = always_delete_queue; temp; temp = temp->next) ! { ! #ifdef DEBUG ! int i; ! printf ("Delete %s? (y or n) ", temp->name); ! fflush (stdout); ! i = getchar (); ! if (i != '\n') ! while (getchar () != '\n') ; ! if (i == 'y' || i == 'Y') ! #endif /* DEBUG */ ! unlink (temp->name); ! } ! ! if (! success) ! for (temp = failure_delete_queue; temp; temp = temp->next) { #ifdef DEBUG *************** *** 350,354 **** unlink (temp->name); } ! temp_file_queue = 0; } --- 385,397 ---- unlink (temp->name); } ! ! always_delete_queue = 0; ! failure_delete_queue = 0; ! } ! ! void ! clear_failure_queue () ! { ! failure_delete_queue = 0; } *************** *** 384,387 **** --- 427,434 ---- unsigned char vflag; + /* Name with which this program was invoked. */ + + char *programname; + /* User-specified -B prefix to attach to command names, or 0 if none specified. */ *************** *** 404,412 **** #ifndef STANDARD_STARTFILE_PREFIX ! #define STANDARD_STARTFILE_PREFIX "/lib/" #endif /* !defined STANDARD_STARTFILE_PREFIX */ char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; ! char *standard_startfile_prefix_1 = "/usr/lib/"; /* Clear out the vector of arguments (after a command is executed). */ --- 451,460 ---- #ifndef STANDARD_STARTFILE_PREFIX ! #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/" #endif /* !defined STANDARD_STARTFILE_PREFIX */ char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX; ! char *standard_startfile_prefix_1 = "/lib/"; ! char *standard_startfile_prefix_2 = "/usr/lib/"; /* Clear out the vector of arguments (after a command is executed). */ *************** *** 420,434 **** /* Add one argument to the vector at the end. This is done when a space is seen or at the end of the line. ! If TEMPNAMEP is nonzero, this arg is a file that should be deleted ! at the end of compilation. ! If TEMPNAMEP is 2, delete the file ! only if compilation is fully successful. ! If TEMPNAMEP is 3, delete the file ! only if a compilation step fails. */ void ! store_arg (arg, tempnamep) char *arg; ! int tempnamep; { if (argbuf_index + 1 == argbuf_length) --- 468,480 ---- /* Add one argument to the vector at the end. This is done when a space is seen or at the end of the line. ! If DELETE_ALWAYS is nonzero, the arg is a filename ! and the file should be deleted eventually. ! If DELETE_FAILURE is nonzero, the arg is a filename ! and the file should be deleted if this compilation fails. */ void ! store_arg (arg, delete_always, delete_failure) char *arg; ! int delete_always, delete_failure; { if (argbuf_index + 1 == argbuf_length) *************** *** 440,445 **** argbuf[argbuf_index] = 0; ! if (tempnamep) ! record_temp_file (arg, tempnamep == 2, tempnamep == 3); } \f --- 486,491 ---- argbuf[argbuf_index] = 0; ! if (delete_always || delete_failure) ! record_temp_file (arg, delete_always, delete_failure); } \f *************** *** 578,581 **** --- 624,628 ---- /* Exec the program. */ (*func) (program, argv); + perror_exec (program); exit (-1); /* NOTREACHED */ *************** *** 731,735 **** The elements of the vector a strings, one per switch given. If a switch uses the following argument, then the `part1' field ! is the switch itself and the `part2' field is the following argument. */ struct switchstr --- 778,784 ---- The elements of the vector a strings, one per switch given. If a switch uses the following argument, then the `part1' field ! is the switch itself and the `part2' field is the following argument. ! The `valid' field is nonzero if any spec has looked at this switch; ! if it remains zero at the end of the run, it must be meaningless. */ struct switchstr *************** *** 737,740 **** --- 786,790 ---- char *part1; char *part2; + int valid; }; *************** *** 753,777 **** char **outfiles; - char * - make_switch (p1, s1, p2, s2) - char *p1; - int s1; - char *p2; - int s2; - { - register char *new; - if (p2 && s2 == 0) - s2 = strlen (p2); - new = (char *) xmalloc (s1 + s2 + 2); - bcopy (p1, new, s1); - if (p2) - { - new[s1++] = ' '; - bcopy (p2, new + s1, s2); - } - new[s1 + s2] = 0; - return new; - } - /* Create the vector `switches' and its contents. Store its length in `n_switches'. */ --- 803,806 ---- *************** *** 816,819 **** --- 845,850 ---- if (SWITCH_TAKES_ARG (c) && p[1] == 0) i++; + else if (WORD_SWITCH_TAKES_ARG (p)) + i++; } } *************** *** 844,851 **** continue; switches[n_switches].part1 = p; ! if (SWITCH_TAKES_ARG (c) && p[1] == 0) switches[n_switches].part2 = argv[++i]; else switches[n_switches].part2 = 0; n_switches++; } --- 875,884 ---- continue; switches[n_switches].part1 = p; ! if ((SWITCH_TAKES_ARG (c) && p[1] == 0) ! || WORD_SWITCH_TAKES_ARG (p)) switches[n_switches].part2 = argv[++i]; else switches[n_switches].part2 = 0; + switches[n_switches].valid = 0; n_switches++; } *************** *** 958,965 **** if (this_is_library_file) string = find_file (string); ! if (this_is_output_file) ! store_arg (string, 3); ! else ! store_arg (string, delete_this_arg); if (this_is_output_file) outfiles[input_file_number] = string; --- 991,995 ---- if (this_is_library_file) string = find_file (string); ! store_arg (string, delete_this_arg, this_is_output_file); if (this_is_output_file) outfiles[input_file_number] = string; *************** *** 978,982 **** Otherwise, execute now and don't pass the `|' as an arg. */ if (i < n_switches) ! break; else argbuf_index--; --- 1008,1015 ---- Otherwise, execute now and don't pass the `|' as an arg. */ if (i < n_switches) ! { ! switches[i].valid = 1; ! break; ! } else argbuf_index--; *************** *** 1005,1012 **** if (this_is_library_file) string = find_file (string); ! if (this_is_output_file) ! store_arg (string, 3); ! else ! store_arg (string, delete_this_arg); if (this_is_output_file) outfiles[input_file_number] = string; --- 1038,1042 ---- if (this_is_library_file) string = find_file (string); ! store_arg (string, delete_this_arg, this_is_output_file); if (this_is_output_file) outfiles[input_file_number] = string; *************** *** 1027,1034 **** if (this_is_library_file) string = find_file (string); ! if (this_is_output_file) ! store_arg (string, 3); ! else ! store_arg (string, delete_this_arg); if (this_is_output_file) outfiles[input_file_number] = string; --- 1057,1061 ---- if (this_is_library_file) string = find_file (string); ! store_arg (string, delete_this_arg, this_is_output_file); if (this_is_output_file) outfiles[input_file_number] = string; *************** *** 1085,1089 **** register int f; for (f = 0; f < n_infiles; f++) ! store_arg (outfiles[f], 0); } break; --- 1112,1116 ---- register int f; for (f = 0; f < n_infiles; f++) ! store_arg (outfiles[f], 0, 0); } break; *************** *** 1240,1246 **** for (i = 0; i < n_switches; i++) if (!strncmp (switches[i].part1, filter, p - filter)) ! { ! give_switch (i); ! } } else --- 1267,1271 ---- for (i = 0; i < n_switches; i++) if (!strncmp (switches[i].part1, filter, p - filter)) ! give_switch (i); } else *************** *** 1258,1263 **** if (!strncmp (switches[i].part1, filter, p - filter - 1)) { present = 1; - break; } } --- 1283,1288 ---- if (!strncmp (switches[i].part1, filter, p - filter - 1)) { + switches[i].valid = 1; present = 1; } } *************** *** 1271,1274 **** --- 1296,1300 ---- && switches[i].part1[p - filter] == 0) { + switches[i].valid = 1; present = 1; break; *************** *** 1320,1323 **** --- 1346,1350 ---- do_spec_1 (" ", 0); } + switches[switchnum].valid = 1; } \f *************** *** 1341,1344 **** --- 1368,1373 ---- if (env_exec_prefix != 0 && strlen (env_exec_prefix) > size) size = strlen (env_exec_prefix); + if (strlen (standard_exec_prefix) > size) + size = strlen (standard_exec_prefix); if (strlen (standard_exec_prefix_1) > size) size = strlen (standard_exec_prefix_1); *************** *** 1347,1350 **** --- 1376,1381 ---- if (strlen (standard_startfile_prefix_1) > size) size = strlen (standard_startfile_prefix_1); + if (strlen (standard_startfile_prefix_2) > size) + size = strlen (standard_startfile_prefix_2); size += strlen (name) + 1; *************** *** 1395,1398 **** --- 1426,1436 ---- if (!win) { + strcpy (temp, standard_startfile_prefix_2); + strcat (temp, name); + win = (access (temp, R_OK) == 0); + } + + if (!win) + { strcpy (temp, "./"); strcat (temp, name); *************** *** 1405,1412 **** } \f - /* Name with which this program was invoked. */ - - char *programname; - /* On fatal signals, delete all the temporary files. */ --- 1443,1446 ---- *************** *** 1521,1524 **** --- 1555,1562 ---- input_filename); } + + /* Failure of one compilation should not delete the delete-on-failure + files of previous compilations. */ + clear_failure_queue (); } *************** *** 1532,1535 **** --- 1570,1583 ---- } + /* Set the `valid' bits for switches that match anything in any spec. */ + + validate_all_switches (); + + /* Warn about any switches that no pass was interested in. */ + + for (i = 0; i < n_switches; i++) + if (! switches[i].valid) + error ("unrecognized option `-%s'", switches[i].part1); + /* Delete some or all of the temporary files we made. */ *************** *** 1557,1576 **** } - fatal (msg, arg1, arg2) - char *msg, *arg1, *arg2; - { - error (msg, arg1, arg2); - delete_temp_files (0); - exit (1); - } - - error (msg, arg1, arg2) - char *msg, *arg1, *arg2; - { - fprintf (stderr, "%s: ", programname); - fprintf (stderr, msg, arg1, arg2); - fprintf (stderr, "\n"); - } - /* Return a newly-allocated string whose contents concatenate those of s1, s2, s3. */ --- 1605,1608 ---- *************** *** 1610,1614 **** if (errno < sys_nerr) ! s = concat ("", sys_errlist[errno], " for %s"); else s = "cannot open %s"; --- 1642,1646 ---- if (errno < sys_nerr) ! s = concat ("%s: ", sys_errlist[errno], ""); else s = "cannot open %s"; *************** *** 1624,1630 **** if (errno < sys_nerr) ! s = concat ("", sys_errlist[errno], " for %s"); else s = "cannot open %s"; error (s, name); } --- 1656,1796 ---- if (errno < sys_nerr) ! s = concat ("%s: ", sys_errlist[errno], ""); else s = "cannot open %s"; error (s, name); + } + + perror_exec (name) + char *name; + { + extern int errno, sys_nerr; + extern char *sys_errlist[]; + char *s; + + if (errno < sys_nerr) + s = concat ("installation problem, cannot exec %s: ", + sys_errlist[errno], ""); + else + s = "installation problem, cannot exec %s"; + error (s, name); + } + \f + #ifdef HAVE_VPRINTF + + /* Output an error message and exit */ + + int + fatal (va_alist) + va_dcl + { + va_list ap; + char *format; + + va_start(ap); + format = va_arg (ap, char *); + vfprintf (stderr, format, ap); + va_end (ap); + fprintf (stderr, "\n"); + delete_temp_files (0); + exit (1); + } + + error (va_alist) + va_dcl + { + va_list ap; + char *format; + + va_start(ap); + format = va_arg (ap, char *); + fprintf (stderr, "%s: ", programname); + vfprintf (stderr, format, ap); + va_end (ap); + + fprintf (stderr, "\n"); + } + + #else /* not HAVE_VPRINTF */ + + fatal (msg, arg1, arg2) + char *msg, *arg1, *arg2; + { + error (msg, arg1, arg2); + delete_temp_files (0); + exit (1); + } + + error (msg, arg1, arg2) + char *msg, *arg1, *arg2; + { + fprintf (stderr, "%s: ", programname); + fprintf (stderr, msg, arg1, arg2); + fprintf (stderr, "\n"); + } + + #endif /* not HAVE_VPRINTF */ + + \f + void + validate_all_switches () + { + struct compiler *comp; + register char *p; + register char c; + + for (comp = compilers; comp->spec; comp++) + { + p = comp->spec; + while (c = *p++) + if (c == '%' && *p == '{') + /* We have a switch spec. */ + validate_switches (p + 1); + } + + p = link_spec; + while (c = *p++) + if (c == '%' && *p == '{') + /* We have a switch spec. */ + validate_switches (p + 1); + } + + /* Look at the switch-name that comes after START + and mark as valid all supplied switches that match it. */ + + void + validate_switches (start) + char *start; + { + register char *p = start; + char *filter; + register int i; + + if (*p == '|') + ++p; + + if (*p == '!') + ++p; + + filter = p; + while (*p != ':' && *p != '}') p++; + + if (p[-1] == '*') + { + /* Mark all matching switches as valid. */ + --p; + for (i = 0; i < n_switches; i++) + if (!strncmp (switches[i].part1, filter, p - filter)) + switches[i].valid = 1; + } + else + { + /* Mark an exact matching switch as valid. */ + for (i = 0; i < n_switches; i++) + { + if (!strncmp (switches[i].part1, filter, p - filter) + && switches[i].part1[p - filter] == 0) + switches[i].valid = 1; + } + } } diff -rc2N gcc-1.34/gcc.hlp gcc-1.35/gcc.hlp *** gcc-1.34/gcc.hlp Wed Dec 31 19:00:00 1969 --- gcc-1.35/gcc.hlp Sat Mar 11 17:10:05 1989 *************** *** 0 **** --- 1,153 ---- + 1 GCC + The GCC command invokes the GNU C compiler. + + GCC file-spec + + 2 Parameters + + file-spec + + A C source file. If no input file extension is specified, GNU C + assumes .C as the default extension. + + 2 Qualifiers + + GNU C command qualifiers modify the way the compiler handles the + compiliation. + + The following is the list of available qualifiers for GNU C: + + + /CC1_OPTIONS=(option [,option...]]) + + /DEBUG + + /DEFINE=(identifier[=definition][,...]) + + /INCLUDE_DIRECTORY=(path [,path...]]) + + /MACHINE_CODE + + /OPTIMIZE + + /UNDEFINE=(identifier[,identifier,...]) + + /VERBOSE + + + 2 Linking + + When linking programs compiled with GNU C, you should include the GNU + C library before the VAX C library. For example, + + LINK object-file,GNU_CC:[000000]GCCLIB/LIB,SYS$LIBRARY:VAXCRTL/LIB + + You can also link your program with the shared VAX C library. This + can reduce the size of the .EXE file, as well as make it smaller + when it's running. For example, + + $ LINK object-file, GNU_CC:[000000]GCCLIB/LIB,SYS$INPUT:/OPTIONS + SYS$SHARE:VAXCRTL/SHARE + + (If you use the second example and type it in by hand, be sure to type + ^Z after the last carriage return) + + 2 /DEBUG + + /DEBUG includes additional information in the object file output so + that the program can be debugged with the VAX Symbolic Debugger. + This qualifier includes very little information, so using the + debugger is somewhat difficult. + + 2 /DEFINE=(identifier[=definition][,...]) + + /DEFINE defines a string or macro ('definition') to be substituted + for every occurrence of a given string ('identifier') in a program. + It is equivalent to the #define preprocessor directive. + + All definitions and identifiers are converted to uppercase unless they + are in quotation marks. + + The simple form of the /DEFINE qualifier, + + /DEFINE=vms + + results in a definition equivalent to the preprocessor directive + + #define VMS 1 + + You must enclose macro definitions in quotation marks, as in this + example: + + /DEFINE="C(x)=((x) & 0xff)" + + This definition is the same as the preprocessor definition + + #define C(x) ((x) & 0xff) + + If more than one /DEFINE is present on the GCC command line, only + the last /DEFINE is used. + + If both /DEFINE and /UNDEFINE are present on a command line, /DEFINE + is evaluated before /UNDEFINE + + 2 /INCLUDE_DIRECTORY=(path [,path...]) + + The /INCLUDE_DIRECTORY qualifier provides additional directories to + search for user-defined include files. 'path' can be either a + logical name or a directory specification. + + There are two forms for specifying include files - #include "file-spec" + and #include <file-spec>. For the #include "file-spec" form, the search + order is: + + 1. The directory containing the source file. + + 2. The directories in the /INCLUDE qualifier (if any). + + 3. The directory (or directories) specified in the logical name + GNU_CC_INCLUDE. + + 4. The directory (or directories) specified in the logical name + SYS$LIBRARY. + + For the #include <file-spec> form, the search order is: + + 1. The directories specified in the /INCLUDE qualifier (if any). + + 2. The directory (or directories) specified in the logical name + GNU_CC_INCLUDE. + + 3. The directory (or directories) specified in the logical name + SYS$LIBRARY. + + 2 /MACHINE_CODE + + Tells GNU C to output the machine code generated by the compiler. Note + that no object file is produced when /MACHINE_CODE is specified. The + machine code is output to a file with the same name as the input file, + with the extension .S. + + 2 /OPTIMIZE + /NOOPTIMIZE + + Controls whether optimization is performed by the compiler. By default, + optimization is on. /NOOPTIMIZE turns optimization off. + + 2 /UNDEFINE + + /UNDEFINE cancels a macro definition. Thus, it is the same as the + #undef preprocessor directive. + + If more than one /UNDEFINE is present on the GCC command line, only + the last /UNDEFINE is used. + + If both /DEFINE and /UNDEFINE are present on a command line, /DEFINE + is evaluated before /UNDEFINE + + 2 /VERBOSE + + Controls whether the user sees the invocation command strings for the + preprocessor, compiler, and assembler. The compiler also outputs + some statistics on time spent in its various phases. + diff -rc2N gcc-1.34/gcc.texinfo gcc-1.35/gcc.texinfo *** gcc-1.34/gcc.texinfo Thu Mar 2 07:43:11 1989 --- gcc-1.35/gcc.texinfo Mon Apr 24 02:27:30 1989 *************** *** 40,46 **** @center Richard M. Stallman @sp 3 ! @center last updated 23 Feb 1989 @sp 1 ! @center for version 1.34 @page @vskip 0pt plus 1filll --- 40,46 ---- @center Richard M. Stallman @sp 3 ! @center last updated 22 April 1989 @sp 1 ! @center for version 1.35 @page @vskip 0pt plus 1filll *************** *** 459,462 **** --- 459,465 ---- @item Paul Petersen wrote the machine description for the Alliant FX/8. + + @item + Alain Lichnewsky ported GNU CC to the MIPS cpu. @end itemize *************** *** 565,568 **** --- 568,578 ---- undesirable and rarely used ANSI trigraph feature. + The alternate keywords @code{__asm}, @code{__inline} and + @code{__typeof} continue to work despite @samp{-ansi}. You would not + want to use them in an ANSI C program, of course, but it useful to put + them in header files that might be included in compilations done with + @samp{-ansi}. Alternate predefined macros such as @code{__unix} and + @code{__vax} are also available, with or without @samp{-ansi}. + The @samp{-ansi} option does not cause non-ANSI programs to be rejected gratuitously. For that, @samp{-pedantic} is required in *************** *** 572,577 **** option is used. Some header files may notice this macro and refrain from declaring certain functions or defining certain macros that the ! ANSI standard doesn't call for; this is to avoid interfering with ! any programs that might use these names for other things. @item -traditional --- 582,587 ---- option is used. Some header files may notice this macro and refrain from declaring certain functions or defining certain macros that the ! ANSI standard doesn't call for; this is to avoid interfering with any ! programs that might use these names for other things. @item -traditional *************** *** 787,793 **** --- 797,821 ---- and whenever a function is declared static but never defined. + @item -Wshadow + Warn whenever a local variable shadows another local variable. + + @item -Wid-clash-@var{len} + Warn whenever two distinct identifiers match in the first @var{len} + characters. This may help you prepare a program that will compile + with certain obsolete, brain-damaged compilers. + + @item -Wswitch + Warn whenever a @code{switch} statement has an index of enumeral type + and lacks a @code{case} for one or more of the named codes of that + enumeration. (The presence of a @code{default} label prevents this + warning.) @code{case} labels outside the enumeration range also + provoke warnings when this option is used. + @item -Wcomment Warn whenever a comment-start sequence @samp{/*} appears in a comment. + @item -Wtrigraphs + Warn if any trigraphs are encountered (assuming they are enabled). + @item -Wall All of the above @samp{-W} options combined. *************** *** 942,954 **** This has both advantages and disadvantages; I don't recall what they are. - - @item -meager - Do eager conditional branch scheduling to fill no-op slots. This - optimization is new, so we suspect it has bugs; some day it will be - done by default, but it is optional now so you can test it when you - are ready. - - @emph{Test it now}, and report the bugs; otherwise we won't find them, - and this option may become the default with bugs still in it! @end table --- 970,973 ---- *************** *** 1002,1006 **** @item -fno-asm Do not recognize @code{asm}, @code{inline} or @code{typeof} as a ! keyword. These words may then be used as identifiers. @item -fno-defer-pop --- 1021,1026 ---- @item -fno-asm Do not recognize @code{asm}, @code{inline} or @code{typeof} as a ! keyword. These words may then be used as identifiers. You can ! use @code{__asm}, @code{__inline} and @code{__typeof} instead. @item -fno-defer-pop *************** *** 1273,1277 **** Undefine macro @var{macro}. ! @item -T Support ANSI C trigraphs. You don't want to know about this brain-damage. The @samp{-ansi} option also has this effect. --- 1293,1297 ---- Undefine macro @var{macro}. ! @item -trigraphs Support ANSI C trigraphs. You don't want to know about this brain-damage. The @samp{-ansi} option also has this effect. *************** *** 1323,1330 **** @item sun3 Sun 3 running system version 2 or 3, with 68881. @item sun3-nfp Sun 3 running system version 2 or 3, without 68881. - @item sun3-fpa - Sun 3 running system version 2 or 3, with 68881 and fpa. @item sun4 Sun 4 running system version 2 or 3. --- 1343,1352 ---- @item sun3 Sun 3 running system version 2 or 3, with 68881. + + Note there we do not provide a configuration file to use an FPA + by default because programs that establish signal handlers for + floating point traps inherently cannot work with the FPA. @item sun3-nfp Sun 3 running system version 2 or 3, without 68881. @item sun4 Sun 4 running system version 2 or 3. *************** *** 1335,1340 **** @item sun3-nfp-os4 Sun 3 running system version 4, without 68881. - @item sun3-fpa-os4 - Sun 3 running system version 4, with 68881 and fpa. @item sun4-os4 Sun 4 running system version 4. --- 1357,1360 ---- *************** *** 1342,1348 **** Sun 386 (``roadrunner''). @item alliant ! Alliant FX/8 computer. Currently, there are bugs in the support for ! floating point. Also note that Alliant's version of dbx does not ! manage to work with the output from GNU CC. @item convex-c1 Convex C1 computer. --- 1362,1372 ---- Sun 386 (``roadrunner''). @item alliant ! Alliant FX/8 computer. Currently, there are bugs in the support ! for floating point. Also note that Alliant's version of dbx does ! not manage to work with the output from GNU CC. ! @item mips ! Some variant of MIPS computer (but not the one from DEC). Note ! that this machine description was written for GNU CC version 1.32 ! and may require some updating to work with the current version. @item convex-c1 Convex C1 computer. *************** *** 1350,1358 **** Convex C2 computer. @item hp9k320 ! HP 9000 series 300 using HPUX assembler. @item hp9k320g HP 9000 series 300 using GNU assembler, linker and debugger. ! This requires the HP-adapt package which is or will soon be ! available along with the linker. @item isi68 ISI 68000 or 68020 system. --- 1374,1385 ---- Convex C2 computer. @item hp9k320 ! HP 9000 series 300 using HPUX assembler. Note there is no ! support in GNU CC for HP's debugger; thus, @samp{-g} is not ! available in this configuration. @item hp9k320g HP 9000 series 300 using GNU assembler, linker and debugger. ! This requires the HP-adapt package, which is available along with ! the GNU linker as part of the ``binutils'' distribution. ! This is on the GNU CC distribution tape. @item isi68 ISI 68000 or 68020 system. *************** *** 1361,1366 **** @item next NeXT system. @item 3b1 ! AT&T 3b1, a.k.a. 7300 PC. @item sequent-ns32k Sequent containing ns32000 processors. --- 1388,1401 ---- @item next NeXT system. + @item altos + Altos 3068. Note that you must use the GNU assembler, linker and + debugger, with COFF-encapsulation. Also, you must fix a kernel + bug. Details in the file @file{ALTOS-README}. @item 3b1 ! AT&T 3b1, a.k.a. 7300 PC. Note that the current version of GNU ! CC cannot be compiled with the Unix compiler on this machine, due ! to bugs in the Unix comiler. GNU CC does work correctly, ! however, if you can compile it with older version of GNU CC or ! cross-compile it. @item sequent-ns32k Sequent containing ns32000 processors. *************** *** 1382,1387 **** machine. It includes @file{tm.h}. ! The file's name should be @file{xm-@var{machine}.h}, with these ! exceptions: @table @file --- 1417,1422 ---- machine. It includes @file{tm.h}. ! The file is located in the subdirectory @file{config}. Its name ! should be @file{xm-@var{machine}.h}, with these exceptions: @table @file *************** *** 1409,1414 **** @item Make a symbolic link named @file{tm.h} to the machine-description ! macro file for your machine (its name should be ! @file{tm-@var{machine}.h}). If your system is a 68000, don't use the file @file{tm-m68k.h} --- 1444,1449 ---- @item Make a symbolic link named @file{tm.h} to the machine-description ! macro file for your machine. It should be in the subdirectory ! @file{config} and its name should be @file{tm-@var{machine}.h}. If your system is a 68000, don't use the file @file{tm-m68k.h} *************** *** 1418,1423 **** @item tm-sun3.h for Sun 3 machines with 68881. - @item tm-sun3-fpa.h - for Sun 3 machines with floating point accelerator. @item tm-sun3-nfp.h for Sun 3 machines with no hardware floating point. --- 1453,1456 ---- *************** *** 1472,1483 **** @item Make a symbolic link named @file{md} to the machine description ! pattern file. Its name should be @file{@var{machine}.md}, but ! @var{machine} is often not the same as the name used in the ! @file{tm.h} file because the @file{md} files are more general. @item Make a symbolic link named @file{aux-output.c} to the output ! subroutine file for your machine (its name should be ! @file{output-@var{machine}.c}). @end itemize --- 1505,1517 ---- @item Make a symbolic link named @file{md} to the machine description ! pattern file. It should be in the @file{config} subdirectory and its ! name should be @file{@var{machine}.md}; but @var{machine} is often not ! the same as the name used in the @file{tm.h} file because the ! @file{md} files are more general. @item Make a symbolic link named @file{aux-output.c} to the output ! subroutine file for your machine. It should be in the @file{config} ! subdirectory and its name should be @file{out-@var{machine}.c}. @end itemize *************** *** 1507,1510 **** --- 1541,1550 ---- @item + Optionally, install the library functions for 64-bit integer + arithmetic. You do this with the command @samp{make gnulib2}. In the + future this will happen automatically; for now, it is optional, until + we are sure it works on all machines. + + @item If you are using COFF-encapsulation, you must convert @file{gnulib} to a GNU-format library at this point. See the file @file{README-ENCAP} *************** *** 1541,1545 **** @item If you wish to test the compiler by compiling it with itself one more ! time, do this: @example --- 1581,1585 ---- @item If you wish to test the compiler by compiling it with itself one more ! time, do this (in C shell): @example *************** *** 1551,1563 **** @end example ! This will notify you if any of these stage 3 object files differs from ! those of stage 2. Any difference, no matter how innocuous, indicates ! that the stage 2 compiler has compiled GNU CC incorrectly, and is ! therefore a potentially serious bug which you should investigate and ! report (@pxref{Bugs}). ! Aside from the @samp{-B} option, the options should be the same as when you made stage 2. @item Install the compiler driver, the compiler's passes and run-time support. --- 1591,1617 ---- @end example ! @noindent Aside from the @samp{-B} option, the options should be the same as when you made stage 2. + The @code{foreach} command (written in C shell) will notify you if any of + these stage 3 object files differs from those of stage 2. On BSD systems, + any difference, no matter how innocuous, indicates that the stage 2 + compiler has compiled GNU CC incorrectly, and is therefore a potentially + serious bug which you should investigate and report (@pxref{Bugs}). + + On systems that use COFF object files, bytes 5 to 8 will always be + different, since it is a timestamp. On these systems, you can do the + comparison as follows (in Bourne shell): + + @example + for file in *.o; do + echo $file + tail +10 $file > foo1 + tail +10 stage2/$file > foo2 + cmp foo1 foo2 + done + @end example + @item Install the compiler driver, the compiler's passes and run-time support. *************** *** 1668,1671 **** --- 1722,1732 ---- @end example + @item + To install the help file, do the following: + + @example + $ lib/help sys$library:helplib.hlb gcc.hlp + @end example + @noindent Now you can invoke the compiler with a command like @samp{gcc /verbose *************** *** 1678,1681 **** --- 1739,1748 ---- them to the linker properly. + Note that GNU CC on VMS does not generate debugging information to + describe the program's symbols. It is not straightforward to implement + this, and we have no time to spend on it, but we might consent to + install a very modular implementation if you write it. You will + probably have to modify GAS as well as GNU CC. + @node Trouble, Incompatibilities, Installation, Top @chapter Known Causes of Trouble with GNU CC. *************** *** 1955,1958 **** --- 2022,2026 ---- * Asm Labels:: Specifying the assembler name to use for a C symbol. * Global Reg Vars:: Defining global variables which reside in registers. + * Alternate Keywords:: @code{__const}, @code{__asm}, etc., for header files. @end menu *************** *** 2059,2062 **** --- 2127,2134 ---- Here the type described is that of pointers to @code{int}. + If you are writing a header file that must work when included in ANSI C + programs, write @code{__typedef} instead of @code{typedef}. + @xref{Alternate Keywords}. + A @code{typeof}-construct can be used anywhere a typedef name could be used. For example, you can use it in a declaration, in a cast, or inside *************** *** 2250,2278 **** @end example ! You can also define structure types containing variable-length arrays, and ! use them even for arguments or function values, as shown here: @example - int foo; - - struct entry - @{ - char data[foo]; - @}; - struct entry ! tester (struct entry arg) @{ ! struct entry new; ! int i; ! for (i = 0; i < foo; i++) ! new.data[i] = arg.data[i] + 1; ! return new; ! @} ! @end example ! ! @noindent ! (Eventually there will be a way to say that the size of the array is ! another member of the same structure.) The length of an array is computed on entry to the brace-level where the --- 2322,2334 ---- @end example ! You can also use variable-length arrays as arguments to functions: @example struct entry ! tester (int len, char data[len]) @{ ! @dots{} ! @} ! @end example The length of an array is computed on entry to the brace-level where the *************** *** 2499,2505 **** @end example ! You can also make all ``simple enough'' functions inline with the ! option @samp{-finline-functions}. Note that certain usages in a ! function definition can make it unsuitable for inline substitution. When a function is both inline and @code{static}, if all calls to the --- 2555,2564 ---- @end example ! (If you are writing a header file to be included in ANSI C programs, write ! @code{__inline} instead of @code{inline}. @xref{Alternate Keywords}.) ! ! You can also make all ``simple enough'' functions inline with the option ! @samp{-finline-functions}. Note that certain usages in a function ! definition can make it unsuitable for inline substitution. When a function is both inline and @code{static}, if all calls to the *************** *** 2623,2632 **** You can put multiple assembler instructions together in a single @code{asm} ! template, separated with semicolons. The input operands are guaranteed not ! to use any of the clobbered registers, and neither will the output ! operands' addresses, so you can read and write the clobbered registers as ! many times as you like. Here is an example of multiple instructions in a ! template; it assumes that the subroutine @code{_foo} accepts arguments in ! registers 9 and 10: @example --- 2682,2693 ---- You can put multiple assembler instructions together in a single @code{asm} ! template, separated either with newlines (written as @samp{\n}) or with ! semicolons if the assembler allows such semicolons. The GNU assembler ! allows semicolons and all Unix assemblers seem to do so. The input ! operands are guaranteed not to use any of the clobbered registers, and ! neither will the output operands' addresses, so you can read and write the ! clobbered registers as many times as you like. Here is an example of ! multiple instructions in a template; it assumes that the subroutine ! @code{_foo} accepts arguments in registers 9 and 10: @example *************** *** 2637,2640 **** --- 2698,2714 ---- @end example + If you want to test the condition code produced by an assembler instruction, + you must include a branch and a label in the @code{asm} construct, as follows: + + @example + asm ("clr %0;frob %1;beq 0f;mov #1,%0;0:" + : "g" (result) + : "g" (input)); + @end example + + @noindent + This assumes your assembler supports local labels, as the GNU assembler + and most Unix assemblers do. + Usually the most convenient way to use these @code{asm} instructions is to encapsulate them in macros that look like functions. For example, *************** *** 2679,2684 **** @end example ! If there are no output operands, the instruction will not be deleted or ! moved. It is a natural idea to look for a way to give access to the condition --- 2753,2759 ---- @end example ! @noindent ! (However, an instruction without output operands will not be deleted ! or moved, regardless, unless it is unreachable.) It is a natural idea to look for a way to give access to the condition *************** *** 2691,2694 **** --- 2766,2773 ---- ``compare'' instructions because they don't have any output operands. + If you are writing a header file that should be includable in ANSI C + programs, write @code{__asm} instead of @code{asm}. @xref{Alternate + Keywords}. + @node Asm Labels, Global Reg Vars, Extended Asm, Extensions @section Controlling Names Used in Assembler Code *************** *** 2695,2700 **** You can specify the name to be used in the assembler code for a C function ! or variable by writing the @code{asm} keyword after the declarator as ! follows: @example --- 2774,2779 ---- You can specify the name to be used in the assembler code for a C function ! or variable by writing the @code{asm} (or @code{__asm}) keyword after the ! declarator as follows: @example *************** *** 2729,2733 **** Perhaps that will be added. ! @node Global Reg Vars,, Asm Labels, Extensions @section Global Variables in Registers --- 2808,2812 ---- Perhaps that will be added. ! @node Global Reg Vars, Alternate Keywords, Asm Labels, Extensions @section Global Variables in Registers *************** *** 2814,2817 **** --- 2893,2924 ---- executable file has no means to supply initial contents for a register. + @node Alternate Keywords,, Global Reg Vars, Extensions + @section Alternate Keywords + + The option @samp{-traditional} disables certain keywords; @samp{-ansi} + disables certain others. This causes trouble when you want to use GNU C + extensions, or ANSI C features, in a general-purpose header file that + should be usable by all programs, including ANSI C programs and traditional + ones. The keywords @code{asm}, @code{typeof} and @code{inline} cannot be + used since they won't work in a program compiled with @samp{-ansi}, while + the keywords @code{const}, @code{volatile}, @code{signed}, @code{typeof} + and @code{inline} won't work in a program compiled with + @samp{-traditional}.@refill + + The way to solve these problems is to put @samp{__} in front of each + problematical keyword. For example, use @code{__asm} instead of @code{asm}, + @code{__const} instead of @code{const}, and @code{__inline} instead of + @code{inline}. + + Other C compilers won't accept these alternative keywords; if you want to + compile with another compiler, you can define the alternate keywords as + macros to replace them with the customary keywords. It looks like this: + + @example + #ifndef __GNUC__ + #define __asm asm + #endif + @end example + @node Bugs, Portability, Extensions, Top @chapter Reporting Bugs *************** *** 3809,3815 **** --- 3916,3932 ---- ``Half-Integer'' mode represents a two-byte integer. + @item PSImode + ``Partial Single Integer'' mode represents an integer which occupies + four bytes but which doesn't really use all four. On some machines, + this is the right mode to use for pointers. + @item SImode ``Single Integer'' mode represents a four-byte integer. + @item PDImode + ``Partial Double Integer'' mode represents an integer which occupies + eight bytes but which doesn't really use all eight. On some machines, + this is the right mode to use for certain pointers. + @item DImode ``Double Integer'' mode represents an eight-byte integer. *************** *** 3826,3829 **** --- 3943,3951 ---- point number. + @item XFmode + ``Extended Floating'' mode represents a triple-precision (twelve byte) + floating point number. This mode is used for IEEE extended floating + point. + @item TFmode ``Tetra Floating'' mode represents a quadruple-precision (sixteen byte) *************** *** 3871,3880 **** @code{QImode}, @code{SImode}, @code{SFmode} and @code{DFmode}. The compiler will attempt to use @code{DImode} for two-word structures and ! unions, but it would not be hard to program it to avoid this. Likewise, ! you can arrange for the C type @code{short int} to avoid using ! @code{HImode}. In the long term it would be desirable to make the set of ! available machine modes machine-dependent and eliminate all assumptions ! about specific machine modes or their uses from the machine-independent ! code of the compiler. To help begin this process, the machine modes are divided into mode --- 3993,4002 ---- @code{QImode}, @code{SImode}, @code{SFmode} and @code{DFmode}. The compiler will attempt to use @code{DImode} for two-word structures and ! unions, but this can be prevented by overriding the definition of ! @code{MAX_FIXED_MODE_SIZE}. Likewise, you can arrange for the C type ! @code{short int} to avoid using @code{HImode}. In the long term it ! might be desirable to make the set of available machine modes ! machine-dependent and eliminate all assumptions about specific machine ! modes or their uses from the machine-independent code of the compiler. To help begin this process, the machine modes are divided into mode *************** *** 3983,3988 **** The global variables @code{dconst0_rtx} and @code{fconst0_rtx} hold ! @samp{const_double} expressions with value 0, in modes @code{DFmode} and ! @code{SFmode}, respectively. @item (symbol_ref @var{symbol}) --- 4105,4113 ---- The global variables @code{dconst0_rtx} and @code{fconst0_rtx} hold ! @samp{const_double} expressions with value 0, in modes @code{DFmode} ! and @code{SFmode}, respectively. The macro @code{CONST0_RTX ! (@var{mode})} refers to a @samp{const_double} expression with value 0 ! in mode @var{mode}. The mode @var{mode} must be of mode class ! @code{MODE_FLOAT}. @item (symbol_ref @var{symbol}) *************** *** 4857,4861 **** --- 4982,4991 ---- @item NOTE_INSN_SETJMP Appears following each call to @code{setjmp} or a related function. + + @item NOTE_INSN_LOOP_BEG + Appears at the place in a loop that @code{continue} statements jump to. @end table + + These codes are printed symbolically when they appear in debugging dumps. @end table *************** *** 4972,4980 **** @end table ! (The only difference between the expression codes @samp{insn_list} and @samp{expr_list} is that the first operand of an @samp{insn_list} is assumed to be an insn and is printed in debugging dumps as the insn's unique id; the first operand of an @samp{expr_list} is printed in the ! ordinary way as an expression.) @node Calls, Sharing, Insns, RTL --- 5102,5113 ---- @end table ! For convenience, the machine mode in an @samp{insn_list} or ! @samp{expr_list} is printed using these symbolic codes in debugging dumps. ! ! The only difference between the expression codes @samp{insn_list} and @samp{expr_list} is that the first operand of an @samp{insn_list} is assumed to be an insn and is printed in debugging dumps as the insn's unique id; the first operand of an @samp{expr_list} is printed in the ! ordinary way as an expression. @node Calls, Sharing, Insns, RTL *************** *** 6981,6985 **** @item PARM_BOUNDARY ! Alignment required for function parameters on the stack, in bits. @item STACK_BOUNDARY --- 7114,7130 ---- @item PARM_BOUNDARY ! Normal alignment required for function parameters on the stack, in ! bits. All stack parameters receive least this much alignment ! regardless of data type. On most machines, this is the same as the ! size of an integer. ! ! @item MAX_PARM_BOUNDARY ! Largest alignment required for any stack parameters, in bits. If the ! data type of the parameter calls for more alignment than ! @code{PARM_BOUNDARY}, then it is given extra padding up to this limit. ! ! Don't define this macro if it would be equal to @code{PARM_BOUNDARY}; ! in other words, if the alignment of a stack parameter should not ! depend on its data type (as is the case on most machines). @item STACK_BOUNDARY *************** *** 7020,7023 **** --- 7165,7173 ---- multiple of 32 or @code{BIGGEST_ALIGNMENT} bits. + @item MAX_FIXED_MODE_SIZE + An integer expression for the largest integer machine mode that should + actually be used. All integer machine modes of this size or smaller + can be used for structures and unions with the appropriate sizes. + @item CHECK_FLOAT_VALUE (@var{mode}, @var{value}) A C statement to validate the value @var{value} (or type *************** *** 7593,7599 **** not padding for individual arguments. ! The definition should be a C expression for the total size to be ! pushed on the stack in a call whose arguments (including their ! individual padding) occupy @var{size} bytes. @item RETURN_POPS_ARGS (@var{funtype}) --- 7743,7760 ---- not padding for individual arguments. ! The argument @var{size} will be a C variable of type @code{struct ! arg_data} which contains two fields, an integer named @code{constant} ! and an RTX named @code{var}. These together represent a size measured ! in bytes which is the sum of the integer and the RTX. Most of the ! time @code{var} is 0, which means that the size is simply the integer. ! ! The definition should be a C statement or compound statement ! which alters the variable supplied in whatever way you wish. ! ! Note that the value you leave in the variable @code{size} will ! ultimately be rounded up to a multiple of @code{STACK_BOUNDARY} bits. ! ! This macro is not fully implemented for machines which have push ! instructions (i.e., on which @code{PUSH_ROUNDING} is defined). @item RETURN_POPS_ARGS (@var{funtype}) *************** *** 7653,7656 **** --- 7814,7830 ---- @code{FUNCTION_VALUE} serves both purposes.@refill + @item RETURN_IN_MEMORY (@var{type}) + A C expression which can inhibit the returning of certain function + values in registers, based on the type of value. A nonzero value says + to return the function value in memory, just as large structures are + always returned. Here @var{type} will be a C expression of type + @code{tree}, representing the data type of the value. + + Note that values of mode @code{BLKmode} are returned in memory + regardless of this macro. Also, the option @samp{-fpcc-struct-return} + takes effect regardless of this macro. On most systems, it is + possible to leave the macro undefined; this causes a default + definition to be used, whose value is the constant 0. + @item LIBCALL_VALUE (@var{mode}) A C expression to create an RTX representing the place where a library *************** *** 7749,7757 **** @item FUNCTION_ARG_ADVANCE (@var{cum}, @var{mode}, @var{type}, @var{named}) ! Update the summarizer variable @var{cum} to advance past an argument ! in the argument list. The values @var{mode}, @var{type} and ! @var{named} describe that argument. Once this is done, the variable ! @var{cum} is suitable for analyzing the @emph{following} argument ! with @code{FUNCTION_ARG}, etc.@refill @item FUNCTION_ARG_REGNO_P (@var{regno}) --- 7923,7931 ---- @item FUNCTION_ARG_ADVANCE (@var{cum}, @var{mode}, @var{type}, @var{named}) ! A C statement (sans semicolon) to update the summarizer variable ! @var{cum} to advance past an argument in the argument list. The ! values @var{mode}, @var{type} and @var{named} describe that argument. ! Once this is done, the variable @var{cum} is suitable for analyzing ! the @emph{following} argument with @code{FUNCTION_ARG}, etc.@refill @item FUNCTION_ARG_REGNO_P (@var{regno}) *************** *** 8245,8251 **** and print no error message. ! @item IDENT_DIRECTIVE ! Define this if the preprocessor should ignore @code{#ident} directives ! and print no error message. @item MOVE_MAX --- 8419,8425 ---- and print no error message. ! @item HAVE_VPRINTF ! Define this if the library function @code{vprintf} is available on your ! system. @item MOVE_MAX *************** *** 8347,8350 **** --- 8521,8549 ---- Define this to be nonzero if the character @samp{$} should be allowed by default in identifier names. + + @item USE_C_ALLOCA + Define this macro to indicate that the compiler is running with the + @code{alloca} implemented in C. This version of @code{alloca} can be + found in the file @file{alloca.c}; to use it, you must also edit the + @file{Makefile}. + + This macro, unlike most, describes the machine that the compiler is + running on, rather than the one the compiler is compiling for. + Therefore, it should be set in the @file{xm-@var{machine}.h} file + rather than in the @file{xm-@var{machine}.h} file. + + If you do define this macro, you should probably do it as follows: + + @example + #ifndef __GNUC__ + #define USE_C_ALLOCA + #else + #deifne alloca __builtin_alloca + #endif + @end example + + @noindent + so that when the compiler is compiled with GNU CC it uses the more + efficient built-in @code{alloca} function. @end table *************** *** 8436,8444 **** standard C startup file from the usual place. See @file{gcc.c}. @item STANDARD_STARTFILE_PREFIX Define this macro as a C string constant if you wish to override the ! standard choice of @file{/lib/} as the default prefix for where to ! find the startup files such as @file{crt0.o}. @item ASM_FILE_START (@var{stream}) A C expression which outputs to the stdio stream @var{stream} --- 8635,8658 ---- standard C startup file from the usual place. See @file{gcc.c}. + @item STANDARD_EXEC_PREFIX + Define this macro as a C string constant if you wish to override the + standard choice of @file{/usr/local/lib/gcc-} as the default prefix to + try when searching for the executable files of the compiler. + + The prefix specified by the @samp{-B} option, if any, is tried before + the default prefix. After the default prefix, if the executable is + not found that way, @file{/usr/lib/gcc-} is tried next; then the + directories in your search path for shell commands are searched. + @item STANDARD_STARTFILE_PREFIX Define this macro as a C string constant if you wish to override the ! standard choice of @file{/usr/local/lib/} as the default prefix to try ! when searching for startup files such as @file{crt0.o}. + In this search, all the prefixes tried for executable files are tried + first. Then comes the default startfile prefix specified by this + macro, followed by the prefixes @file{/lib/} and @file{/usr/lib/} as + last resorts. + @item ASM_FILE_START (@var{stream}) A C expression which outputs to the stdio stream @var{stream} *************** *** 8729,8739 **** @var{power} bytes. @var{power} will be a C expression of type @code{int}. ! @item ASM_OUTPUT_COMMON (@var{stream}, @var{name}, @var{size}) A C statement (sans semicolon) to output to the stdio stream ! @var{stream} the assembler definition of a common-label named @var{name} ! whose size is @var{size} bytes. Use the expression ! @code{assemble_name (@var{stream}, @var{name})} to output the name ! itself; before and after that, output the additional assembler syntax ! for defining the name, and a newline. This macro controls how the assembler definitions of uninitialized --- 8943,8955 ---- @var{power} bytes. @var{power} will be a C expression of type @code{int}. ! @item ASM_OUTPUT_COMMON (@var{stream}, @var{name}, @var{size}, @var{rounded}) A C statement (sans semicolon) to output to the stdio stream ! @var{stream} the assembler definition of a common-label named ! @var{name} whose size is @var{size} bytes. The variable @var{rounded} ! is the size rounded up to whatever alignment the caller wants. ! ! Use the expression @code{assemble_name (@var{stream}, @var{name})} to ! output the name itself; before and after that, output the additional ! assembler syntax for defining the name, and a newline. This macro controls how the assembler definitions of uninitialized *************** *** 8740,8750 **** global variables are output. ! @item ASM_OUTPUT_LOCAL (@var{stream}, @var{name}, @var{size}) A C statement (sans semicolon) to output to the stdio stream @var{stream} the assembler definition of a local-common-label named ! @var{name} whose size is @var{size} bytes. Use the expression ! @code{assemble_name (@var{stream}, @var{name})} to output the name ! itself; before and after that, output the additional assembler syntax ! for defining the name, and a newline. This macro controls how the assembler definitions of uninitialized --- 8956,8968 ---- global variables are output. ! @item ASM_OUTPUT_LOCAL (@var{stream}, @var{name}, @var{size}, @var{rounded}) A C statement (sans semicolon) to output to the stdio stream @var{stream} the assembler definition of a local-common-label named ! @var{name} whose size is @var{size} bytes. The variable @var{rounded} ! is the size rounded up to whatever alignment the caller wants. ! ! Use the expression @code{assemble_name (@var{stream}, @var{name})} to ! output the name itself; before and after that, output the additional ! assembler syntax for defining the name, and a newline. This macro controls how the assembler definitions of uninitialized *************** *** 8762,8769 **** A C statement to output something to the assembler file to handle a @samp{#ident} directive containing the text @var{string}. If this ! macro is not defined, the assembler code @samp{.ident "@var{string}"} ! will be output by default. ! ! This macro is significant only if @code{IDENT_DIRECTIVE} is defined. @item TARGET_BELL --- 8980,8984 ---- A C statement to output something to the assembler file to handle a @samp{#ident} directive containing the text @var{string}. If this ! macro is not defined, nothing is output for a @samp{#ident} directive. @item TARGET_BELL diff -rc2N gcc-1.34/genoutput.c gcc-1.35/genoutput.c *** gcc-1.34/genoutput.c Wed Feb 22 11:53:47 1989 --- gcc-1.35/genoutput.c Thu Apr 6 11:14:26 1989 *************** *** 169,172 **** --- 169,173 ---- printf ("#include \"rtl.h\"\n"); printf ("#include \"regs.h\"\n"); + printf ("#include \"hard-reg-set.h\"\n"); printf ("#include \"real.h\"\n"); printf ("#include \"conditions.h\"\n"); diff -rc2N gcc-1.34/gnulib2.c gcc-1.35/gnulib2.c *** gcc-1.34/gnulib2.c Wed Dec 31 19:00:00 1969 --- gcc-1.35/gnulib2.c Sun Apr 23 13:07:47 1989 *************** *** 0 **** --- 1,469 ---- + /* More subroutines needed by GCC output code on some machines. */ + /* Compile this one with gcc. */ + + #include "config.h" + #include <stddef.h> + + /* long long ints are pairs of long ints in the order determined by + WORDS_BIG_ENDIAN. */ + + #ifdef WORDS_BIG_ENDIAN + struct longlong {long high, low;}; + #else + struct longlong {long low, high;}; + #endif + + /* Internally, long long ints are strings of unsigned shorts in the + order determined by BYTES_BIG_ENDIAN. */ + + #define B 0x10000 + #define low16 (B - 1) + + #ifdef BYTES_BIG_ENDIAN + + #define HIGH 0 + #define LOW 1 + + #define big_end(n) 0 + #define little_end(n) ((n) - 1) + #define next_msd(i) ((i) - 1) + #define next_lsd(i) ((i) + 1) + #define is_not_msd(i,n) ((i) >= 0) + #define is_not_lsd(i,n) ((i) < (n)) + + #else + + #define LOW 0 + #define HIGH 1 + + #define big_end(n) ((n) - 1) + #define little_end(n) 0 + #define next_msd(i) ((i) + 1) + #define next_lsd(i) ((i) - 1) + #define is_not_msd(i,n) ((i) < (n)) + #define is_not_lsd(i,n) ((i) >= 0) + + #endif + + /* These algorithms are all straight out of Knuth, vol. 2, sec. 4.3.1. */ + + #define bdiv __div_internal + + static int badd (); + static int bsub (); + static void bmul (); + static void bdiv (); + static int bneg (); + static int bshift (); + + #ifdef L_adddi3 + struct longlong + __adddi3 (u, v) + struct longlong u, v; + { + long a[2], b[2], c[2]; + struct longlong w; + + a[HIGH] = u.high; + a[LOW] = u.low; + b[HIGH] = v.high; + b[LOW] = v.low; + + badd (a, b, c, sizeof c); + + w.high = c[HIGH]; + w.low = c[LOW]; + return w; + } + + static int + badd (a, b, c, n) + unsigned short *a, *b, *c; + size_t n; + { + unsigned long acc; + int i; + + n /= sizeof *c; + + acc = 0; + for (i = little_end (n); is_not_msd (i, n); i = next_msd (i)) + { + acc += a[i] + b[i]; + c[i] = acc & low16; + acc = acc >> 16; + } + return acc; + } + #endif + + #ifdef L_subdi3 + struct longlong + __subdi3 (u, v) + struct longlong u, v; + { + long a[2], b[2], c[2]; + struct longlong w; + + a[HIGH] = u.high; + a[LOW] = u.low; + b[HIGH] = v.high; + b[LOW] = v.low; + + bsub (a, b, c, sizeof c); + + w.high = c[HIGH]; + w.low = c[LOW]; + return w; + } + + static int + bsub (a, b, c, n) + unsigned short *a, *b, *c; + size_t n; + { + signed long acc; + int i; + + n /= sizeof *c; + + acc = 0; + for (i = little_end (n); is_not_msd (i, n); i = next_msd (i)) + { + acc += a[i] - b[i]; + c[i] = acc & low16; + acc = acc >> 16; + } + return acc; + } + #endif + + #ifdef L_muldi3 + struct longlong + __muldi3 (u, v) + struct longlong u, v; + { + long a[2], b[2], c[2][2]; + struct longlong w; + + a[HIGH] = u.high; + a[LOW] = u.low; + b[HIGH] = v.high; + b[LOW] = v.low; + + bmul (a, b, c, sizeof a, sizeof b); + + w.high = c[LOW][HIGH]; + w.low = c[LOW][LOW]; + return w; + } + + static void + bmul (a, b, c, m, n) + unsigned short *a, *b, *c; + size_t m, n; + { + int i, j; + unsigned long acc; + + bzero (c, m + n); + + m /= sizeof *a; + n /= sizeof *b; + + for (j = little_end (n); is_not_msd (j, n); j = next_msd (j)) + { + acc = 0; + for (i = little_end (m); is_not_msd (i, m); i = next_msd (i)) + { + acc += a[i] * b[j] + (c + next_lsd (j))[i]; + (c + next_lsd (j))[i] = acc & low16; + acc = acc >> 16; + } + c[j] = acc; + } + } + #endif + + #ifdef L_divdi3 + long long + __divdi3 (u, v) + long long u, v; + { + if (u < 0) + if (v < 0) + return (unsigned long long) -u / (unsigned long long) -v; + else + return - ((unsigned long long) -u / (unsigned long long) v); + else + if (v < 0) + return - ((unsigned long long) u / (unsigned long long) -v); + else + return (unsigned long long) u / (unsigned long long) v; + } + #endif + + #ifdef L_moddi3 + long long + __moddi3 (u, v) + long long u, v; + { + if (u < 0) + if (v < 0) + return - ((unsigned long long) -u % (unsigned long long) -v); + else + return - ((unsigned long long) -u % (unsigned long long) v); + else + if (v < 0) + return (unsigned long long) u % (unsigned long long) -v; + else + return (unsigned long long) u % (unsigned long long) v; + } + #endif + + #ifdef L_udivdi3 + struct longlong + __udivdi3 (u, v) + struct longlong u, v; + { + unsigned long a[2][2], b[2], q[2], r[2]; + struct longlong w; + + a[HIGH][HIGH] = 0; + a[HIGH][LOW] = 0; + a[LOW][HIGH] = u.high; + a[LOW][LOW] = u.low; + b[HIGH] = v.high; + b[LOW] = v.low; + + bdiv (a, b, q, r, sizeof a, sizeof b); + + w.high = q[HIGH]; + w.low = q[LOW]; + return w; + } + #endif + + #ifdef L_umoddi3 + struct longlong + __umoddi3 (u, v) + struct longlong u, v; + { + unsigned long a[2][2], b[2], q[2], r[2]; + struct longlong w; + + a[HIGH][HIGH] = 0; + a[HIGH][LOW] = 0; + a[LOW][HIGH] = u.high; + a[LOW][LOW] = u.low; + b[HIGH] = v.high; + b[LOW] = v.low; + + bdiv (a, b, q, r, sizeof a, sizeof b); + + w.high = r[HIGH]; + w.low = r[LOW]; + return w; + } + #endif + + #ifdef L_negdi2 + struct longlong + __negdi2 (u) + struct longlong u; + { + unsigned long a[2], b[2]; + struct longlong w; + + a[HIGH] = u.high; + a[LOW] = u.low; + + bneg (a, b, sizeof b); + + w.high = b[HIGH]; + w.low = b[LOW]; + return w; + } + + static int + bneg (a, b, n) + unsigned short *a, *b; + size_t n; + { + signed long acc; + int i; + + n /= sizeof (short); + + acc = 0; + for (i = little_end (n); is_not_msd (i, n); i = next_msd (i)) + { + acc -= a[i]; + b[i] = acc & low16; + acc = acc >> 16; + } + return acc; + } + #endif + + /* Divide a by b, producing quotient q and remainder r. + + sizeof a is m + sizeof b is n + sizeof q is m - n + sizeof r is n + + The quotient must fit in m - n bytes, i.e., the most significant + n digits of a must be less than b, and m must be greater than n. */ + + #ifdef L_div_internal + void + bdiv (a, b, q, r, m, n) + unsigned short *a, *b, *q, *r; + size_t m, n; + { + unsigned long qhat, rhat; + unsigned long acc; + unsigned short *u = (unsigned short *) alloca (m); + unsigned short *v = (unsigned short *) alloca (n); + unsigned short *u1 = next_lsd (u); + unsigned short *u2 = next_lsd (u1); + unsigned short *vn; + int d, qn; + int i, j; + + m /= sizeof *a; + n /= sizeof *b; + qn = m - n; + + /* Shift divisor and dividend left until the high bit of the divisor + is 1. */ + + while (b[big_end (n)] == 0) + { + r[big_end (n)] = 0; + + a += little_end (2); + b += little_end (2); + r += little_end (2); + m--; + n--; + + /* Check for zero divisor. */ + if (n == 0) + abort (); + } + + for (d = 0; d < 16; d++) + if (b[big_end (n)] & (1 << (16 - 1 - d))) + break; + + bshift (a, d, u, 0, m); + bshift (b, d, v, 0, n); + + /* Get a pointer to the high divisor digit (so some of the upcoming code + fits on a line). Provide the divisor with a trailing zero digit if + it is only one digit long. */ + + vn = v + big_end (n); + if (n == 1) + *next_lsd (vn) = 0; + + /* Main loop: find a quotient digit, multiply it by the divisor, + and subtract that from the dividend, shifted over the right amount. */ + + for (j = big_end (qn); is_not_lsd (j, qn); j = next_lsd (j)) + { + /* Quotient digit initial guess: high 2 dividend digits over high + divisor digit. */ + + if (u[j] == *vn) + { + qhat = B - 1; + rhat = *vn + u1[j]; + } + else + { + unsigned long numerator = u[j] << 16 | u1[j]; + qhat = numerator / *vn; + rhat = numerator % *vn; + } + + /* Now get the quotient right for high 3 dividend digits over + high 2 divisor digits. */ + + while (rhat < B && qhat * *next_lsd (vn) > (rhat << 16 | u2[j])) + { + qhat -= 1; + rhat += *vn; + } + + /* Multiply quotient by divisor, subtract from dividend. */ + + acc = 0; + for (i = little_end (n); is_not_msd (i, n); i = next_msd (i)) + { + acc += (u1 + j)[i] - v[i] * qhat; + (u1 + j)[i] = acc & low16; + if (acc < B) + acc = 0; + else acc = acc >> 16 | -B; + } + + q[j] = qhat; + + /* Quotient may have been too high by 1. If dividend went negative, + decrement the quotient by 1 and add the divisor back. */ + + if ((signed long) (acc + u[j]) < 0) + { + q[j] -= 1; + acc = 0; + for (i = little_end (n); is_not_msd (i, n); i = next_msd (i)) + { + acc += (u1 + j)[i] + v[i]; + (u1 + j)[i] = acc & low16; + acc = acc >> 16; + } + } + } + + /* Now the remainder is what's left of the dividend, shifted right + by the amount of the normalizing left shift at the top. */ + + if (d == 0) + bshift (&u[j], d, r, 0, n); + else + r[big_end (n)] = bshift (&u[j], 16 - d, &r[next_lsd (big_end (n))], + u[little_end (m)] >> d, n - 1); + } + + /* Left shift U by K giving W; fill the introduced low-order bits with + CARRY_IN. Length of U and W is N. Return carry out. K must be + in 0 .. 16. */ + + static int + bshift (u, k, w, carry_in, n) + unsigned short *u, *w, carry_in; + int k, n; + { + unsigned long acc; + int i; + + if (k == 0) + { + bcopy (u, w, n * sizeof *u); + return 0; + } + + acc = carry_in; + for (i = little_end (n); is_not_msd (i, n); i = next_msd (i)) + { + acc |= u[i] << k; + w[i] = acc & low16; + acc = acc >> 16; + } + return acc; + } + #endif + diff -rc2N gcc-1.34/integrate.c gcc-1.35/integrate.c *** gcc-1.34/integrate.c Wed Feb 22 12:22:46 1989 --- gcc-1.35/integrate.c Mon Apr 24 00:07:49 1989 *************** *** 136,141 **** we can't handle it. */ #if defined (STRUCT_VALUE) || defined (STRUCT_VALUE_INCOMING) ! if (TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl))) == BLKmode) ! return "function returning large aggregate cannot be inline"; #endif --- 136,142 ---- we can't handle it. */ #if defined (STRUCT_VALUE) || defined (STRUCT_VALUE_INCOMING) ! if (TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl))) == BLKmode ! || RETURN_IN_MEMORY (TREE_TYPE (TREE_TYPE (fndecl)))) ! return "inline functions not supported for this return value type"; #endif *************** *** 585,588 **** --- 586,606 ---- if (list_length (parms) != nargs) return (rtx)-1; + /* Also check that the parms type match. Since the appropriate + conversions or default promotions have already been applied, + the machine modes should match exactly. */ + for (formal = DECL_ARGUMENTS (fndecl), + actual = parms; + formal; + formal = TREE_CHAIN (formal), + actual = TREE_CHAIN (actual)) + { + tree arg = TREE_VALUE (actual); + enum machine_mode mode = TYPE_MODE (DECL_ARG_TYPE (formal)); + if (mode != TYPE_MODE (TREE_TYPE (arg))) + return (rtx)-1; + /* If they are block mode, the types should match exactly. */ + if (mode == BLKmode && TREE_TYPE (arg) != TREE_TYPE (formal)) + return (rtx)-1; + } /* Make a fresh binding contour that we can easily remove. */ *************** *** 603,607 **** { tree arg = TREE_VALUE (actual); /* this has already been converted */ ! enum machine_mode tmode = TYPE_MODE (TREE_TYPE (formal)); rtx copy; --- 621,626 ---- { tree arg = TREE_VALUE (actual); /* this has already been converted */ ! enum machine_mode tmode = TYPE_MODE (DECL_ARG_TYPE (formal)); ! enum machine_mode imode = TYPE_MODE (TREE_TYPE (formal)); rtx copy; *************** *** 637,640 **** --- 656,663 ---- copy = copy_to_reg (copy); } + /* If passed mode != nominal mode, COPY is now the passed mode. + Convert it to the nominal mode (i.e. truncate it). */ + if (tmode != imode) + copy = convert_to_mode (imode, copy); arg_vec[i] = copy; } diff -rc2N gcc-1.34/jump.c gcc-1.35/jump.c *** gcc-1.34/jump.c Wed Feb 22 12:22:44 1989 --- gcc-1.35/jump.c Wed Mar 29 14:39:28 1989 *************** *** 686,689 **** --- 686,694 ---- break; + /* Don't allow the range of insns preceding E1 or E2 + to include the other (E2 or E1). */ + if (i2 == e1 || i1 == e2) + break; + /* If we will get to this code by jumping, those jumps will be tensioned to go directly to the new label (before I2), *************** *** 1342,1349 **** rtx olabel, nlabel; { ! register RTX_CODE code = GET_CODE (x); register int i; register char *fmt; if (code == IF_THEN_ELSE) { --- 1347,1358 ---- rtx olabel, nlabel; { ! register RTX_CODE code; register int i; register char *fmt; + if (x == 0) + return; + + code = GET_CODE (x); if (code == IF_THEN_ELSE) { diff -rc2N gcc-1.34/local-alloc.c gcc-1.35/local-alloc.c *** gcc-1.34/local-alloc.c Wed Feb 22 12:22:40 1989 --- gcc-1.35/local-alloc.c Sun Mar 12 12:00:52 1989 *************** *** 305,308 **** --- 305,311 ---- block_alloc (b); + #ifdef USE_C_ALLOCA + alloca (0); + #endif } } diff -rc2N gcc-1.34/loop.c gcc-1.35/loop.c *** gcc-1.34/loop.c Wed Feb 22 12:22:37 1989 --- gcc-1.35/loop.c Mon Apr 10 17:03:27 1989 *************** *** 99,102 **** --- 99,108 ---- static int loop_has_call; + /* Added loop_continue which is the NOTE_INSN_LOOP_CONT of the + current loop. A continue statement will generate a branch to + NEXT_INSN (loop_continue). */ + + static rtx loop_continue; + /* Indexed by register number, contains the number of times the reg is set during the loop being scanned. *************** *** 167,171 **** unsigned int global : 1; /* 1 means reg is live outside this loop */ unsigned int done : 1; /* 1 inhibits further processing of this */ ! unsigned int partial : 1; /* Moving this doesn't make it invariant. */ struct movable *match; /* First entry for same value */ struct movable *forces; /* An insn that must be moved if this is */ --- 173,180 ---- unsigned int global : 1; /* 1 means reg is live outside this loop */ unsigned int done : 1; /* 1 inhibits further processing of this */ ! unsigned int partial : 1; /* 1 moving this doesn't make it invariant */ ! enum machine_mode savemode; /* Nonzero means it is a mode for a low part ! that we should avoid changing when clearing ! the rest of the reg. */ struct movable *match; /* First entry for same value */ struct movable *forces; /* An insn that must be moved if this is */ *************** *** 199,202 **** --- 208,212 ---- static int product_cheap_p (); static void emit_iv_inc (); + static void check_eliminate_biv (); static int can_eliminate_biv_p (); static void eliminate_biv (); *************** *** 422,427 **** if (loop_dump_stream) ! fprintf (loop_dump_stream, "\nLoop from %d to %d: %d real insns\n\n", ! INSN_UID (loop_start), INSN_UID (end), insn_count); /* Scan through the loop finding insns that are safe to move. --- 432,442 ---- if (loop_dump_stream) ! { ! fprintf (loop_dump_stream, "\nLoop from %d to %d: %d real insns.\n", ! INSN_UID (loop_start), INSN_UID (end), insn_count); ! if (loop_continue) ! fprintf (loop_dump_stream, "Continue at insn %d.\n", ! INSN_UID (loop_continue)); ! } /* Scan through the loop finding insns that are safe to move. *************** *** 512,515 **** --- 527,531 ---- m->forces = 0; m->partial = 0; + m->savemode = VOIDmode; m->regno = regno; /* Set M->cond if either invariant_p or consec_sets_invariant_p *************** *** 568,571 **** --- 584,601 ---- m->forces = 0; m->partial = 1; + /* If the insn may not be executed on some cycles, + we can't clear the whole reg; clear just high part. + Consider this: + while (1) + while (1) { + if (foo ()) x = *s; + use (x); + } + Clearing x before the inner loop could clobber a value + being saved from the last time around the outer loop. */ + if (maybe_never) + m->savemode = GET_MODE (SET_SRC (PATTERN (NEXT_INSN (p)))); + else + m->savemode = VOIDmode; m->regno = regno; m->cond = 0; *************** *** 833,836 **** --- 863,868 ---- rtx first; + /* Now move the insns that set the reg. */ + for (count = m->consec; count >= 0; count--) { *************** *** 889,893 **** } } ! if (GET_CODE (PATTERN (p)) == CALL_INSN) i1 = emit_call_insn_before (PATTERN (p), loop_start); else --- 921,938 ---- } } ! if (m->savemode != VOIDmode) ! { ! /* P sets REG to zero; but we should clear only the bits ! that are not covered by the mode m->savemode. */ ! rtx reg = SET_DEST (PATTERN (p)); ! i1 = emit_insn_before ! (gen_rtx (SET, VOIDmode, reg, ! gen_rtx (AND, GET_MODE (reg), ! reg, ! gen_rtx (CONST_INT, VOIDmode, ! (1 << GET_MODE_BITSIZE (m->savemode)) - 1))), ! loop_start); ! } ! else if (GET_CODE (PATTERN (p)) == CALL_INSN) i1 = emit_call_insn_before (PATTERN (p), loop_start); else *************** *** 1238,1241 **** --- 1283,1287 ---- num_mem_sets = 0; loops_enclosed = 1; + loop_continue = 0; for (insn = NEXT_INSN (start); level > 0; insn = NEXT_INSN (insn)) *************** *** 1261,1264 **** --- 1307,1316 ---- } } + else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_CONT) + { + if (level == 1) + loop_continue = insn; + } + /* Don't optimize loops containing setjmps. On some machines, longjmp does not restore the reg *************** *** 1452,1455 **** --- 1504,1513 ---- case MEM: + /* Constants in the constant pool are invariant. + ?? Really we should detect any constant address in the + text section. */ + if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (XEXP (x, 0))) + return 1; /* A store in a varying-address scalar (or a subroutine call) could clobber anything in memory. */ *************** *** 1877,1880 **** --- 1935,1939 ---- rtx *location; /* Place in the insn where this giv occurs. If GIV_TYPE is DEST_REG, this is 0. */ + enum machine_mode mode; /* The mode of this biv or giv */ rtx mult_val; /* Multiplicative factor for src_reg. */ rtx add_val; /* Additive constant for that product. */ *************** *** 1908,1912 **** int biv_count; /* Number of insns setting this reg. */ struct induction *biv; /* List of all insns that set this reg. */ ! int giv_count; /* Number of givs computed from this biv. */ struct induction *giv; /* List of all insns that compute a giv from this reg. */ --- 1967,1973 ---- int biv_count; /* Number of insns setting this reg. */ struct induction *biv; /* List of all insns that set this reg. */ ! int giv_count; /* Number of DEST_REG givs computed from this ! biv. The resulting count is only used in ! check_dbra_loop. */ struct induction *giv; /* List of all insns that compute a giv from this reg. */ *************** *** 1914,1919 **** rtx initial_value; /* Value of reg at loop start */ struct iv_class *next; /* Links all class structures together */ ! char init_val_set; /* Used during scan for initial value, ! 1 if assignment seen, 0 otherwise. */ char eliminable; /* 1 if plausible candidate for elimination. */ char nonneg; /* 1 if we added a REG_NONNEG note for this. */ --- 1975,1979 ---- rtx initial_value; /* Value of reg at loop start */ struct iv_class *next; /* Links all class structures together */ ! rtx init_insn; /* insn which intializes biv, 0 if none seen. */ char eliminable; /* 1 if plausible candidate for elimination. */ char nonneg; /* 1 if we added a REG_NONNEG note for this. */ *************** *** 2069,2072 **** --- 2129,2133 ---- v->mult_val = mult_val; v->add_val = inc_val; + v->mode = GET_MODE (SET_DEST (PATTERN (p))); /* Add this to the reg's iv_class, creating a class *************** *** 2095,2099 **** /* Set initial value to the reg itself. */ bl->initial_value = SET_DEST (PATTERN (p)); ! bl->init_val_set = 0; bl->eliminable = 0; bl->nonneg = 0; --- 2156,2161 ---- /* Set initial value to the reg itself. */ bl->initial_value = SET_DEST (PATTERN (p)); ! /* We haven't seen the intializing insn yet */ ! bl->init_insn = 0; bl->eliminable = 0; bl->nonneg = 0; *************** *** 2201,2210 **** if (induct_var[dest_regno] == BASIC_INDUCT ! && class_struct[dest_regno]->init_val_set == 0) { /* This is the first modification found for this reg. */ /* Save value if it is a constant or register. */ ! if (GET_CODE (SET_SRC (PATTERN (p))) == CONST_INT || GET_CODE (SET_SRC (PATTERN (p))) == REG) { --- 2263,2280 ---- if (induct_var[dest_regno] == BASIC_INDUCT ! && class_struct[dest_regno]->init_insn == 0) { /* This is the first modification found for this reg. */ + /* Record the intializing INSN */ + + class_struct[dest_regno]->init_insn = p; + + if (loop_dump_stream) + fprintf (loop_dump_stream, "Biv %d initialized at insn %d: ", + dest_regno, INSN_UID (p)); + /* Save value if it is a constant or register. */ ! if (CONSTANT_P (SET_SRC (PATTERN (p))) || GET_CODE (SET_SRC (PATTERN (p))) == REG) { *************** *** 2213,2218 **** if (loop_dump_stream) ! fprintf (loop_dump_stream, "Reg %d: initial value ", ! dest_regno); if (loop_dump_stream) { --- 2283,2287 ---- if (loop_dump_stream) ! fprintf (loop_dump_stream, "initial value "); if (loop_dump_stream) { *************** *** 2221,2226 **** INTVAL (SET_SRC (PATTERN (p)))); else ! fprintf (loop_dump_stream, "reg %d\n", ! REGNO (SET_SRC (PATTERN (p)))); } } --- 2290,2297 ---- INTVAL (SET_SRC (PATTERN (p)))); else ! { ! print_rtl (loop_dump_stream, SET_SRC (PATTERN (p))); ! fprintf (loop_dump_stream, "\n"); ! } } } *************** *** 2231,2239 **** if (loop_dump_stream) ! fprintf (loop_dump_stream, "Reg %d: complex initial value\n", ! dest_regno); } - class_struct[dest_regno]->init_val_set = 1; biv_found--; } --- 2302,2308 ---- if (loop_dump_stream) ! fprintf (loop_dump_stream, "complex initial value\n"); } biv_found--; } *************** *** 2310,2314 **** record_giv (v, p, src_regno, dest_regno, mult_val, add_val, benefit, ! forces, forces2, DEST_REG, maybe_never, 0); /* Skip the consecutive insns, if there are any. */ --- 2379,2383 ---- record_giv (v, p, src_regno, dest_regno, mult_val, add_val, benefit, ! forces, forces2, DEST_REG, maybe_never, 0, loop_end); /* Skip the consecutive insns, if there are any. */ *************** *** 2337,2341 **** still does. */ if (GET_CODE (p) == INSN) ! find_mem_givs (PATTERN (p), p, maybe_never); #endif --- 2406,2410 ---- still does. */ if (GET_CODE (p) == INSN) ! find_mem_givs (PATTERN (p), p, maybe_never, loop_end); #endif *************** *** 2375,2436 **** ??? That should be only on machines that have dbra insns. */ if ((uid_luid[regno_last_uid[bl->regno]] < INSN_LUID (loop_end) ! && uid_luid[regno_first_uid[bl->regno]] > INSN_LUID (loop_start) ! && bl->init_val_set && ! bl->nonneg) || (final_value = final_biv_value (bl, loop_end))) ! { ! /* Get the REG rtx for the biv. */ ! rtx reg = SET_DEST (PATTERN (bl->biv->insn)); ! ! for (p = loop_start; p != end; p = NEXT_INSN (p)) ! { ! enum rtx_code code = GET_CODE (p); ! if ((code == INSN || code == JUMP_INSN || code == CALL_INSN) ! && reg_mentioned_p (reg, PATTERN (p))) ! { ! /* This insn uses the biv. If we can't understand it, ! then we can't eliminate the biv. */ ! if (GET_CODE (PATTERN (p)) != SET) ! break; ! ! /* The insns that increment the biv are no problem. */ ! if (SET_DEST (PATTERN (p)) == reg) ! continue; ! ! /* If can rewrite this insn not to use the biv, it's ok. */ ! if (can_eliminate_biv_p (p, bl)) ! continue; ! ! /* If this is an insn which computes a giv, no problem, ! because it will go away if the giv is reduced. */ ! for (v = bl->giv; v; v = v->family) ! if (!v->ignore && v->insn == p && v->giv_type == DEST_REG) ! break; ! if (v) ! continue; ! ! /* Biv is used in a way we cannot eliminate. */ ! break; ! } ! } ! ! if (p == end) ! { ! bl->eliminable = 1; ! if (loop_dump_stream) ! fprintf (loop_dump_stream, "Can eliminate biv %d.\n", ! bl->regno); ! } ! else if (loop_dump_stream) ! fprintf (loop_dump_stream, ! "Cannot eliminate biv %d due to insn %d.\n", ! bl->regno, INSN_UID (p)); ! } else { if (loop_dump_stream) ! fprintf (loop_dump_stream, ! "Cannot eliminate biv %d: used outside the loop\n", ! bl->regno); } --- 2444,2474 ---- ??? That should be only on machines that have dbra insns. */ + /* Compare against bl->init_insn rather than loop_start. + We aren't concerned with any uses of the biv between + init_insn and loop_start since these won't be affected + by the value of the biv elsewhere in the function, so + long as init_insn doesn't use the biv itself. + March 14, 1989 -- self@bayes.arc.nasa.gov */ + if ((uid_luid[regno_last_uid[bl->regno]] < INSN_LUID (loop_end) ! && bl->init_insn ! && uid_luid[regno_first_uid[bl->regno]] >= INSN_LUID (bl->init_insn) ! && ! reg_mentioned_p (SET_DEST (PATTERN (bl->biv->insn)), ! SET_SRC (PATTERN (bl->init_insn))) ! && ! bl->nonneg) || (final_value = final_biv_value (bl, loop_end))) ! check_eliminate_biv (bl, loop_start, end, 0); else { if (loop_dump_stream) ! { ! fprintf (loop_dump_stream, ! "Cannot eliminate biv %d.\n", ! bl->regno); ! fprintf (loop_dump_stream, ! "First use: insn %d, last use: insn %d.\n", ! regno_first_uid[bl->regno], ! regno_last_uid[bl->regno]); ! } } *************** *** 2499,2504 **** --- 2537,2558 ---- (undo the subtraction of ADD_BENEFIT that was done above). */ + /* If an insn is not to be strength reduced, then set its ignore + flag, and clear all_reduced. */ + /* Is it right to consider times_used? */ + /* ??? What about the insns that are 'forced' by this one? + Although this insn is not worthwhile to reduce, it may be + worthwhile to reduce the simpler givs used to compute this + complex giv. */ + + /* ??? Hey! If a giv has its forces field set, then that means + it is not computed directly from the biv, it is instead computed + from a simpler giv. If we define UNFORCE_INSNS, then the simpler + giv will be considered for strength reduction, and this giv should + not cause all_reduced to be cleared because it DOESN'T use the + biv!!! If the simpler giv can not be reduced, then that simpler + biv will still cause all_reduced to be cleared. */ + if (benefit <= 0) { *************** *** 2507,2510 **** --- 2561,2565 ---- INSN_UID (v->insn)); v->ignore = 1; + all_reduced = 0; } *************** *** 2517,2520 **** --- 2572,2576 ---- v->lifetime * threshold * benefit, insn_count); v->ignore = 1; + all_reduced = 0; } *************** *** 2537,2540 **** --- 2593,2597 ---- INSN_UID (v->insn)); v->ignore = 1; + all_reduced = 0; } } *************** *** 2564,2570 **** for (tv = bl->biv; tv; tv = tv->family) { if (tv->mult_val == const1_rtx) emit_iv_inc (tv->add_val, v->mult_val, ! new_reg, tv->insn); else /* tv->mult_val == const0_rtx */ /* A multiply is acceptable here --- 2621,2647 ---- for (tv = bl->biv; tv; tv = tv->family) { + struct induction *iv; + rtx before_insn = tv->insn; + + /* If this increment is between the setting of the giv and + its use, don't increment until after the use. */ + for (iv = v; iv; iv = iv->same) + { + if (INSN_LUID (tv->insn) <= INSN_LUID (iv->insn) + && ((iv->forces + && (INSN_LUID (tv->insn) + >= INSN_LUID (iv->forces->insn)) + || (iv->forces2 + && (INSN_LUID (tv->insn) + >= INSN_LUID (iv->forces2->insn)))))) + { + before_insn = NEXT_INSN (iv->insn); + break; + } + } + if (tv->mult_val == const1_rtx) emit_iv_inc (tv->add_val, v->mult_val, ! new_reg, before_insn); else /* tv->mult_val == const0_rtx */ /* A multiply is acceptable here *************** *** 2571,2575 **** since this is presumed to be seldom executed. */ emit_iv_init_code (tv->add_val, v->mult_val, ! v->add_val, new_reg, tv->insn); } --- 2648,2652 ---- since this is presumed to be seldom executed. */ emit_iv_init_code (tv->add_val, v->mult_val, ! v->add_val, new_reg, before_insn); } *************** *** 2601,2620 **** /* If giv lives after end of loop, emit insn to copy reduced reg into old reg, ! at the end of the loop. */ if (uid_luid[regno_last_uid[tv->dest_regno]] > uid_luid[INSN_UID (loop_end)]) ! emit_insn_after (gen_rtx (SET, VOIDmode, ! SET_DEST (PATTERN (tv->insn)), ! new_reg), ! loop_end); } else { /* Put new insn after, not before, in case ! tv->insn is the end of a libcall. */ emit_insn_after (gen_rtx (SET, VOIDmode, SET_DEST (PATTERN (tv->insn)), new_reg), ! tv->insn); } --- 2678,2716 ---- /* If giv lives after end of loop, emit insn to copy reduced reg into old reg, ! at the end of the loop. ! ?? insufficient; used before loop could ! mean live after loop, due to surrounding loop. */ ! /* Currently a giv used outside ! the loop will not be marked replaceable, ! so these deficiencies don't really hurt. */ if (uid_luid[regno_last_uid[tv->dest_regno]] > uid_luid[INSN_UID (loop_end)]) ! { ! /* ?? This won't work. We need to do this at ! ALL exits. */ ! emit_insn_after (gen_rtx (SET, VOIDmode, ! SET_DEST (PATTERN (tv->insn)), ! new_reg), ! loop_end); ! abort (); ! } } else { + /* Not replaceable; emit an insn to set the + original giv reg from the reduced giv. */ + + int count; + rtx after_insn = tv->insn; + + for (count = tv->consec; count > 0; count--) + after_insn = next_real_insn (after_insn); + /* Put new insn after, not before, in case ! after_insn is the end of a libcall. */ emit_insn_after (gen_rtx (SET, VOIDmode, SET_DEST (PATTERN (tv->insn)), new_reg), ! after_insn); } *************** *** 2630,2633 **** --- 2726,2730 ---- /* One set of equivalent givs has been strength-reduced. */ } + #if 0 else if (v->new_reg == 0) { *************** *** 2641,2644 **** --- 2738,2742 ---- all_reduced = 0; } + #endif } *************** *** 2671,2674 **** --- 2769,2778 ---- delete_insn (v->insn); + /* ?? If we created a new test to bypass the loop entirely, + or otherwise drop straight in, based on this test, then + we might want to rewrite it also. This way some later + pass has more hope of removing the intialization of this + biv entirely. */ + /* If final_value != 0, then biv may be used after loop end and we must emit an insn to set it just in case. */ *************** *** 2690,2693 **** --- 2794,2857 ---- || GET_CODE (p) == CALL_INSN) replace_regs (PATTERN (p), reg_map, nregs); + + if (loop_dump_stream) + fprintf (loop_dump_stream, "\n"); + } + \f + /* Nonzero if register REG appears somewhere within IN, except in + subexpressions EQ to EXPR. This is a modification of reg_mentioned_p. */ + + int + only_reg_use_p (reg, expr, in) + register rtx reg, expr, in; + { + register char *fmt; + register int i; + register enum rtx_code code; + + if (in == 0) + return 0; + + if (reg == expr) + return 0; + + if (reg == in) + return 1; + + code = GET_CODE (in); + + switch (code) + { + /* Compare registers by number. */ + case REG: + return GET_CODE (reg) == REG && REGNO (in) == REGNO (reg); + + /* These codes have no constituent expressions + and are unique. */ + case CC0: + case PC: + case CONST_INT: + case CONST_DOUBLE: + case SYMBOL_REF: + case CODE_LABEL: + return 0; + } + + fmt = GET_RTX_FORMAT (code); + + for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) + { + if (fmt[i] == 'E') + { + register int j; + for (j = XVECLEN (in, i) - 1; j >= 0; j--) + if (only_reg_use_p (reg, expr, XVECEXP (in, i, j))) + return 1; + } + else if (fmt[i] == 'e' + && only_reg_use_p (reg, expr, XEXP (in, i))) + return 1; + } + return 0; } \f *************** *** 2697,2704 **** static void ! find_mem_givs (x, insn, maybe_never) rtx x; rtx insn; int maybe_never; { register int i, j; --- 2861,2869 ---- static void ! find_mem_givs (x, insn, maybe_never, loop_end) rtx x; rtx insn; int maybe_never; + rtx loop_end; { register int i, j; *************** *** 2745,2749 **** record_giv (v, insn, src_regno, 0, mult_val, add_val, benefit, ! forces, forces2, DEST_ADDR, maybe_never, &XEXP (x, 0)); } return; --- 2910,2915 ---- record_giv (v, insn, src_regno, 0, mult_val, add_val, benefit, ! forces, forces2, DEST_ADDR, maybe_never, &XEXP (x, 0), ! loop_end); } return; *************** *** 2756,2763 **** for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) if (fmt[i] == 'e') ! find_mem_givs (XEXP (x, i), insn, maybe_never); else if (fmt[i] == 'E') for (j = 0; j < XVECLEN (x, i); j++) ! find_mem_givs (XVECEXP (x, i, j), insn, maybe_never); } \f --- 2922,2929 ---- for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--) if (fmt[i] == 'e') ! find_mem_givs (XEXP (x, i), insn, maybe_never, loop_end); else if (fmt[i] == 'E') for (j = 0; j < XVECLEN (x, i); j++) ! find_mem_givs (XVECEXP (x, i, j), insn, maybe_never, loop_end); } \f *************** *** 2779,2783 **** static void record_giv (v, insn, src_regno, dest_regno, mult_val, add_val, benefit, ! forces, forces2, type, maybe_never, location) struct induction *v; rtx insn; --- 2945,2949 ---- static void record_giv (v, insn, src_regno, dest_regno, mult_val, add_val, benefit, ! forces, forces2, type, maybe_never, location, loop_end) struct induction *v; rtx insn; *************** *** 2789,2792 **** --- 2955,2959 ---- int maybe_never; rtx *location; + rtx loop_end; { struct induction *b; *************** *** 2804,2807 **** --- 2971,2975 ---- if (type == DEST_ADDR) { + v->mode = GET_MODE (*location); v->consec = 0; v->lifetime = 1; *************** *** 2808,2813 **** v->times_used = 1; } ! else { v->consec = n_times_set[dest_regno] - 1; v->lifetime = (uid_luid[regno_last_uid[dest_regno]] --- 2976,2982 ---- v->times_used = 1; } ! else /* type == DEST_REG */ { + v->mode = GET_MODE (SET_DEST (PATTERN (insn))); v->consec = n_times_set[dest_regno] - 1; v->lifetime = (uid_luid[regno_last_uid[dest_regno]] *************** *** 2876,2880 **** v->family = bl->giv; bl->giv = v; ! bl->giv_count++; bl->total_benefit += benefit; } --- 3045,3052 ---- v->family = bl->giv; bl->giv = v; ! /* Don't count DEST_ADDR. This is supposed to count the number of ! insns that calculate givs. */ ! if (type == DEST_REG) ! bl->giv_count++; bl->total_benefit += benefit; } *************** *** 2900,2905 **** --- 3072,3083 ---- - no assignments to the biv occur during the giv's lifetime. */ + /* Is this right? Don't we need to make sure the giv is not used + outside the loop. Someday we will know where all the loop exits + are so we can do better, but until then.... + March 18, 1989 -- self@bayes.arc.nasa.gov */ + if (regno_first_uid[dest_regno] == INSN_UID (insn) /* Previous line always fails if INSN was moved by loop opt. */ + && uid_luid[regno_last_uid[dest_regno]] < INSN_LUID (loop_end) && (!maybe_never || last_use_this_basic_block (dest_regno, insn))) { *************** *** 3803,3806 **** --- 3981,3988 ---- */ + /* Do we need to add code to deal with constants other than CONST_INT's, + or will later passes recognize that the assembler can do the arithmetic? + March 16, 1989 -- self@bayes.arc.nasa.gov */ + static void emit_iv_init_code (b, m, a, reg, loop_start) *************** *** 3894,3901 **** else emit_insn_before (gen_rtx (SET, VOIDmode, reg, ! gen_rtx (PLUS, GET_MODE (reg), gen_rtx (CONST_INT, VOIDmode, ! const_val), ! a)), loop_start); break; --- 4076,4082 ---- else emit_insn_before (gen_rtx (SET, VOIDmode, reg, ! gen_rtx (PLUS, GET_MODE (reg), a, gen_rtx (CONST_INT, VOIDmode, ! const_val))), loop_start); break; *************** *** 4104,4111 **** if (GET_CODE (SET_SRC (PATTERN (p))) == REG) tested_before_loop = SET_SRC (PATTERN (p)); ! else if (GET_CODE (SET_SRC (PATTERN (p))) == MINUS ! && GET_CODE (XEXP (SET_SRC (PATTERN (p)), 1)) == REG && XEXP (SET_SRC (PATTERN (p)), 1) == const0_rtx) tested_before_loop = XEXP (SET_SRC (PATTERN (p)), 0); } } --- 4285,4296 ---- if (GET_CODE (SET_SRC (PATTERN (p))) == REG) tested_before_loop = SET_SRC (PATTERN (p)); ! else if (GET_CODE (SET_SRC (PATTERN (p))) == COMPARE ! && GET_CODE (XEXP (SET_SRC (PATTERN (p)), 0)) == REG && XEXP (SET_SRC (PATTERN (p)), 1) == const0_rtx) tested_before_loop = XEXP (SET_SRC (PATTERN (p)), 0); + else if (GET_CODE (SET_SRC (PATTERN (p))) == COMPARE + && GET_CODE (XEXP (SET_SRC (PATTERN (p)), 1)) == REG + && XEXP (SET_SRC (PATTERN (p)), 0) == const0_rtx) + tested_before_loop = XEXP (SET_SRC (PATTERN (p)), 1); } } *************** *** 4214,4218 **** = GET_CODE (XEXP (SET_SRC (PATTERN (PREV_INSN (loop_end))), 0)); src_two_before_end ! = PATTERN (PREV_INSN (PREV_INSN (loop_end))); if (bl->initial_value == const0_rtx --- 4399,4403 ---- = GET_CODE (XEXP (SET_SRC (PATTERN (PREV_INSN (loop_end))), 0)); src_two_before_end ! = SET_SRC (PATTERN (PREV_INSN (PREV_INSN (loop_end)))); if (bl->initial_value == const0_rtx *************** *** 4313,4316 **** --- 4498,4577 ---- } \f + /* Verify whether the biv BL appears to be eliminable, + based on the insns in the loop that refer to it. + LOOP_START is the first insn of the loop, and END is the end insn. */ + + static void + check_eliminate_biv (bl, loop_start, end) + struct iv_class *bl; + rtx loop_start; + rtx end; + { + /* Get the REG rtx for the biv. */ + rtx reg = SET_DEST (PATTERN (bl->biv->insn)); + rtx p; + struct induction *v; + + bl->eliminable = 0; + + for (p = loop_start; p != end; p = NEXT_INSN (p)) + { + enum rtx_code code = GET_CODE (p); + if ((code == INSN || code == JUMP_INSN || code == CALL_INSN) + && reg_mentioned_p (reg, PATTERN (p))) + { + /* This insn uses the biv. If we can't understand it, + then we can't eliminate the biv. */ + if (GET_CODE (PATTERN (p)) != SET) + { + if (loop_dump_stream) + fprintf (loop_dump_stream, + "Cannot eliminate biv %d: cannot understand insn %d.\n", + bl->regno, INSN_UID (p)); + break; + } + + /* The insns that increment the biv are no problem. */ + if (SET_DEST (PATTERN (p)) == reg) + continue; + + /* If this is an insn which uses the biv ONLY in the + calculation of a giv which is in the family of this + biv, it's ok becuase it will go away when the giv is + reduced. March 14, 1989 -- self@bayes.arc.nasa.gov */ + for (v = bl->giv; v; v = v->family) + if (v->insn == p) + { + if (v->giv_type == DEST_REG + || (v->giv_type == DEST_ADDR + && ! only_reg_use_p (reg, *(v->location), + PATTERN (p)))) + break; + } + if (v) + continue; + + /* If can rewrite this insn not to use the biv, it's ok. */ + if (can_eliminate_biv_p (p, bl)) + continue; + + /* Biv is used in a way we cannot eliminate. */ + if (loop_dump_stream) + fprintf (loop_dump_stream, + "Cannot eliminate biv %d: biv used in insn %d.\n", + bl->regno, INSN_UID (p)); + break; + } + } + + if (p == end) + { + bl->eliminable = 1; + if (loop_dump_stream) + fprintf (loop_dump_stream, "Can eliminate biv %d.\n", + bl->regno); + } + } + \f /* Return 1 if INSN, a compare insn which tests the biv described by BL, can be rewritten to use instead some reduced giv related to that biv. *************** *** 4334,4338 **** int arg_operand; /* Mode of this biv. */ ! enum machine_mode mode = GET_MODE (SET_DEST (PATTERN (bl->biv->insn))); if (SET_DEST (PATTERN (insn)) != cc0_rtx) --- 4595,4599 ---- int arg_operand; /* Mode of this biv. */ ! enum machine_mode mode = bl->biv->mode; if (SET_DEST (PATTERN (insn)) != cc0_rtx) *************** *** 4347,4364 **** case REG: /* Can replace with any giv that has (MULT_VAL != 0) and (ADD_VAL == 0) ! and make sure it was strength reduced by checking for NEW_REG != 0 */ for (v = bl->giv; v; v = v->family) ! if (v->mult_val != const0_rtx && v->add_val == const0_rtx ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) return 1; /* Look for a giv with (MULT_VAL != 0) and (ADD_VAL != 0); ! replace test insn with a compare insn (cmp REDUCED_GIV ADD_VAL) */ for (v = bl->giv; v; v = v->family) ! if (v->mult_val != const0_rtx ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) return 1; return 0; --- 4608,4634 ---- case REG: /* Can replace with any giv that has (MULT_VAL != 0) and (ADD_VAL == 0) ! Require a constant integer for MULT_VAL, so we know it's nonzero. */ for (v = bl->giv; v; v = v->family) ! if (GET_CODE (v->mult_val) == CONST_INT && v->mult_val != const0_rtx ! && v->add_val == const0_rtx ! && ! v->ignore ! && v->mode == mode) return 1; /* Look for a giv with (MULT_VAL != 0) and (ADD_VAL != 0); ! replace test insn with a compare insn (cmp REDUCED_GIV ADD_VAL). ! Require a constant integer for MULT_VAL, so we know it's nonzero. */ for (v = bl->giv; v; v = v->family) ! if (GET_CODE (v->mult_val) == CONST_INT && v->mult_val != const0_rtx ! && ! v->ignore ! && v->mode == mode) return 1; + + if (loop_dump_stream) + fprintf (loop_dump_stream, "Cannot eliminate biv %d in test insn %d: no appropriate giv.\n", + bl->regno, INSN_UID (insn)); + return 0; *************** *** 4385,4389 **** if (GET_CODE (v->mult_val) == CONST_INT && GET_CODE (v->add_val) == CONST_INT ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) return 1; --- 4655,4660 ---- if (GET_CODE (v->mult_val) == CONST_INT && GET_CODE (v->add_val) == CONST_INT ! && ! v->ignore ! && v->mode == mode) return 1; *************** *** 4394,4398 **** for (v = bl->giv; v; v = v->family) if (GET_CODE (v->mult_val) == CONST_INT ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) return 1; } --- 4665,4670 ---- for (v = bl->giv; v; v = v->family) if (GET_CODE (v->mult_val) == CONST_INT ! && ! v->ignore ! && v->mode == mode) return 1; } *************** *** 4408,4412 **** for (v = bl->giv; v; v = v->family) if ((GET_CODE (v->mult_val) == CONST_INT) ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) return 1; } --- 4680,4685 ---- for (v = bl->giv; v; v = v->family) if ((GET_CODE (v->mult_val) == CONST_INT) ! && ! v->ignore ! && v->mode == mode) return 1; } *************** *** 4420,4424 **** values for mult_val and add_val. */ for (v = bl->giv; v; v = v->family) ! if (GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) { for (tv = class_struct[REGNO (arg)]->giv; tv; tv = tv->family) --- 4693,4698 ---- values for mult_val and add_val. */ for (v = bl->giv; v; v = v->family) ! if (v->mode == mode ! && ! v->ignore) { for (tv = class_struct[REGNO (arg)]->giv; tv; tv = tv->family) *************** *** 4426,4430 **** && rtx_equal_p (tv->mult_val, v->mult_val) && rtx_equal_p (tv->mult_val, v->mult_val) ! && GET_MODE (SET_DEST (PATTERN (tv->insn))) == mode) return 1; } --- 4700,4705 ---- && rtx_equal_p (tv->mult_val, v->mult_val) && rtx_equal_p (tv->mult_val, v->mult_val) ! && ! tv->ignore ! && tv->mode == mode) return 1; } *************** *** 4455,4459 **** int arg_operand; /* Mode of this biv. */ ! enum machine_mode mode = GET_MODE (SET_DEST (PATTERN (bl->biv->insn))); switch (code) --- 4730,4734 ---- int arg_operand; /* Mode of this biv. */ ! enum machine_mode mode = bl->biv->mode; switch (code) *************** *** 4461,4471 **** /* a test insn */ case REG: ! /* Can replace with any giv ! that has (MULT_VAL != 0) and (ADD_VAL == 0). */ for (v = bl->giv; v; v = v->family) ! if (v->mult_val != const0_rtx && v->add_val == const0_rtx && v->new_reg != 0 ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) break; if (v) --- 4736,4748 ---- /* a test insn */ case REG: ! /* Can replace with any giv that was reduced and ! that has (MULT_VAL != 0) and (ADD_VAL == 0). ! Require a constant integer for MULT_VAL, so we know it's nonzero. */ for (v = bl->giv; v; v = v->family) ! if (GET_CODE (v->mult_val) == CONST_INT && v->mult_val != const0_rtx ! && v->add_val == const0_rtx && v->new_reg != 0 ! && v->mode == mode) break; if (v) *************** *** 4477,4485 **** /* Look for a giv with (MULT_VAL != 0) and (ADD_VAL != 0); ! replace test insn with a compare insn (cmp REDUCED_GIV ADD_VAL) */ for (v = bl->giv; v; v = v->family) ! if (v->mult_val != const0_rtx && v->new_reg != 0 ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) break; if (v) --- 4754,4764 ---- /* Look for a giv with (MULT_VAL != 0) and (ADD_VAL != 0); ! replace test insn with a compare insn (cmp REDUCED_GIV ADD_VAL). ! Require a constant integer for MULT_VAL, so we know it's nonzero. */ for (v = bl->giv; v; v = v->family) ! if (GET_CODE (v->mult_val) == CONST_INT && v->mult_val != const0_rtx ! && v->new_reg != 0 ! && v->mode == mode) break; if (v) *************** *** 4486,4490 **** { /* Replace biv with the giv's reduced register. */ ! SET_SRC (PATTERN (insn)) = gen_rtx (MINUS, GET_MODE (v->new_reg), v->new_reg, v->add_val); --- 4765,4769 ---- { /* Replace biv with the giv's reduced register. */ ! SET_SRC (PATTERN (insn)) = gen_rtx (COMPARE, GET_MODE (v->new_reg), v->new_reg, v->add_val); *************** *** 4525,4529 **** && GET_CODE (v->add_val) == CONST_INT && v->new_reg ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) break; if (v) --- 4804,4808 ---- && GET_CODE (v->add_val) == CONST_INT && v->new_reg ! && v->mode == mode) break; if (v) *************** *** 4544,4548 **** if (GET_CODE (v->mult_val) == CONST_INT && v->new_reg ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) break; if (v) --- 4823,4827 ---- if (GET_CODE (v->mult_val) == CONST_INT && v->new_reg ! && v->mode == mode) break; if (v) *************** *** 4574,4578 **** if (GET_CODE (v->mult_val) == CONST_INT && v->new_reg ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) break; if (v) --- 4853,4857 ---- if (GET_CODE (v->mult_val) == CONST_INT && v->new_reg ! && v->mode == mode) break; if (v) *************** *** 4588,4593 **** loop_start); emit_insn_before (gen_rtx (SET, VOIDmode, compare_value, ! gen_rtx (PLUS, mode, v->add_val, ! compare_value)), loop_start); XEXP (src, arg_operand) = compare_value; --- 4867,4873 ---- loop_start); emit_insn_before (gen_rtx (SET, VOIDmode, compare_value, ! gen_rtx (PLUS, mode, ! compare_value, ! v->add_val)), loop_start); XEXP (src, arg_operand) = compare_value; *************** *** 4605,4610 **** for (v = bl->giv; v; v = v->family) { ! if (!v->new_reg ! && GET_MODE (SET_DEST (PATTERN (v->insn))) == mode) continue; for (tv = class_struct[REGNO (arg)]->giv; tv; tv = tv->family) --- 4885,4889 ---- for (v = bl->giv; v; v = v->family) { ! if (!v->new_reg && v->mode == mode) continue; for (tv = class_struct[REGNO (arg)]->giv; tv; tv = tv->family) *************** *** 4612,4616 **** && rtx_equal_p (tv->mult_val, v->mult_val) && rtx_equal_p (tv->mult_val, v->mult_val) ! && GET_MODE (SET_DEST (PATTERN (tv->insn))) == mode) break; if (tv) --- 4891,4895 ---- && rtx_equal_p (tv->mult_val, v->mult_val) && rtx_equal_p (tv->mult_val, v->mult_val) ! && tv->mode == mode) break; if (tv) diff -rc2N gcc-1.34/machmode.def gcc-1.35/machmode.def *** gcc-1.34/machmode.def Wed Feb 22 12:29:50 1989 --- gcc-1.35/machmode.def Sun Apr 2 13:01:50 1989 *************** *** 54,57 **** --- 54,62 ---- since they are really made of two equal size subunits. */ + /* The compiler assumes that a mode may be widened to another + HIGHER NUMBERED mode if both those modes AND ALL MODES IN BETWEEN + are in the same mode class. Thus, you must should assign all + MODE_INT and MODE_FLOAT modes in separate contiguous blocks. */ + /* VOIDmode is used when no mode needs to be specified, as for example on CONST_INT RTL expressions. */ *************** *** 58,64 **** DEF_MACHMODE (VOIDmode, "VOID", MODE_RANDOM, 0, 0) ! DEF_MACHMODE (QImode, "QI", MODE_INT, 1, 1) /* signed types */ DEF_MACHMODE (HImode, "HI", MODE_INT, 2, 2) DEF_MACHMODE (SImode, "SI", MODE_INT, 4, 4) DEF_MACHMODE (DImode, "DI", MODE_INT, 8, 8) DEF_MACHMODE (TImode, "TI", MODE_INT, 16, 16) --- 63,74 ---- DEF_MACHMODE (VOIDmode, "VOID", MODE_RANDOM, 0, 0) ! DEF_MACHMODE (QImode, "QI", MODE_INT, 1, 1) /* int types */ DEF_MACHMODE (HImode, "HI", MODE_INT, 2, 2) + /* Pointers on some machines use this type to distinguish them from ints. + Useful if a pointer is 4 bytes but has some bits that are not significant, + so it is really not quite as wide as an integer. */ + DEF_MACHMODE (PSImode, "PSI", MODE_INT, 4, 4) DEF_MACHMODE (SImode, "SI", MODE_INT, 4, 4) + DEF_MACHMODE (PDImode, "PDI", MODE_INT, 8, 8) DEF_MACHMODE (DImode, "DI", MODE_INT, 8, 8) DEF_MACHMODE (TImode, "TI", MODE_INT, 16, 16) *************** *** 67,70 **** --- 77,81 ---- DEF_MACHMODE (SFmode, "SF", MODE_FLOAT, 4, 4) DEF_MACHMODE (DFmode, "DF", MODE_FLOAT, 8, 8) + DEF_MACHMODE (XFmode, "XF", MODE_FLOAT, 12, 12) /* IEEE extended float */ DEF_MACHMODE (TFmode, "TF", MODE_FLOAT, 16, 16) DEF_MACHMODE (CQImode, "CQI", MODE_COMPLEX_INT, 2, 1) *************** *** 77,80 **** --- 88,92 ---- DEF_MACHMODE (CSFmode, "CSF", MODE_COMPLEX_FLOAT, 8, 4) DEF_MACHMODE (CDFmode, "CDF", MODE_COMPLEX_FLOAT, 16, 8) + DEF_MACHMODE (CXFmode, "CXF", MODE_COMPLEX_FLOAT, 24, 12) DEF_MACHMODE (CTFmode, "CTF", MODE_COMPLEX_FLOAT, 32, 16) diff -rc2N gcc-1.34/make-cc1.com gcc-1.35/make-cc1.com *** gcc-1.34/make-cc1.com Wed Dec 14 23:01:14 1988 --- gcc-1.35/make-cc1.com Mon Mar 13 19:54:12 1989 *************** *** 113,117 **** --- 113,119 ---- $ gcc/debug/cc1_options="-mpcc-alignment" insn-output.c $ gcc/debug/cc1_options="-mpcc-alignment" integrate.c + $ gcc/debug/cc1_options="-mpcc-alignment" caller-save.c $! + $! $! Link it $! *************** *** 125,129 **** jump,cse,loop,flow,stupid,combine,regclass,local-alloc,global-alloc,reload,- reload1,insn-peep,final,recog,insn-recog,insn-extract,insn-output,obstack,- ! integrate,- gnu_cc:[000000]gcclib/lib,sys$share:vaxcrtl/lib $! --- 127,131 ---- jump,cse,loop,flow,stupid,combine,regclass,local-alloc,global-alloc,reload,- reload1,insn-peep,final,recog,insn-recog,insn-extract,insn-output,obstack,- ! integrate,caller-save,- gnu_cc:[000000]gcclib/lib,sys$share:vaxcrtl/lib $! diff -rc2N gcc-1.34/obstack.c gcc-1.35/obstack.c *** gcc-1.34/obstack.c Wed Feb 22 11:45:24 1989 --- gcc-1.35/obstack.c Tue Mar 28 14:42:59 1989 *************** *** 158,168 **** #ifdef __STDC__ #undef obstack_free ! obstack_free (h, obj) ! #else _obstack_free (h, obj) - #endif struct obstack *h; POINTER obj; { register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */ --- 158,167 ---- #ifdef __STDC__ #undef obstack_free ! obstack_free (struct obstack *h, POINTER obj) #else _obstack_free (h, obj) struct obstack *h; POINTER obj; + #endif { register struct _obstack_chunk* lp; /* below addr of any objects in this chunk */ diff -rc2N gcc-1.34/optabs.c gcc-1.35/optabs.c *** gcc-1.34/optabs.c Wed Feb 22 12:22:30 1989 --- gcc-1.35/optabs.c Tue Apr 4 19:47:48 1989 *************** *** 29,32 **** --- 29,36 ---- #include "recog.h" + /* In ANSI C we could write MODE + 1, but traditional C compilers + seem to reject it. */ + #define INC_MODE(MODE) (enum machine_mode) ((int)(MODE) + 1) + /* Each optab contains info on how this target machine can perform a particular operation *************** *** 106,112 **** --- 110,120 ---- enum optab_methods methods; { + enum mode_class class; + enum machine_mode wider_mode; register rtx temp; rtx last = get_last_insn (); + class = GET_MODE_CLASS (mode); + op0 = protect_from_queue (op0, 0); op1 = protect_from_queue (op1, 0); *************** *** 246,256 **** } /* It can't be done in this mode. Can we do it in a wider mode? */ if (! (methods == OPTAB_WIDEN || methods == OPTAB_LIB_WIDEN)) ! { ! delete_insns_since (last); ! return 0; /* Caller says, don't even try. */ ! } /* Compute the value of METHODS to pass to recursive calls. --- 254,263 ---- } + delete_insns_since (last); + /* It can't be done in this mode. Can we do it in a wider mode? */ if (! (methods == OPTAB_WIDEN || methods == OPTAB_LIB_WIDEN)) ! return 0; /* Caller says, don't even try. */ /* Compute the value of METHODS to pass to recursive calls. *************** *** 259,334 **** methods = (methods == OPTAB_LIB_WIDEN ? OPTAB_LIB : OPTAB_DIRECT); ! if ((mode == HImode || mode == QImode) ! && (binoptab->handlers[(int) SImode].insn_code != CODE_FOR_nothing ! || (methods == OPTAB_LIB ! && binoptab->handlers[(int) SImode].lib_call))) ! { ! rtx xop0 = op0, xop1 = op1; ! ! if (GET_MODE (xop0) != VOIDmode) ! { ! temp = gen_reg_rtx (SImode); ! convert_move (temp, xop0, unsignedp); ! xop0 = temp; ! } ! if (GET_MODE (xop1) != VOIDmode) ! { ! temp = gen_reg_rtx (SImode); ! convert_move (temp, xop1, unsignedp); ! xop1 = temp; ! } ! ! temp = expand_binop (SImode, binoptab, xop0, xop1, 0, ! unsignedp, methods); ! if (temp) ! return gen_lowpart (mode, temp); ! else ! delete_insns_since (last); ! } ! if ((mode == HImode || mode == QImode || mode == SImode) ! && (binoptab->handlers[(int) DImode].insn_code != CODE_FOR_nothing ! || (methods == OPTAB_LIB ! && binoptab->handlers[(int) DImode].lib_call))) ! { ! rtx xop0 = op0, xop1 = op1; ! ! temp = gen_reg_rtx (DImode); ! convert_move (temp, xop0, unsignedp); ! xop0 = temp; ! temp = gen_reg_rtx (DImode); ! convert_move (temp, xop1, unsignedp); ! xop1 = temp; ! ! temp = expand_binop (DImode, binoptab, xop0, xop1, 0, ! unsignedp, methods); ! if (temp) ! return gen_lowpart (mode, temp); ! else ! delete_insns_since (last); ! } ! if (mode == SFmode ! && (binoptab->handlers[(int) DFmode].insn_code != CODE_FOR_nothing ! || (methods == OPTAB_LIB ! && binoptab->handlers[(int) DFmode].lib_call))) ! { ! rtx xop0 = op0, xop1 = op1; ! temp = gen_reg_rtx (DFmode); ! convert_move (temp, xop0, 0); ! xop0 = temp; ! temp = gen_reg_rtx (DFmode); ! convert_move (temp, xop1, 0); ! xop1 = temp; ! ! temp = expand_binop (DFmode, binoptab, xop0, xop1, 0, 0, methods); ! if (temp) ! { ! if (target == 0) ! target = gen_reg_rtx (SFmode); ! convert_move (target, temp, 0); ! return target; } } ! delete_insns_since (last); return 0; } --- 266,320 ---- methods = (methods == OPTAB_LIB_WIDEN ? OPTAB_LIB : OPTAB_DIRECT); ! /* Widening is now independent of specific machine modes. ! It is assumed that widening may be performed to any ! higher numbered mode in the same mode class. */ ! if (class == MODE_INT || class == MODE_FLOAT) ! { ! for (wider_mode = INC_MODE (mode); ! ((int) wider_mode < (int) MAX_MACHINE_MODE ! && GET_MODE_CLASS (wider_mode) == class); ! wider_mode = INC_MODE (wider_mode)) ! { ! if ((binoptab->handlers[(int) wider_mode].insn_code ! != CODE_FOR_nothing) ! || (methods == OPTAB_LIB ! && binoptab->handlers[(int) wider_mode].lib_call)) ! { ! rtx xop0 = op0, xop1 = op1; ! ! if (GET_MODE (xop0) != VOIDmode) ! { ! temp = gen_reg_rtx (wider_mode); ! convert_move (temp, xop0, unsignedp); ! xop0 = temp; ! } ! if (GET_MODE (xop1) != VOIDmode) ! { ! temp = gen_reg_rtx (wider_mode); ! convert_move (temp, xop1, unsignedp); ! xop1 = temp; ! } ! ! temp = expand_binop (wider_mode, binoptab, xop0, xop1, 0, ! unsignedp, methods); ! if (temp) ! { ! if (class == MODE_FLOAT) ! { ! if (target == 0) ! target = gen_reg_rtx (mode); ! convert_move (target, temp, 0); ! return target; ! } ! else ! return gen_lowpart (mode, temp); ! } ! else ! delete_insns_since (last); ! } } } ! return 0; } *************** *** 411,415 **** --- 397,405 ---- { enum machine_mode mode = GET_MODE (targ0 ? targ0 : targ1); + enum mode_class class; + enum machine_mode wider_mode; + class = GET_MODE_CLASS (mode); + op0 = protect_from_queue (op0, 0); op1 = protect_from_queue (op1, 0); *************** *** 439,462 **** /* It can't be done in this mode. Can we do it in a wider mode? */ ! if ((mode == HImode || mode == QImode) ! && binoptab->handlers[(int) SImode].insn_code != CODE_FOR_nothing) ! { ! expand_twoval_binop_convert (binoptab, SImode, op0, op1, ! targ0, targ1, unsignedp); ! return 1; ! } ! if ((mode == HImode || mode == QImode || mode == SImode) ! && binoptab->handlers[(int) DImode].insn_code != CODE_FOR_nothing) ! { ! expand_twoval_binop_convert (binoptab, DImode, op0, op1, ! targ0, targ1, unsignedp); ! return 1; ! } ! if (mode == SFmode ! && binoptab->handlers[(int) DFmode].insn_code != CODE_FOR_nothing) { ! expand_twoval_binop_convert (binoptab, DFmode, op0, op1, ! targ0, targ1, unsignedp); ! return 1; } return 0; --- 429,447 ---- /* It can't be done in this mode. Can we do it in a wider mode? */ ! if (class == MODE_INT || class == MODE_FLOAT) { ! for (wider_mode = INC_MODE (mode); ! ((int) wider_mode < (int) MAX_MACHINE_MODE ! && GET_MODE_CLASS (wider_mode) == class); ! wider_mode = INC_MODE (wider_mode)) ! { ! if (binoptab->handlers[(int) wider_mode].insn_code ! != CODE_FOR_nothing) ! { ! expand_twoval_binop_convert (binoptab, wider_mode, op0, op1, ! targ0, targ1, unsignedp); ! return 1; ! } ! } } return 0; *************** *** 505,510 **** --- 490,499 ---- int unsignedp; { + enum mode_class class; + enum machine_mode wider_mode; register rtx temp; + class = GET_MODE_CLASS (mode); + op0 = protect_from_queue (op0, 0); *************** *** 579,620 **** /* It can't be done in this mode. Can we do it in a wider mode? */ ! if ((mode == HImode || mode == QImode) ! && (unoptab->handlers[(int) SImode].insn_code != CODE_FOR_nothing ! || unoptab->handlers[(int) SImode].lib_call)) { ! if (GET_MODE (op0) != VOIDmode) ! { ! temp = gen_reg_rtx (SImode); ! convert_move (temp, op0, unsignedp); ! op0 = temp; } - - target = expand_unop (SImode, unoptab, op0, 0, unsignedp); - return gen_lowpart (mode, target); - } - if ((mode == HImode || mode == QImode || mode == SImode) - && (unoptab->handlers[(int) DImode].insn_code != CODE_FOR_nothing - || unoptab->handlers[(int) DImode].lib_call)) - { - temp = gen_reg_rtx (DImode); - convert_move (temp, op0, unsignedp); - op0 = temp; - - target = expand_unop (DImode, unoptab, op0, 0, unsignedp); - return gen_lowpart (mode, target); - } - if (mode == SFmode - && (unoptab->handlers[(int) DFmode].insn_code != CODE_FOR_nothing - || unoptab->handlers[(int) DFmode].lib_call)) - { - temp = gen_reg_rtx (DFmode); - convert_move (temp, op0, 0); - op0 = temp; - - temp = expand_unop (DFmode, unoptab, op0, 0, 0); - if (target == 0) - target = gen_reg_rtx (SFmode); - convert_move (target, temp, 0); - return target; } --- 568,601 ---- /* It can't be done in this mode. Can we do it in a wider mode? */ ! if (class == MODE_INT || class == MODE_FLOAT) { ! for (wider_mode = INC_MODE (mode); ! ((int) wider_mode < (int) MAX_MACHINE_MODE ! && GET_MODE_CLASS (wider_mode) == class); ! wider_mode = INC_MODE (wider_mode)) ! { ! if ((unoptab->handlers[(int) wider_mode].insn_code ! != CODE_FOR_nothing) ! || unoptab->handlers[(int) wider_mode].lib_call) ! { ! if (GET_MODE (op0) != VOIDmode) ! { ! temp = gen_reg_rtx (wider_mode); ! convert_move (temp, op0, unsignedp); ! op0 = temp; ! } ! ! target = expand_unop (wider_mode, unoptab, op0, 0, unsignedp); ! if (class == MODE_FLOAT) ! { ! if (target == 0) ! target = gen_reg_rtx (mode); ! convert_move (target, temp, 0); ! return target; ! } ! else ! return gen_lowpart (mode, target); ! } } } *************** *** 707,710 **** --- 688,696 ---- { enum machine_mode mode = GET_MODE (x); + enum mode_class class; + enum machine_mode wider_mode; + + class = GET_MODE_CLASS (mode); + if (mode == VOIDmode) mode = GET_MODE (y); /* They could both be VOIDmode if both args are immediate constants, *************** *** 719,722 **** --- 705,710 ---- } + /* Handle all BLKmode compares. */ + if (mode == BLKmode) { *************** *** 759,765 **** emit_cmp_insn (hard_libcall_value (SImode), const0_rtx, 0, 0, 0); } } ! else if ((y == const0_rtx || y == fconst0_rtx || y == dconst0_rtx) ! && tst_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) { int icode = (int) tst_optab->handlers[(int) mode].insn_code; --- 747,757 ---- emit_cmp_insn (hard_libcall_value (SImode), const0_rtx, 0, 0, 0); } + return; } ! ! /* Handle some compares against zero. */ ! ! if ((y == const0_rtx || y == fconst0_rtx || y == dconst0_rtx) ! && tst_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) { int icode = (int) tst_optab->handlers[(int) mode].insn_code; *************** *** 775,780 **** emit_insn (GEN_FCN (icode) (x)); } ! else if (cmp_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) { int icode = (int) cmp_optab->handlers[(int) mode].insn_code; --- 767,776 ---- emit_insn (GEN_FCN (icode) (x)); + return; } ! ! /* Handle compares for which there is a directly suitable insn. */ ! ! if (cmp_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing) { int icode = (int) cmp_optab->handlers[(int) mode].insn_code; *************** *** 794,820 **** emit_insn (GEN_FCN (icode) (x, y)); ! } ! else if ((mode == QImode || mode == HImode) ! && cmp_optab->handlers[(int) SImode].insn_code != CODE_FOR_nothing) ! { ! x = convert_to_mode (SImode, x, unsignedp); ! y = convert_to_mode (SImode, y, unsignedp); ! emit_cmp_insn (x, y, 0, unsignedp, 0); ! } ! else if ((mode == QImode || mode == HImode || mode == SImode) ! && cmp_optab->handlers[(int) DImode].insn_code != CODE_FOR_nothing) ! { ! x = convert_to_mode (DImode, x, unsignedp); ! y = convert_to_mode (DImode, y, unsignedp); ! emit_cmp_insn (x, y, 0, unsignedp, 0); ! } ! else if (mode == SFmode ! && cmp_optab->handlers[(int) DFmode].insn_code != CODE_FOR_nothing) ! { ! x = convert_to_mode (DFmode, x, unsignedp); ! y = convert_to_mode (DFmode, y, unsignedp); ! emit_cmp_insn (x, y, 0, unsignedp, 0); } ! else if (cmp_optab->handlers[(int) mode].lib_call) { char *string = cmp_optab->handlers[(int) mode].lib_call; --- 790,819 ---- emit_insn (GEN_FCN (icode) (x, y)); ! return; } ! ! /* Try widening if we can find a direct insn that way. */ ! ! if (class == MODE_INT || class == MODE_FLOAT) ! { ! for (wider_mode = INC_MODE (mode); ! ((int) wider_mode < (int) MAX_MACHINE_MODE ! && GET_MODE_CLASS (wider_mode) == class); ! wider_mode = INC_MODE (wider_mode)) ! { ! if (cmp_optab->handlers[(int) wider_mode].insn_code ! != CODE_FOR_nothing) ! { ! x = convert_to_mode (wider_mode, x, unsignedp); ! y = convert_to_mode (wider_mode, y, unsignedp); ! emit_cmp_insn (x, y, 0, unsignedp); ! return; ! } ! } ! } ! ! /* Handle a lib call just for the mode we are using. */ ! ! if (cmp_optab->handlers[(int) mode].lib_call) { char *string = cmp_optab->handlers[(int) mode].lib_call; *************** *** 834,848 **** else emit_cmp_insn (hard_libcall_value (SImode), const0_rtx, 0, 0, 0); } ! else if (mode == SFmode ! && (cmp_optab->handlers[(int) DFmode].insn_code != CODE_FOR_nothing ! || cmp_optab->handlers[(int) DFmode].lib_call != 0)) ! { ! x = convert_to_mode (DFmode, x, unsignedp); ! y = convert_to_mode (DFmode, y, unsignedp); ! emit_cmp_insn (x, y, 0, unsignedp, 0); } ! else ! abort (); } \f --- 833,861 ---- else emit_cmp_insn (hard_libcall_value (SImode), const0_rtx, 0, 0, 0); + return; } ! ! /* Try widening and then using a libcall. */ ! ! if (class == MODE_FLOAT) ! { ! for (wider_mode = INC_MODE (mode); ! ((int) wider_mode < (int) MAX_MACHINE_MODE ! && GET_MODE_CLASS (wider_mode) == class); ! wider_mode = INC_MODE (wider_mode)) ! { ! if ((cmp_optab->handlers[(int) wider_mode].insn_code ! != CODE_FOR_nothing) ! || (cmp_optab->handlers[(int) wider_mode].lib_call != 0)) ! { ! x = convert_to_mode (wider_mode, x, unsignedp); ! y = convert_to_mode (wider_mode, y, unsignedp); ! emit_cmp_insn (x, y, 0, unsignedp); ! } ! } ! return; } ! ! abort (); } \f diff -rc2N gcc-1.34/print-tree.c gcc-1.35/print-tree.c *** gcc-1.34/print-tree.c Wed Feb 22 11:56:00 1989 --- gcc-1.35/print-tree.c Mon Apr 24 15:28:27 1989 *************** *** 475,481 **** if (i >= first_rtl) { - fprintf (outfile, "\n"); skip (indent); print_rtl (outfile, TREE_OPERAND (node, i)); } else --- 475,481 ---- if (i >= first_rtl) { skip (indent); print_rtl (outfile, TREE_OPERAND (node, i)); + fprintf (outfile, "\n"); } else *************** *** 489,493 **** fputc ('\n', outfile); walk (TREE_TYPE (node), node, indent); ! for (i = 0; i < len; i++) walk (TREE_OPERAND (node, i), node, indent); break; --- 489,493 ---- fputc ('\n', outfile); walk (TREE_TYPE (node), node, indent); ! for (i = 0; i < len && i < first_rtl; i++) walk (TREE_OPERAND (node, i), node, indent); break; diff -rc2N gcc-1.34/recog.c gcc-1.35/recog.c *** gcc-1.34/recog.c Wed Feb 22 11:55:56 1989 --- gcc-1.35/recog.c Mon Apr 10 17:46:51 1989 *************** *** 30,33 **** --- 30,35 ---- static int inequality_comparisons_p (); + int strict_memory_address_p (); + int memory_address_p (); /* Nonzero means allow operands to be volatile. *************** *** 319,326 **** enum machine_mode mode; { ! if (CONSTANT_P (op) ! || (GET_CODE (op) == CONST_DOUBLE ! && (GET_MODE (op) == mode || mode == VOIDmode))) ! return LEGITIMATE_CONSTANT_P (op); if (GET_MODE (op) != mode && mode != VOIDmode) --- 321,327 ---- enum machine_mode mode; { ! if (CONSTANT_P (op) || GET_CODE (op) == CONST_DOUBLE) ! return ((GET_MODE (op) == VOIDmode || GET_MODE (op) == mode) ! && LEGITIMATE_CONSTANT_P (op)); if (GET_MODE (op) != mode && mode != VOIDmode) *************** *** 706,710 **** size of the object being referenced. ! We assume that the original address is valid and do not check it. */ int --- 707,714 ---- size of the object being referenced. ! We assume that the original address is valid and do not check it. ! ! This uses strict_memory_address_p as a subroutine, so ! don't use it before reload. */ int *************** *** 713,717 **** { return ((GET_CODE (op) == MEM) ! && offsetable_address_p (GET_MODE (op), XEXP (op, 0))); } --- 717,721 ---- { return ((GET_CODE (op) == MEM) ! && offsetable_address_p (1, GET_MODE (op), XEXP (op, 0))); } *************** *** 722,729 **** We assume that the original address is valid and do not check it. ! We require a strictly valid address, for the sake of use in reload.c. */ int ! offsetable_address_p (mode, y) enum machine_mode mode; register rtx y; --- 726,736 ---- We assume that the original address is valid and do not check it. ! ! If STRICTP is nonzero, we require a strictly valid address, ! for the sake of use in reload.c. */ int ! offsetable_address_p (strictp, mode, y) ! int strictp; enum machine_mode mode; register rtx y; *************** *** 733,736 **** --- 740,744 ---- rtx y1 = y; rtx *y2; + int (*addressp) () = (strictp ? strict_memory_address_p : memory_address_p); if (CONSTANT_ADDRESS_P (y)) *************** *** 745,749 **** int good; INTVAL (y1) += GET_MODE_SIZE (mode) - 1; ! good = strict_memory_address_p (mode, y); /* In any case, restore old contents of memory. */ INTVAL (y1) = old; --- 753,757 ---- int good; INTVAL (y1) += GET_MODE_SIZE (mode) - 1; ! good = (*addressp) (mode, y); /* In any case, restore old contents of memory. */ INTVAL (y1) = old; *************** *** 762,766 **** z = plus_constant (y, GET_MODE_SIZE (mode) - 1); ! return strict_memory_address_p (mode, z); } --- 770,774 ---- z = plus_constant (y, GET_MODE_SIZE (mode) - 1); ! return (*addressp) (mode, z); } diff -rc2N gcc-1.34/reload.c gcc-1.35/reload.c *** gcc-1.34/reload.c Wed Feb 22 12:28:53 1989 --- gcc-1.35/reload.c Tue Apr 25 17:07:00 1989 *************** *** 188,192 **** static int find_reloads_address_1 (); static int hard_reg_set_here_p (); ! static rtx forget_volatility (); static rtx subst_reg_equivs (); static rtx subst_indexed_address (); --- 188,192 ---- static int find_reloads_address_1 (); static int hard_reg_set_here_p (); ! /* static rtx forget_volatility (); */ static rtx subst_reg_equivs (); static rtx subst_indexed_address (); *************** *** 349,353 **** || GET_CODE (in) == PRE_DEC) && MATCHES (XEXP (in, 0), reload_in[i])))) ! break; if (i == n_reloads) --- 349,359 ---- || GET_CODE (in) == PRE_DEC) && MATCHES (XEXP (in, 0), reload_in[i])))) ! { ! /* Make sure reload_in ultimately has the increment, ! not the plain register. */ ! if (GET_CODE (in) == REG) ! in = reload_in[i]; ! break; ! } if (i == n_reloads) *************** *** 1311,1314 **** --- 1317,1328 ---- if ((GET_CODE (operand) == MEM && offsetable_memref_p (operand)) + /* Certain mem addresses will become offsetable + after they themselves are reloaded. This is important; + we don't want our own handling of unoffsetables + to override the handling of reg_equiv_address. */ + || (GET_CODE (operand) == MEM + && GET_CODE (XEXP (operand, 0)) == REG + && (! ind_ok + || reg_equiv_address[REGNO (XEXP (operand, 0))] != 0)) || (GET_CODE (operand) == REG && REGNO (operand) >= FIRST_PSEUDO_REGISTER *************** *** 1608,1612 **** == NO_REGS)) { ! enum machine_mode mode = GET_MODE (recog_operand[i]); *recog_operand_loc[i] = recog_operand[i] = (GET_CODE (recog_operand[i]) == CONST_DOUBLE --- 1622,1626 ---- == NO_REGS)) { ! enum machine_mode mode = operand_mode[i]; *recog_operand_loc[i] = recog_operand[i] = (GET_CODE (recog_operand[i]) == CONST_DOUBLE *************** *** 2312,2319 **** if (REG_OK_FOR_INDEX_P (op0) && REG_OK_FOR_BASE_P (op1)) ! return; else if (REG_OK_FOR_INDEX_P (op1) && REG_OK_FOR_BASE_P (op0)) ! return; else if (REG_OK_FOR_BASE_P (op1)) find_reloads_address_1 (op0, 1, &XEXP (x, 0)); --- 2326,2333 ---- if (REG_OK_FOR_INDEX_P (op0) && REG_OK_FOR_BASE_P (op1)) ! return 0; else if (REG_OK_FOR_INDEX_P (op1) && REG_OK_FOR_BASE_P (op0)) ! return 0; else if (REG_OK_FOR_BASE_P (op1)) find_reloads_address_1 (op0, 1, &XEXP (x, 0)); *************** *** 2426,2430 **** context ? INDEX_REG_CLASS : BASE_REG_CLASS, GET_MODE (x), 0, VOIDmode, 0); ! return; } #endif --- 2440,2444 ---- context ? INDEX_REG_CLASS : BASE_REG_CLASS, GET_MODE (x), 0, VOIDmode, 0); ! return 1; } #endif diff -rc2N gcc-1.34/reload1.c gcc-1.35/reload1.c *** gcc-1.34/reload1.c Wed Feb 22 12:28:47 1989 --- gcc-1.35/reload1.c Thu Mar 23 09:03:42 1989 *************** *** 188,192 **** static void choose_reload_targets (); static void delete_output_reload (); - static void forget_old_reloads (); static void forget_old_reloads_1 (); static void order_regs_for_reload (); --- 188,191 ---- *************** *** 436,440 **** insn_needs[i] = 0, insn_groups[i] = 0; ! #if 0 /* Optimization: a bit-field instruction whose field happens to be a byte or halfword in memory --- 435,440 ---- insn_needs[i] = 0, insn_groups[i] = 0; ! #if 0 /* This wouldn't work nowadays, since optimize_bit_field ! looks for non-strict memory addresses. */ /* Optimization: a bit-field instruction whose field happens to be a byte or halfword in memory *************** *** 671,688 **** { int j = potential_reload_regs[i]; if (j >= 0 && ! ((j > 0 && spill_reg_order[j - 1] >= 0 && TEST_HARD_REG_BIT (reg_class_contents[class], j) ! && TEST_HARD_REG_BIT (reg_class_contents[class], j - 1) ! && HARD_REGNO_MODE_OK (j - 1, group_mode[class]) ! && ! counted_for_nongroups[j - 1]) || (j < FIRST_PSEUDO_REGISTER - 1 ! && spill_reg_order[j + 1] >= 0 && TEST_HARD_REG_BIT (reg_class_contents[class], j) ! && TEST_HARD_REG_BIT (reg_class_contents[class], j + 1) && HARD_REGNO_MODE_OK (j, group_mode[class]) ! && ! counted_for_nongroups[j + 1]))) { register enum reg_class *p; --- 671,694 ---- { int j = potential_reload_regs[i]; + int other; if (j >= 0 && ! ((j > 0 && (other = j - 1, spill_reg_order[other] >= 0) && TEST_HARD_REG_BIT (reg_class_contents[class], j) ! && TEST_HARD_REG_BIT (reg_class_contents[class], other) ! && HARD_REGNO_MODE_OK (other, group_mode[class]) ! && ! counted_for_nongroups[other] ! /* We don't want one part of another group. ! We could get "two groups" that overlap! */ ! && ! counted_for_groups[other]) ! || (j < FIRST_PSEUDO_REGISTER - 1 ! && (other = j + 1, spill_reg_order[other] >= 0) && TEST_HARD_REG_BIT (reg_class_contents[class], j) ! && TEST_HARD_REG_BIT (reg_class_contents[class], other) && HARD_REGNO_MODE_OK (j, group_mode[class]) ! && ! counted_for_nongroups[other] ! && ! counted_for_groups[other]))) { register enum reg_class *p; *************** *** 694,697 **** --- 700,708 ---- while (*p != LIM_REG_CLASSES) max_groups[(int) *p++]--; + + /* Indicate both these regs are part of a group. */ + counted_for_groups[j] = 1; + counted_for_groups[other] = 1; + break; } *************** *** 714,718 **** of the new reload reg we have found. */ - counted_for_groups[potential_reload_regs[i]] = 1; something_changed |= new_spill_reg (i, class, max_needs, 0, --- 725,728 ---- *************** *** 841,844 **** --- 851,855 ---- rtx reg = regno_reg_rtx[i]; XEXP (reg, 0) = addr; + REG_USERVAR_P (reg) = 0; PUT_CODE (reg, MEM); } *************** *** 1464,1467 **** --- 1475,1482 ---- insn = next; + + #ifdef USE_C_ALLOCA + alloca (0); + #endif } } *************** *** 1469,1474 **** /* Discard all record of any value reloaded from X, or reloaded in X from someplace else; ! unless X is an output reload reg of the current insn. */ static void forget_old_reloads_1 (x) --- 1484,1494 ---- /* Discard all record of any value reloaded from X, or reloaded in X from someplace else; ! unless X is an output reload reg of the current insn. + X may be a hard reg (the reload reg) + or it may be a pseudo reg that was reloaded from. + + This function is not called for instructions generated by reload. */ + static void forget_old_reloads_1 (x) *************** *** 1586,1590 **** reload_order[j] = j; reload_spill_index[j] = -1; ! mode = (reload_inmode[j] == VOIDmode ? reload_outmode[j] : reload_inmode[j]); if (CLASS_MAX_NREGS (reload_reg_class[j], mode) > 1) have_groups = 1; --- 1606,1613 ---- reload_order[j] = j; reload_spill_index[j] = -1; ! mode = (reload_inmode[j] == VOIDmode ! || GET_MODE_SIZE (reload_outmode[j]) > GET_MODE_SIZE (reload_inmode[j]) ! ? reload_outmode[j] : reload_inmode[j]); ! if (CLASS_MAX_NREGS (reload_reg_class[j], mode) > 1) have_groups = 1; *************** *** 1948,1952 **** reg_reloaded_contents[i] = -1; } ! #if 0 /* If a register gets output-reloaded from a non-spill register, that invalidates any previous reloaded copy of it. --- 1971,1979 ---- reg_reloaded_contents[i] = -1; } ! ! /* The following if-statement was #if 0'd in 1.34 (or before...). ! It's reenabled in 1.35 because supposedly nothing else ! deals with this problem. */ ! /* If a register gets output-reloaded from a non-spill register, that invalidates any previous reloaded copy of it. *************** *** 1959,1963 **** reg_has_output_reload[nregno] = 1; } - #endif } --- 1986,1989 ---- *************** *** 2084,2088 **** && SET_DEST (PATTERN (temp)) == old /* This is unsafe if prev insn rejects our reload reg. */ ! && constraint_accepts_reg_p (insn_operand_constraint[recog_memoized (insn)][0], reloadreg) /* This is unsafe if operand occurs more than once in current --- 2110,2114 ---- && SET_DEST (PATTERN (temp)) == old /* This is unsafe if prev insn rejects our reload reg. */ ! && constraint_accepts_reg_p (insn_operand_constraint[recog_memoized (temp)][0], reloadreg) /* This is unsafe if operand occurs more than once in current diff -rc2N gcc-1.34/rtl.c gcc-1.35/rtl.c *** gcc-1.34/rtl.c Wed Feb 22 12:28:41 1989 --- gcc-1.35/rtl.c Sat Apr 1 16:10:37 1989 *************** *** 133,137 **** #undef DEF_RTL_EXPR }; ! \f /* Allocate an rtx vector of N elements. Store the length, and initialize all elements to zero. */ --- 133,149 ---- #undef DEF_RTL_EXPR }; ! ! /* Names for kinds of NOTEs and REG_NOTEs. */ ! ! char *note_insn_name[] = { "NOTE_INSN_FUNCTION_BEG", "NOTE_INSN_DELETED", ! "NOTE_INSN_BLOCK_BEG", "NOTE_INSN_BLOCK_END", ! "NOTE_INSN_LOOP_BEG", "NOTE_INSN_LOOP_END", ! "NOTE_INSN_FUNCTION_END", "NOTE_INSN_SETJMP", ! "NOTE_INSN_LOOP_CONT" }; ! ! char *reg_note_name[] = { "", "REG_DEAD", "REG_INC", "REG_EQUIV", "REG_WAS_0", ! "REG_EQUAL", "REG_RETVAL", "REG_LIBCALL", ! "REG_NONNEG", "REG_ASM_LINE", "REG_ASM_FILE" }; ! /* Allocate an rtx vector of N elements. Store the length, and initialize all elements to zero. */ *************** *** 316,323 **** rtx x; { ! register RTX_CODE code = GET_CODE (x); register int i; register char *fmt; if (code == MEM) return GET_MODE (x) == BLKmode || rtx_varies_p (XEXP (x, 0)); --- 328,339 ---- rtx x; { ! register enum rtx_code code; register int i; register char *fmt; + if (x == 0) + return 0; + + code = GET_CODE (x); if (code == MEM) return GET_MODE (x) == BLKmode || rtx_varies_p (XEXP (x, 0)); *************** *** 501,505 **** register int i; register int j; ! register RTX_CODE code = GET_CODE (x); register char *fmt; --- 517,521 ---- register int i; register int j; ! register enum rtx_code code; register char *fmt; *************** *** 506,510 **** --- 522,529 ---- if (x == y) return 1; + if (x == 0 || y == 0) + return 0; + code = GET_CODE (x); /* Rtx's of different codes cannot be equal. */ if (code != GET_CODE (y)) *************** *** 823,827 **** if (GET_MODE (in_rtx) != VOIDmode) ! fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx))); format_ptr = GET_RTX_FORMAT (GET_CODE (in_rtx)); --- 842,852 ---- if (GET_MODE (in_rtx) != VOIDmode) ! { ! /* Print REG_NOTE names for EXPR_LIST and INSN_LIST. */ ! if (GET_CODE (in_rtx) == EXPR_LIST || GET_CODE (in_rtx) == INSN_LIST) ! fprintf (outfile, ":%s", GET_REG_NOTE_NAME (GET_MODE (in_rtx))); ! else ! fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx))); ! } format_ptr = GET_RTX_FORMAT (GET_CODE (in_rtx)); *************** *** 885,888 **** --- 910,923 ---- break; + /* Print NOTE_INSN names rather than integer codes. */ + + case 'n': + if (XINT (in_rtx, i) <= 0) + fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i))); + else + fprintf (outfile, " %d", XINT (in_rtx, i)); + sawclose = 0; + break; + case 'u': if (XEXP (in_rtx, i) != NULL) *************** *** 1244,1247 **** --- 1279,1283 ---- case 'i': + case 'n': read_name (tmp_char, infile); tmp_int = atoi (tmp_char); diff -rc2N gcc-1.34/rtl.def gcc-1.35/rtl.def *** gcc-1.34/rtl.def Wed Feb 22 12:29:37 1989 --- gcc-1.35/rtl.def Sat Apr 1 14:32:30 1989 *************** *** 215,219 **** -2 means beginning of a name binding contour; output N_LBRAC. -3 means end of a contour; output N_RBRAC. */ ! DEF_RTL_EXPR(NOTE, "note", "iuusi") /* INLINE_HEADER is use by inline function machinery. The information --- 215,219 ---- -2 means beginning of a name binding contour; output N_LBRAC. -3 means end of a contour; output N_RBRAC. */ ! DEF_RTL_EXPR(NOTE, "note", "iuusn") /* INLINE_HEADER is use by inline function machinery. The information *************** *** 247,252 **** 5th is a vector of modes and constraints for the input operands. Each element is an ASM_INPUT containing a constraint string ! and whose mode indicates the mode of the input operand. */ ! DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEE") /* Vector of addresses, stored as full words. */ --- 247,254 ---- 5th is a vector of modes and constraints for the input operands. Each element is an ASM_INPUT containing a constraint string ! and whose mode indicates the mode of the input operand. ! 6th is the name of the containing source file. ! 7th is the source line number. */ ! DEF_RTL_EXPR(ASM_OPERANDS, "asm_operands", "ssiEEsi") /* Vector of addresses, stored as full words. */ diff -rc2N gcc-1.34/rtl.h gcc-1.35/rtl.h *** gcc-1.34/rtl.h Wed Feb 22 12:28:38 1989 --- gcc-1.35/rtl.h Sat Apr 1 16:11:47 1989 *************** *** 270,282 **** REG_NONNEG means that the register is always nonnegative during the containing loop. This is used in branches so that decrement and ! branch instructions terminating on zero can be matched. ! REG_ASM_LINE describes the source line number of an `asm' insn. ! REG_ASM_FILE describes the source file name of an `asm' insn. */ #define REG_NOTES(INSN) ((INSN)->fld[6].rtx) enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4, REG_EQUAL = 5, REG_RETVAL = 6, REG_LIBCALL = 7, ! REG_NONNEG = 8, REG_ASM_LINE = 9, REG_ASM_FILE = 10 }; /* Extract the reg-note kind from an EXPR_LIST. */ --- 270,281 ---- REG_NONNEG means that the register is always nonnegative during the containing loop. This is used in branches so that decrement and ! branch instructions terminating on zero can be matched. */ #define REG_NOTES(INSN) ((INSN)->fld[6].rtx) + /* Don't forget to change reg_note_name in rtl.c. */ enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4, REG_EQUAL = 5, REG_RETVAL = 6, REG_LIBCALL = 7, ! REG_NONNEG = 8 }; /* Extract the reg-note kind from an EXPR_LIST. */ *************** *** 283,286 **** --- 282,290 ---- #define REG_NOTE_KIND(LINK) ((enum reg_note) GET_MODE (LINK)) + /* Names for REG_NOTE's in EXPR_LIST insn's. */ + + extern char *reg_note_name[]; + #define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)]) + /* The label-number of a code-label. The assembler label is made from `L' and the label-number printed in decimal. *************** *** 316,319 **** --- 320,326 ---- /* This kind of note is generated just after each call to `setjmp', et al. */ #define NOTE_INSN_SETJMP -7 + /* Generated at the place in a loop that `continue' jumps to. */ + #define NOTE_INSN_LOOP_CONT -8 + /* Don't forget to change note_insn_name in rtl.c. */ #define NOTE_DECL_NAME(INSN) ((INSN)->fld[3].rtstr) *************** *** 323,326 **** --- 330,338 ---- #define NOTE_DECL_TYPE(INSN) ((INSN)->fld[7].rtint) + /* Names for NOTE insn's other than line numbers. */ + + extern char *note_insn_name[]; + #define GET_NOTE_INSN_NAME(NOTE_CODE) (note_insn_name[-(NOTE_CODE)]) + /* In jump.c, each label contains a count of the number of LABEL_REFs that point at it, so unused labels can be deleted. */ *************** *** 371,374 **** --- 383,399 ---- #define SUBREG_WORD(RTX) ((RTX)->fld[1].rtint) + /* Access various components of an ASM_OPERANDS rtx. */ + + #define ASM_OPERANDS_TEMPLATE(RTX) XSTR ((RTX), 0) + #define ASM_OPERANDS_OUTPUT_CONSTRAINT(RTX) XSTR ((RTX), 1) + #define ASM_OPERANDS_OUTPUT_IDX(RTX) XINT ((RTX), 2) + #define ASM_OPERANDS_INPUT_VEC(RTX) XVEC ((RTX), 3) + #define ASM_OPERANDS_INPUT_CONSTRAINT_VEC(RTX) XVEC ((RTX), 4) + #define ASM_OPERANDS_INPUT(RTX, N) XVECEXP ((RTX), 3, (N)) + #define ASM_OPERANDS_INPUT_CONSTRAINT(RTX, N) XSTR (XVECEXP ((RTX), 4, (N)), 0) + #define ASM_OPERANDS_INPUT_MODE(RTX, N) GET_MODE (XVECEXP ((RTX), 4, (N))) + #define ASM_OPERANDS_SOURCE_FILE(RTX) XSTR ((RTX), 5) + #define ASM_OPERANDS_SOURCE_LINE(RTX) XINT ((RTX), 6) + /* For a MEM rtx, 1 if it's a volatile reference. Also in an ASM_OPERANDS rtx. */ *************** *** 483,486 **** --- 508,519 ---- extern rtx fconst0_rtx; extern rtx dconst0_rtx; + + /* Returns a constant 0 rtx in mode MODE. */ + + #define CONST0_RTX(MODE) \ + ((MODE == SFmode) ? fconst0_rtx \ + : ((MODE == DFmode) ? dconst0_rtx \ + : ((GET_MODE_CLASS (MODE) == MODE_INT) ? const0_rtx \ + : (rtx) abort ()))) /* All references to certain hard regs, except those created diff -rc2N gcc-1.34/stab.def gcc-1.35/stab.def *** gcc-1.34/stab.def Fri Feb 10 13:33:55 1989 --- gcc-1.35/stab.def Fri Mar 3 10:55:20 1989 *************** *** 2,105 **** Copyright (C) 1988 Free Software Foundation, Inc. ! NO WARRANTY ! BECAUSE THIS PROGRAM IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY ! NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT ! WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, ! RICHARD M. STALLMAN AND/OR OTHER PARTIES PROVIDE THIS PROGRAM "AS IS" ! WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, ! BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND ! FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY ! AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE ! DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR ! CORRECTION. ! IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. ! STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., AND/OR ANY OTHER PARTY ! WHO MAY MODIFY AND REDISTRIBUTE THIS PROGRAM AS PERMITTED BELOW, BE ! LIABLE TO YOU FOR DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR ! OTHER SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE ! USE OR INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR ! DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR ! A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) THIS ! PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH ! DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. ! ! GENERAL PUBLIC LICENSE TO COPY ! ! 1. You may copy and distribute verbatim copies of this source file ! as you receive it, in any medium, provided that you conspicuously and ! appropriately publish on each copy a valid copyright notice "Copyright ! (C) 1988 Free Software Foundation, Inc."; and include following the ! copyright notice a verbatim copy of the above disclaimer of warranty ! and of this License. You may charge a distribution fee for the ! physical act of transferring a copy. ! ! 2. You may modify your copy or copies of this source file or ! any portion of it, and copy and distribute such modifications under ! the terms of Paragraph 1 above, provided that you also do the following: ! ! a) cause the modified files to carry prominent notices stating ! that you changed the files and the date of any change; and ! ! b) cause the whole of any work that you distribute or publish, ! that in whole or in part contains or is a derivative of this ! program or any part thereof, to be licensed at no charge to all ! third parties on terms identical to those contained in this ! License Agreement (except that you may choose to grant more extensive ! warranty protection to some or all third parties, at your option). ! ! c) You may charge a distribution fee for the physical act of ! transferring a copy, and you may at your option offer warranty ! protection in exchange for a fee. ! ! Mere aggregation of another unrelated program with this program (or its ! derivative) on a volume of a storage or distribution medium does not bring ! the other program under the scope of these terms. ! ! 3. You may copy and distribute this program or any portion of it in ! compiled, executable or object code form under the terms of Paragraphs ! 1 and 2 above provided that you do the following: ! ! a) accompany it with the complete corresponding machine-readable ! source code, which must be distributed under the terms of ! Paragraphs 1 and 2 above; or, ! ! b) accompany it with a written offer, valid for at least three ! years, to give any third party free (except for a nominal ! shipping charge) a complete machine-readable copy of the ! corresponding source code, to be distributed under the terms of ! Paragraphs 1 and 2 above; or, ! ! c) accompany it with the information you received as to where the ! corresponding source code may be obtained. (This alternative is ! allowed only for noncommercial distribution and only if you ! received the program in object code or executable form alone.) ! ! For an executable file, complete source code means all the source code for ! all modules it contains; but, as a special exception, it need not include ! source code for modules which are standard libraries that accompany the ! operating system on which the executable file runs. ! ! 4. You may not copy, sublicense, distribute or transfer this program ! except as expressly provided under this License Agreement. Any attempt ! otherwise to copy, sublicense, distribute or transfer this program is void and ! your rights to use the program under this License agreement shall be ! automatically terminated. However, parties who have received computer ! software programs from you with this License Agreement will not have ! their licenses terminated so long as such parties remain in full compliance. ! ! 5. If you wish to incorporate parts of this program into other free ! programs whose distribution conditions are different, write to the Free ! Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not yet ! worked out a simple rule that can be stated here, but we will often permit ! this. We will be guided by the two goals of preserving the free status of ! all derivatives our free software and of promoting the sharing and reuse of ! software. ! ! ! In other words, you are welcome to use, share and improve this program. ! You are forbidden to forbid anyone else to use, share and improve ! what you give them. Help stamp out software-hoarding! */ \f /* Global variable. Only the name is significant. --- 2,18 ---- Copyright (C) 1988 Free Software Foundation, Inc. ! This program is free software; you can redistribute it and/or modify ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation; either version 1, or (at your option) ! any later version. ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! You should have received a copy of the GNU General Public License ! along with this program; if not, write to the Free Software ! Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ \f /* Global variable. Only the name is significant. diff -rc2N gcc-1.34/stdarg.h gcc-1.35/stdarg.h *** gcc-1.34/stdarg.h Fri Sep 16 11:49:26 1988 --- gcc-1.35/stdarg.h Thu Apr 20 12:36:29 1989 *************** *** 10,14 **** (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) ! #ifndef sparc #define va_start(AP, LASTARG) \ (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG))) --- 10,14 ---- (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) ! #ifndef __sparc__ #define va_start(AP, LASTARG) \ (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG))) diff -rc2N gcc-1.34/stmt.c gcc-1.35/stmt.c *** gcc-1.34/stmt.c Wed Feb 22 12:28:32 1989 --- gcc-1.35/stmt.c Sat Apr 15 16:11:42 1989 *************** *** 809,813 **** body = gen_rtx (ASM_OPERANDS, VOIDmode, ! TREE_STRING_POINTER (string), "", 0, argvec, constraints); MEM_VOLATILE_P (body) = vol; --- 809,814 ---- body = gen_rtx (ASM_OPERANDS, VOIDmode, ! TREE_STRING_POINTER (string), "", 0, argvec, constraints, ! filename, line); MEM_VOLATILE_P (body) = vol; *************** *** 892,896 **** TREE_STRING_POINTER (string), TREE_STRING_POINTER (TREE_PURPOSE (tail)), ! i, argvec, constraints)); MEM_VOLATILE_P (SET_SRC (XVECEXP (body, 0, i))) = vol; } --- 893,898 ---- TREE_STRING_POINTER (string), TREE_STRING_POINTER (TREE_PURPOSE (tail)), ! i, argvec, constraints, ! filename, line)); MEM_VOLATILE_P (SET_SRC (XVECEXP (body, 0, i))) = vol; } *************** *** 928,941 **** } - /* Record the source file and line number in the insn, - for the sake of errors generated at reload or final time. */ - - REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_ASM_FILE, - gen_rtx (SYMBOL_REF, VOIDmode, filename), - REG_NOTES (insn)); - REG_NOTES (insn) = gen_rtx (EXPR_LIST, REG_ASM_LINE, - gen_rtx (CONST_INT, VOIDmode, line), - REG_NOTES (insn)); - last_expr_type = 0; } --- 930,933 ---- *************** *** 1010,1013 **** --- 1002,1007 ---- rtx saved = RTL_EXPR_RTL (t); + do_pending_stack_adjust (); + if (last_expr_type == 0) { *************** *** 1161,1164 **** --- 1155,1159 ---- { do_pending_stack_adjust (); + emit_note (0, NOTE_INSN_LOOP_CONT); emit_label (loop_stack->data.loop.continue_label); } *************** *** 1309,1329 **** clear_pending_stack_adjust (); do_pending_stack_adjust (); ! #ifdef FUNCTION_EPILOGUE #ifdef HAVE_return ! if (! HAVE_return || current_function_returns_pcc_struct) ! expand_goto_internal (0, return_label, last_insn); ! else { emit_jump_insn (gen_return ()); emit_barrier (); } - #else - expand_goto_internal (0, return_label, last_insn); #endif ! #else /* no FUNCTION_EPILOGUE */ ! emit_jump_insn (gen_return ()); ! emit_barrier (); ! #endif ! last_expr_type = 0; } --- 1304,1328 ---- clear_pending_stack_adjust (); do_pending_stack_adjust (); ! last_expr_type = 0; ! ! /* PCC-struct return always uses an epilogue. */ ! if (current_function_returns_pcc_struct) ! { ! expand_goto_internal (0, return_label, last_insn); ! return; ! } ! ! /* Otherwise output a simple return-insn if one is available. */ #ifdef HAVE_return ! if (HAVE_return) { emit_jump_insn (gen_return ()); emit_barrier (); + return; } #endif ! ! /* Otherwise jump to the epilogue. */ ! expand_goto_internal (0, return_label, last_insn); } *************** *** 1422,1426 **** #endif /* HAVE_return */ ! if (cleanups && GET_CODE (DECL_RTL (DECL_RESULT (this_function))) == REG) { rtx last_insn; --- 1421,1428 ---- #endif /* HAVE_return */ ! if (cleanups ! && retval_rhs != 0 ! && TREE_TYPE (retval_rhs) != void_type_node ! && GET_CODE (DECL_RTL (DECL_RESULT (this_function))) == REG) { rtx last_insn; *************** *** 1867,1872 **** /* Avoid extra code if we can prove it's a multiple already. */ if (DECL_SIZE_UNIT (decl) % STACK_BOUNDARY) ! size = round_push (size); #endif /* Make space on the stack, and get an rtx for the address of it. */ --- 1869,1883 ---- /* Avoid extra code if we can prove it's a multiple already. */ if (DECL_SIZE_UNIT (decl) % STACK_BOUNDARY) ! { ! #ifdef STACK_POINTER_OFFSET ! /* Avoid extra code if we can prove that adding STACK_POINTER_OFFSET ! will not give this address invalid alignment. */ ! if (DECL_ALIGN (decl) > ((STACK_POINTER_OFFSET * BITS_PER_UNIT) % STACK_BOUNDARY)) ! size = plus_constant (size, ! STACK_POINTER_OFFSET % (STACK_BOUNDARY / BITS_PER_UNIT)); #endif + size = round_push (size); + } + #endif /* STACK_BOUNDARY */ /* Make space on the stack, and get an rtx for the address of it. */ *************** *** 1876,1884 **** address = copy_to_reg (stack_pointer_rtx); #ifdef STACK_POINTER_OFFSET ! /* If the contents of the stack pointer reg are offset from the ! actual top-of-stack address, add the offset here. */ ! emit_insn (gen_add2_insn (address, gen_rtx (CONST_INT, VOIDmode, ! STACK_POINTER_OFFSET))); ! #endif #ifndef STACK_GROWS_DOWNWARD anti_adjust_stack (size); --- 1887,1909 ---- address = copy_to_reg (stack_pointer_rtx); #ifdef STACK_POINTER_OFFSET ! { ! /* If the contents of the stack pointer reg are offset from the ! actual top-of-stack address, add the offset here. */ ! rtx sp_offset = gen_rtx (CONST_INT, VOIDmode, STACK_POINTER_OFFSET); ! #ifdef STACK_BOUNDARY ! #ifdef STACK_GROWS_DOWNWARD ! int direction = 1; ! #else /* not STACK_GROWS_DOWNWARD */ ! int direction = 0; ! #endif /* not STACK_GROWS_DOWNWARD */ ! if (DECL_ALIGN (decl) > ((STACK_POINTER_OFFSET * BITS_PER_UNIT) % STACK_BOUNDARY)) ! sp_offset = plus_constant (sp_offset, ! (STACK_POINTER_OFFSET ! % (STACK_BOUNDARY / BITS_PER_UNIT) ! * direction)); ! #endif /* STACK_BOUNDARY */ ! emit_insn (gen_add2_insn (address, sp_offset)); ! } ! #endif /* STACK_POINTER_OFFSET */ #ifndef STACK_GROWS_DOWNWARD anti_adjust_stack (size); *************** *** 2278,2281 **** --- 2303,2366 ---- } \f + /* Check that all enumeration literals are covered by the case + expressions of a switch. Also, warn if there are any extra + switch cases that are *not* elements of the enumerated type. */ + + void + check_for_full_enumeration_handling () + { + tree index_expr = case_stack->data.case_stmt.index_expr; + + if (TREE_CODE (index_expr) == INTEGER_CST) + return; + else + { + register struct case_node *n; + register tree chain; + tree enum_node = TREE_OPERAND (index_expr, 0); + + /* The time complexity of this loop is currently O(N * M), with + N being the number of enumerals in the enumerated type, and + M being the number of case expressions in the switch. */ + + for (chain = TYPE_VALUES (TREE_TYPE (enum_node)); + chain; + chain = TREE_CHAIN (chain)) + { + /* Find a match between enumeral and case expression, if possible. + Quit looking when we've gone too far (since case expressions + are kept sorted in ascending order). Warn about enumerals not + handled in the switch statement case expression list. */ + + for (n = case_stack->data.case_stmt.case_list; + n && tree_int_cst_lt (n->high, TREE_VALUE (chain)); + n = n->right) + ; + + if (!(n && tree_int_cst_equal (n->low, TREE_VALUE (chain)))) + warning ("enumerated value `%s' not handled in switch", + IDENTIFIER_POINTER (TREE_PURPOSE (chain))); + } + + /* Now we go the other way around; we warn if there are case + expressions that don't correspond to enumerals. This can + occur since C and C++ don't enforce type-checking of + assignments to enumeration variables. */ + + for (n = case_stack->data.case_stmt.case_list; n; n = n->right) + { + for (chain = TYPE_VALUES ( TREE_TYPE (enum_node)); + chain && !tree_int_cst_equal (n->low, TREE_VALUE (chain)); + chain = TREE_CHAIN (chain)) + ; + + if (!chain) + warning ("case value `%d' not in enumerated type `%s'", + TREE_INT_CST_LOW (n->low), + IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (TREE_TYPE (enum_node))))); + } + } + } + \f /* Terminate a case (Pascal) or switch (C) statement in which CASE_INDEX is the expression to be tested. *************** *** 2283,2287 **** void ! expand_end_case () { tree minval, maxval, range; --- 2368,2373 ---- void ! expand_end_case (orig_index) ! tree orig_index; { tree minval, maxval, range; *************** *** 2303,2306 **** --- 2389,2401 ---- if (TREE_TYPE (index_expr) != error_mark_node) { + /* If switch expression was an enumerated type, check that all + enumeration literals are covered by the cases. + No sense trying this if there's a default case, however. */ + + if (!thiscase->data.case_stmt.default_label + && TREE_CODE (TREE_TYPE (orig_index)) == ENUMERAL_TYPE + && warn_switch) + check_for_full_enumeration_handling (); + /* If we don't have a default-label, create one here, after the body of the switch. */ *************** *** 2778,2782 **** rtx index; case_node_ptr node; ! tree default_label; int unsignedp; { --- 2873,2877 ---- rtx index; case_node_ptr node; ! rtx default_label; int unsignedp; { *************** *** 3367,3370 **** --- 3462,3468 ---- register int i; + if (x == 0) + return 0; + code = GET_CODE (x); *************** *** 3516,3520 **** if (memref && ! mode_dependent_address_p (XEXP (memref, 0)) ! && offsetable_address_p (GET_MODE (bitfield), XEXP (memref, 0))) { /* Now adjust the address, first for any subreg'ing --- 3614,3618 ---- if (memref && ! mode_dependent_address_p (XEXP (memref, 0)) ! && offsetable_address_p (0, GET_MODE (bitfield), XEXP (memref, 0))) { /* Now adjust the address, first for any subreg'ing *************** *** 3681,3685 **** /* If struct value address comes on the stack, count it in size of args. */ ! if (DECL_MODE (DECL_RESULT (fndecl)) == BLKmode && GET_CODE (struct_value_incoming_rtx) == MEM) stack_args_size.constant += GET_MODE_SIZE (Pmode); --- 3779,3784 ---- /* If struct value address comes on the stack, count it in size of args. */ ! if ((DECL_MODE (DECL_RESULT (fndecl)) == BLKmode ! || RETURN_IN_MEMORY (TREE_TYPE (DECL_RESULT (fndecl)))) && GET_CODE (struct_value_incoming_rtx) == MEM) stack_args_size.constant += GET_MODE_SIZE (Pmode); *************** *** 3722,3726 **** stack_offset.constant += first_parm_offset; ! /* Find out if the parm needs padding, and whether above or below. */ where_pad = FUNCTION_ARG_PADDING (passed_mode, --- 3821,3855 ---- stack_offset.constant += first_parm_offset; ! /* If this argument needs more than the usual parm alignment, do ! extrinsic padding to reach that alignment. */ ! ! #ifdef MAX_PARM_BOUNDARY ! /* If MAX_PARM_BOUNDARY is not defined, it means that the usual ! alignment requirements are relaxed for parms, and that no parm ! needs more alignment than PARM_BOUNDARY, regardless of data type. */ ! ! if (PARM_BOUNDARY < TYPE_ALIGN (TREE_TYPE (parm))) ! { ! int boundary = PARM_BOUNDARY; ! ! /* Determine the boundary to pad up to. */ ! if (TYPE_ALIGN (TREE_TYPE (parm)) > boundary) ! boundary = TYPE_ALIGN (TREE_TYPE (parm)); ! if (boundary > MAX_PARM_BOUNDARY) ! boundary = MAX_PARM_BOUNDARY; ! ! /* If the previous args don't reach such a boundary, ! advance to the next one. */ ! stack_offset.constant += boundary - 1; ! stack_offset.constant &= boundary - 1; ! ! if (stack_offset.var != 0) ! abort (); /* This case not implemented yet */ ! } ! #endif /* MAX_PARM_BOUNDARY */ ! ! /* Find out if the parm needs intrinsic padding (up to PARM_BOUNDARY), ! and whether above or below. */ ! where_pad = FUNCTION_ARG_PADDING (passed_mode, *************** *** 3728,3733 **** 0, VOIDmode, 0)); ! /* If it is padded below, adjust the stack address ! upward over the padding. */ if (where_pad == downward) { --- 3857,3866 ---- 0, VOIDmode, 0)); ! /* If arg should be padded below, adjust the stack address upward. ! This padding is considered part of the space occupied by the ! argument. It pads only up to PARM_BOUNDARY, and it does not ! depend on the previous arguments, since they are assumed to ! occupy a multiple of PARM_BOUNDARY. */ ! if (where_pad == downward) { *************** *** 4161,4175 **** current_function_returns_struct = 0; - /* Make the label for return statements to jump to, if this machine - does not have a one-instruction return. */ - #ifdef HAVE_return - if (HAVE_return && ! current_function_returns_pcc_struct) - return_label = 0; - else - return_label = gen_label_rtx (); - #else - return_label = gen_label_rtx (); - #endif - /* No space assigned yet for structure values. */ max_structure_value_size = 0; --- 4294,4297 ---- *************** *** 4219,4228 **** /* Decide whether to return the value in memory or in a register. */ ! if (DECL_MODE (DECL_RESULT (current_function_decl)) == BLKmode || (flag_pcc_struct_return ! && ((TREE_CODE (TREE_TYPE (DECL_RESULT (current_function_decl))) ! == RECORD_TYPE) ! || (TREE_CODE (TREE_TYPE (DECL_RESULT (current_function_decl))) ! == UNION_TYPE)))) { /* Returning something that won't go in a register. */ --- 4341,4349 ---- /* Decide whether to return the value in memory or in a register. */ ! if (DECL_MODE (DECL_RESULT (subr)) == BLKmode ! || RETURN_IN_MEMORY (TREE_TYPE (DECL_RESULT (subr))) || (flag_pcc_struct_return ! && (TREE_CODE (TREE_TYPE (DECL_RESULT (subr))) == RECORD_TYPE ! || TREE_CODE (TREE_TYPE (DECL_RESULT (subr))) == UNION_TYPE))) { /* Returning something that won't go in a register. */ *************** *** 4262,4265 **** --- 4383,4397 ---- REG_FUNCTION_VALUE_P (DECL_RTL (DECL_RESULT (subr))) = 1; + /* Make the label for return statements to jump to, if this machine + does not have a one-instruction return. */ + #ifdef HAVE_return + if (HAVE_return && ! current_function_returns_pcc_struct) + return_label = 0; + else + return_label = gen_label_rtx (); + #else + return_label = gen_label_rtx (); + #endif + /* If doing stupid allocation, mark parms as born here. */ *************** *** 4367,4370 **** --- 4499,4510 ---- emit_move_insn (outgoing, value_address); use_variable (outgoing); + + #ifdef HAVE_return + if (HAVE_return) + { + emit_jump_insn (gen_return ()); + emit_barrier (); + } + #endif } diff -rc2N gcc-1.34/stor-layout.c gcc-1.35/stor-layout.c *** gcc-1.34/stor-layout.c Wed Feb 22 12:28:28 1989 --- gcc-1.35/stor-layout.c Sun Apr 2 20:20:10 1989 *************** *** 173,176 **** --- 173,180 ---- because DImode moves cannot be used to store such objects in memory. */ + #ifndef MAX_FIXED_MODE_SIZE + #define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode) + #endif + static enum machine_mode *************** *** 179,183 **** { register int units = size / BITS_PER_UNIT; ! register enum machine_mode t; if (size % BITS_PER_UNIT != 0) --- 183,187 ---- { register int units = size / BITS_PER_UNIT; ! register enum machine_mode t, val; if (size % BITS_PER_UNIT != 0) *************** *** 184,193 **** return BLKmode; ! for (t = QImode; (int) t <= (int) DImode; t = (enum machine_mode) ((int) t + 1)) if (GET_MODE_SIZE (t) == units) ! return t; ! return BLKmode; } \f --- 188,202 ---- return BLKmode; ! if (size > MAX_FIXED_MODE_SIZE) ! return BLKmode; ! ! /* Get the last mode which has this size. */ ! val = BLKmode; ! for (t = QImode; GET_MODE_CLASS (t) == MODE_INT; t = (enum machine_mode) ((int) t + 1)) if (GET_MODE_SIZE (t) == units) ! val = t; ! return val; } \f diff -rc2N gcc-1.34/texinfo.tex gcc-1.35/texinfo.tex *** gcc-1.34/texinfo.tex Thu Feb 23 16:12:35 1989 --- gcc-1.35/texinfo.tex Sun Apr 2 11:24:31 1989 *************** *** 22,26 **** %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{1.22} \message{Loading texinfo package [Version \texinfoversion]:} \message{} --- 22,26 ---- %what you give them. Help stamp out software-hoarding! ! \def\texinfoversion{1.23} \message{Loading texinfo package [Version \texinfoversion]:} \message{} *************** *** 500,505 **** }% unbind the catcode of @. ! % @headings on turns them on. ! % @headings off turns them off. % By default, they are off. --- 500,507 ---- }% unbind the catcode of @. ! % @headings double turns headings on for double-sided printing. ! % @headings single turns headings on for single-sided printing. ! % @headings off turns them off. ! % @headings on same as @headings double, retained for compatibility. % By default, they are off. *************** *** 510,519 **** \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff ! % When we turn headings on, set the page number to 1, ! % Put current file name in lower left corner, ! % Put chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. ! \def\HEADINGSon{ \pagealignmacro \global\pageno=1 --- 512,521 ---- \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff ! % When we turn headings on, set the page number to 1. ! % For double-sided printing, put current file name in lower left corner, ! % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. ! \def\HEADINGSdouble{ \pagealignmacro \global\pageno=1 *************** *** 523,526 **** --- 525,539 ---- \global\oddheadline={\line{\thischapter\hfil\folio}} } + % For single-sided printing, chapter title goes across top left of page, + % page number on top right. + \def\HEADINGSsingle{ + \pagealignmacro + \global\pageno=1 + \global\evenfootline={\hfil} + \global\oddfootline={\hfil} + \global\evenheadline={\line{\thischapter\hfil\folio}} + \global\oddheadline={\line{\thischapter\hfil\folio}} + } + \def\HEADINGSon{\HEADINGSdouble} % Subroutines used in generating headings *************** *** 1170,1178 **** \def\CHAPPAGon{ \global\let\pchapsepmacro=\chappager ! \global\let\pagealignmacro=\chappager} \def\CHAPPAGodd{ \global\let\pchapsepmacro=\chapoddpage ! \global\let\pagealignmacro=\chapoddpage} \CHAPPAGon --- 1183,1193 ---- \def\CHAPPAGon{ \global\let\pchapsepmacro=\chappager ! \global\let\pagealignmacro=\chappager ! \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{ \global\let\pchapsepmacro=\chapoddpage ! \global\let\pagealignmacro=\chapoddpage ! \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon diff -rc2N gcc-1.34/toplev.c gcc-1.35/toplev.c *** gcc-1.34/toplev.c Wed Feb 22 12:27:14 1989 --- gcc-1.35/toplev.c Thu Apr 6 11:12:29 1989 *************** *** 217,220 **** --- 217,234 ---- int warn_unused; + /* Nonzero means warn about all declarations which shadow others. */ + + int warn_shadow; + + /* Warn if a switch on an enum fails to have a case for every enum value. */ + + int warn_switch; + + /* Nonzero means warn about any identifiers that match in the first N + characters. The value N is in `id_clash_len'. */ + + int warn_id_clash; + int id_clash_len; + /* Number of error messages and warning messages so far. */ *************** *** 529,533 **** S and V are a string and an arg for `printf'. This is used only when INSN is an `asm' with operands, ! and we make sure there is always a line-NOTE for that kind of statement. */ void --- 543,547 ---- S and V are a string and an arg for `printf'. This is used only when INSN is an `asm' with operands, ! and each ASM_OPERANDS records its own source file and line. */ void *************** *** 541,551 **** char *filename; int line; ! temp = find_reg_note (insn, REG_ASM_FILE, 0); ! if (temp == 0) ! abort (); ! filename = XSTR (XEXP (temp, 0), 0); ! temp = find_reg_note (insn, REG_ASM_LINE, 0); ! line = INTVAL (XEXP (temp, 0)); error_with_file_and_line (filename, line, s, v, v2); --- 555,575 ---- char *filename; int line; + rtx body = PATTERN (insn); + rtx asmop; ! /* Find the (or one of the) ASM_OPERANDS in the insn. */ ! if (GET_CODE (body) == SET && GET_CODE (SET_SRC (body)) == ASM_OPERANDS) ! asmop = SET_SRC (body); ! else if (GET_CODE (body) == ASM_OPERANDS) ! asmop = body; ! else if (GET_CODE (body) == PARALLEL ! && GET_CODE (XVECEXP (body, 0, 0)) == SET) ! asmop = SET_SRC (XVECEXP (body, 0, 0)); ! else if (GET_CODE (body) == PARALLEL ! && GET_CODE (XVECEXP (body, 0, 0)) == ASM_OPERANDS) ! asmop = XVECEXP (body, 0, 0); ! ! filename = ASM_OPERANDS_SOURCE_FILE (asmop); ! line = ASM_OPERANDS_SOURCE_LINE (asmop); error_with_file_and_line (filename, line, s, v, v2); *************** *** 1015,1018 **** --- 1039,1044 ---- && TREE_ADDRESSABLE (decl)) output_inline_function (decl); + + /* Warn about any function declared static but not defined. */ if (warn_unused && TREE_CODE (decl) == FUNCTION_DECL *************** *** 1021,1024 **** --- 1047,1061 ---- && ! TREE_PUBLIC (decl)) warning_with_decl (decl, "`%s' declared but never defined"); + /* Warn about statics fns or vars defined but not used, + but not about inline functions + since unused inline statics is normal practice. */ + if (warn_unused + && (TREE_CODE (decl) == FUNCTION_DECL + || TREE_CODE (decl) == VAR_DECL) + && ! TREE_EXTERNAL (decl) + && ! TREE_PUBLIC (decl) + && ! TREE_USED (decl) + && ! TREE_INLINE (decl)) + warning_with_decl (decl, "`%s' defined but not used"); } } *************** *** 1690,1693 **** --- 1727,1748 ---- else if (!strcmp (str, "Wunused")) warn_unused = 1; + else if (!strcmp (str, "Wshadow")) + warn_shadow = 1; + else if (!strcmp (str, "Wswitch")) + warn_switch = 1; + else if (!strncmp (str, "Wid-clash-", 10)) + { + char *endp = str + 10; + + while (*endp) + { + if (*endp >= '0' && *endp <= '9') + endp++; + else + error ("Invalid option `%s'", argv[i]); + } + warn_id_clash = 1; + id_clash_len = atoi (str + 10); + } else if (!strcmp (str, "p")) profile_flag = 1; diff -rc2N gcc-1.34/tree.c gcc-1.35/tree.c *** gcc-1.34/tree.c Wed Feb 22 12:27:12 1989 --- gcc-1.35/tree.c Fri Mar 10 17:44:56 1989 *************** *** 38,41 **** --- 38,42 ---- #include "obstack.h" #include "varargs.h" + #include "flags.h" #define obstack_chunk_alloc xmalloc *************** *** 516,520 **** register int i; register tree idp; ! register int len; /* Compute length of text in len. */ --- 517,521 ---- register int i; register tree idp; ! register int len, hash_len; /* Compute length of text in len. */ *************** *** 521,527 **** for (len = 0; text[len]; len++); /* Compute hash code */ ! hi = len; ! for (i = 0; i < len; i++) hi = ((hi * 613) + (unsigned)(text[i])); --- 522,533 ---- for (len = 0; text[len]; len++); + /* Decide how much of that length to hash on */ + hash_len = len; + if (warn_id_clash && len > id_clash_len) + hash_len = id_clash_len; + /* Compute hash code */ ! hi = hash_len; ! for (i = 0; i < hash_len; i++) hi = ((hi * 613) + (unsigned)(text[i])); *************** *** 530,537 **** /* Search table for identifier */ ! for (idp = hash_table[hi]; idp!=NULL; idp = TREE_CHAIN (idp)) ! if (IDENTIFIER_LENGTH (idp) == len && ! !strcmp (IDENTIFIER_POINTER (idp), text)) return idp; /* <-- return if found */ /* Not found, create one, add to chain */ --- 536,553 ---- /* Search table for identifier */ ! for (idp = hash_table[hi]; idp; idp = TREE_CHAIN (idp)) ! if (IDENTIFIER_LENGTH (idp) == len ! && !strcmp (IDENTIFIER_POINTER (idp), text)) return idp; /* <-- return if found */ + + /* Not found; optionally warn about a similar identifier */ + if (warn_id_clash && len > id_clash_len) + for (idp = hash_table[hi]; idp; idp = TREE_CHAIN (idp)) + if (!strncmp (IDENTIFIER_POINTER (idp), text, id_clash_len)) + { + warning ("`%s' and `%s' identical in first n characters", + IDENTIFIER_POINTER (idp), text); + break; + } /* Not found, create one, add to chain */ diff -rc2N gcc-1.34/va-mips.h gcc-1.35/va-mips.h *** gcc-1.34/va-mips.h Wed Dec 31 19:00:00 1969 --- gcc-1.35/va-mips.h Wed Apr 5 17:26:50 1989 *************** *** 0 **** --- 1,114 ---- + /* ---------------------------------------- */ + /* VARARGS for MIPS/GNU CC */ + /* */ + /* */ + /* */ + /* */ + /* ---------------------------------------- */ + + /* WARNING: THIS depends heavily on in register parameter + passing conventions of the MIPS. This is compatible with MIPS + programs, including printf; but differs from MIPS + implementation. */ + + /* PROLOGUE FOR VARARGS PROGRAMS: + + ;;;; META COMMENTS + .align 0 + ;;;; Purpose: identify varargs pgm + ;;;; to codegen. I'd rather have a + ;;;; Flag in the compiler than this. + + __vd_alist.0: + .ascii "__%%VARARGS\0" + .ent zrintf + zrintf: + #PROLOGUE + add $8,$0,$29 + ;;;; Leave extra space in frame + ;;;; to save f12 f14 + subu $29,112 #temp= 76,saveregs= 32, sfo= -4 + # .mask 0xc0010000 + sw $31,4($29) + sw $30,8($29) + ;;;; Purpose:save stack size on stack + ;;;; for easier retrieval + addi $9,$0,112 #Varargs suspicion + sw $9,-4($8) #Varargs suspicion + ;;;; save floating point registers + ;;;; into extra stack space (in the + ;;;; varargs callee frame, NOT in the + ;;;; space saved by caller for register + ;;;; argument write back. Thus, we + ;;;; can write back both, and let the + ;;;; va_arg macro decide what is + ;;;; required. + + s.d $f12,16($29) #Varargs Suspicion + s.d $f14,24($29) #Varargs Suspicion + + sw $16,28($29) + # .fmask 0x0 + add $30,$0,$8 + #END PROLOGUE + ;;;; Write back of r4-r7 due to + ;;;; the va_dcl, va_start combination + + sw $4,0($30) #movsi $4 -> 0($30) + sw $5,4($30) #movsi $5 -> 4($30) + sw $6,8($30) #movsi $6 -> 8($30) + sw $7,12($30) #movsi $7 -> 12($30) + + */ + \f + typedef struct + { int pnt; + char *stack; + double *fpregs; + } va_list ; + /* Used to push R4-R7 to stack */ + /* and to access argument list on stack */ + #define va_alist _va_alist, __va_alist,__vb_alist,__vc_alist + + #define va_dcl int _va_alist, __va_alist,__vb_alist,__vc_alist; + + + #define va_start(list) {\ + static char __vd_alist[16] = "__%%VARARGS"; /* Identify to codegen */\ + &__va_alist,&__vb_alist,&__vc_alist, /* write back to stack */\ + (list).pnt = 0, /* start from first */\ + (list).stack = (char *) &_va_alist, /* Access parameter list*/\ + (list).fpregs = (double *)((list).stack -\ + *(int *)((list).stack -4) + 16), \ + (list).stack;} + + #define va_end(list) + + /* For argument passing convention see */ + /* both tm.h and Jerry Kane's book */ + + #define va_arg(list,mode) (((mode *)\ + (((sizeof(mode) > 4) ?\ + (((list).pnt == 0 )?(((list).pnt = -1),\ + (list).stack = (char *)\ + (((int)((list).stack)\ + + 2*8 - 1) & -8),\ + (char *)((list).fpregs+1)\ + )\ + :((list).pnt == -1) ?((list).pnt = 2,\ + (list).stack = (char *)\ + (((int)((list).stack)\ + + 2*8 - 1) & -8),\ + (char *)((list).fpregs+2) \ + )\ + :(((list).pnt > 0 )?\ + ((list).pnt =((list).pnt +1),\ + (list).stack =(char *)\ + (((int)((list).stack)\ + + 2*8 - 1) & -8) \ + ):(char *)abort()))\ + :((list).pnt = (((list).pnt >=0) ? ((list).pnt +1)\ + :((list).pnt == -1) ? 2 :3),\ + (list).stack = (char *)(((int)((list).stack)+ 2*4 - 1) & -4)\ + )\ + )))[-1])\ diff -rc2N gcc-1.34/varargs.h gcc-1.35/varargs.h *** gcc-1.34/varargs.h Mon Jan 23 03:48:21 1989 --- gcc-1.35/varargs.h Thu Apr 6 00:11:04 1989 *************** *** 6,9 **** --- 6,12 ---- #include "va-spur.h" #else + #ifdef __mips__ + #include "va-mips.h" + #else /* These macros implement traditional (non-ANSI) varargs *************** *** 30,33 **** --- 33,37 ---- *((TYPE *) (AP - __va_rounded_size (TYPE)))) + #endif /* not mips */ #endif /* not spur */ #endif /* __GNUC__ */ diff -rc2N gcc-1.34/varasm.c gcc-1.35/varasm.c *** gcc-1.34/varasm.c Wed Feb 22 12:27:09 1989 --- gcc-1.35/varasm.c Tue Apr 4 20:49:31 1989 *************** *** 213,223 **** if (DECL_RTL (decl) == 0) { - if (DECL_RTL (decl) && asmspec == 0) - name = XSTR (XEXP (DECL_RTL (decl), 0), 0); - /* Can't use just the variable's own name for a variable whose scope is less than the whole file. Concatenate a distinguishing number. */ ! else if (!top_level && !TREE_EXTERNAL (decl) && asmspec == 0) { char *label; --- 213,220 ---- if (DECL_RTL (decl) == 0) { /* Can't use just the variable's own name for a variable whose scope is less than the whole file. Concatenate a distinguishing number. */ ! if (!top_level && !TREE_EXTERNAL (decl) && asmspec == 0) { char *label; *************** *** 467,475 **** * DECL_SIZE_UNIT (decl) / BITS_PER_UNIT); /* Round size up to multiple of BIGGEST_ALIGNMENT bits so that each uninitialized object starts on such a boundary. */ ! int rounded = ((size + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1) ! / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) ! * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); if (flag_shared_data) data_section (); --- 464,476 ---- * DECL_SIZE_UNIT (decl) / BITS_PER_UNIT); + int rounded = size; + /* Don't allocate zero bytes of common, + since that means "undefined external" in the linker. */ + if (size == 0) rounded = 1; /* Round size up to multiple of BIGGEST_ALIGNMENT bits so that each uninitialized object starts on such a boundary. */ ! rounded = ((rounded + (BIGGEST_ALIGNMENT / BITS_PER_UNIT) - 1) ! / (BIGGEST_ALIGNMENT / BITS_PER_UNIT) ! * (BIGGEST_ALIGNMENT / BITS_PER_UNIT)); if (flag_shared_data) data_section (); *************** *** 1432,1435 **** --- 1433,1439 ---- { case DImode: + #ifdef ASM_OUTPUT_DOUBLE_INT + ASM_OUTPUT_DOUBLE_INT (asm_out_file, u.i[0], u.i[1]); + #else /* no ASM_OUTPUT_DOUBLE_INT */ #ifndef WORDS_BIG_ENDIAN /* Output two ints. */ *************** *** 1444,1448 **** ASM_OUTPUT_INT (asm_out_file, gen_rtx (CONST_INT, VOIDmode, u.i[0])); ! #endif break; --- 1448,1453 ---- ASM_OUTPUT_INT (asm_out_file, gen_rtx (CONST_INT, VOIDmode, u.i[0])); ! #endif /* WORDS_BIG_ENDIAN */ ! #endif /* no ASM_OUTPUT_DOUBLE_INT */ break; *************** *** 1583,1586 **** --- 1588,1597 ---- return; + /* Eliminate the NOP_EXPR that makes a cast not be an lvalue. + That way we get the constant (we hope) inside it. */ + if (TREE_CODE (exp) == NOP_EXPR + && TREE_TYPE (exp) == TREE_TYPE (TREE_OPERAND (exp, 0))) + exp = TREE_OPERAND (exp, 0); + switch (code) { *************** *** 1729,1732 **** --- 1740,1750 ---- field = field ? TREE_CHAIN (field) : 0) { + tree val = TREE_VALUE (link); + + /* Eliminate the NOP_EXPR that makes a cast not be an lvalue. */ + if (TREE_CODE (val) == NOP_EXPR + && TREE_TYPE (val) == TREE_TYPE (TREE_OPERAND (val, 0))) + val = TREE_OPERAND (val, 0); + if (field == 0 || (DECL_MODE (field) != BImode)) *************** *** 1766,1770 **** fieldsize = int_size_in_bytes (TREE_TYPE (TREE_TYPE (exp))); ! output_constant (TREE_VALUE (link), fieldsize); /* Count its size. */ --- 1784,1788 ---- fieldsize = int_size_in_bytes (TREE_TYPE (TREE_TYPE (exp))); ! output_constant (val, fieldsize); /* Count its size. */ *************** *** 1771,1775 **** total_bytes += fieldsize; } ! else if (TREE_CODE (TREE_VALUE (link)) != INTEGER_CST) error ("invalid initial value for member `%s'", IDENTIFIER_POINTER (DECL_NAME (field))); --- 1789,1793 ---- total_bytes += fieldsize; } ! else if (TREE_CODE (val) != INTEGER_CST) error ("invalid initial value for member `%s'", IDENTIFIER_POINTER (DECL_NAME (field))); *************** *** 1818,1822 **** first (of the bits that are significant) and put them into bytes from the most significant end. */ ! byte |= (((TREE_INT_CST_LOW (TREE_VALUE (link)) >> (end_offset - next_offset - this_time)) & ((1 << this_time) - 1)) --- 1836,1840 ---- first (of the bits that are significant) and put them into bytes from the most significant end. */ ! byte |= (((TREE_INT_CST_LOW (val) >> (end_offset - next_offset - this_time)) & ((1 << this_time) - 1)) *************** *** 1827,1831 **** and pack them starting at the least significant bits of the bytes. */ ! byte |= ((TREE_INT_CST_LOW (TREE_VALUE (link)) >> (next_offset - DECL_OFFSET (field))) & ((1 << this_time) - 1)) << next_bit; --- 1845,1849 ---- and pack them starting at the least significant bits of the bytes. */ ! byte |= ((TREE_INT_CST_LOW (val) >> (next_offset - DECL_OFFSET (field))) & ((1 << this_time) - 1)) << next_bit; diff -rc2N gcc-1.34/version.c gcc-1.35/version.c *** gcc-1.34/version.c Fri Feb 24 10:57:29 1989 --- gcc-1.35/version.c Wed Apr 26 14:40:23 1989 *************** *** 1,1 **** ! char *version_string = "1.34"; --- 1,1 ---- ! char *version_string = "1.35";